Task: | Super knight |
Sender: | aalto2024l_001 |
Submission time: | 2024-11-20 17:19:31 +0200 |
Language: | C++ (C++17) |
Status: | READY |
Result: | WRONG ANSWER |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.00 s | details |
#2 | ACCEPTED | 0.00 s | details |
#3 | ACCEPTED | 0.00 s | details |
#4 | ACCEPTED | 0.00 s | details |
#5 | ACCEPTED | 0.00 s | details |
#6 | ACCEPTED | 0.01 s | details |
#7 | ACCEPTED | 0.00 s | details |
#8 | ACCEPTED | 0.00 s | details |
#9 | ACCEPTED | 0.00 s | details |
#10 | ACCEPTED | 0.00 s | details |
#11 | ACCEPTED | 0.00 s | details |
#12 | ACCEPTED | 0.00 s | details |
#13 | ACCEPTED | 0.00 s | details |
#14 | ACCEPTED | 0.00 s | details |
#15 | ACCEPTED | 0.00 s | details |
#16 | WRONG ANSWER | 0.00 s | details |
#17 | ACCEPTED | 0.00 s | details |
#18 | ACCEPTED | 0.00 s | details |
#19 | ACCEPTED | 0.00 s | details |
#20 | ACCEPTED | 0.00 s | details |
#21 | WRONG ANSWER | 0.00 s | details |
#22 | ACCEPTED | 0.00 s | details |
#23 | ACCEPTED | 0.00 s | details |
#24 | ACCEPTED | 0.00 s | details |
#25 | ACCEPTED | 0.00 s | details |
#26 | ACCEPTED | 0.00 s | details |
#27 | ACCEPTED | 0.00 s | details |
#28 | ACCEPTED | 0.00 s | details |
#29 | ACCEPTED | 0.00 s | details |
#30 | ACCEPTED | 0.00 s | details |
#31 | ACCEPTED | 0.00 s | details |
#32 | ACCEPTED | 0.00 s | details |
#33 | ACCEPTED | 0.00 s | details |
#34 | ACCEPTED | 0.00 s | details |
#35 | ACCEPTED | 0.00 s | details |
#36 | ACCEPTED | 0.00 s | details |
#37 | ACCEPTED | 0.00 s | details |
#38 | ACCEPTED | 0.00 s | details |
#39 | ACCEPTED | 0.00 s | details |
#40 | ACCEPTED | 0.00 s | details |
#41 | ACCEPTED | 0.00 s | details |
#42 | ACCEPTED | 0.00 s | details |
#43 | ACCEPTED | 0.00 s | details |
#44 | ACCEPTED | 0.00 s | details |
#45 | ACCEPTED | 0.00 s | details |
#46 | ACCEPTED | 0.00 s | details |
#47 | ACCEPTED | 0.00 s | details |
#48 | ACCEPTED | 0.00 s | details |
#49 | ACCEPTED | 0.00 s | details |
#50 | ACCEPTED | 0.00 s | details |
#51 | ACCEPTED | 0.00 s | details |
#52 | ACCEPTED | 0.00 s | details |
#53 | ACCEPTED | 0.00 s | details |
#54 | ACCEPTED | 0.00 s | details |
#55 | ACCEPTED | 0.00 s | details |
#56 | ACCEPTED | 0.00 s | details |
#57 | ACCEPTED | 0.00 s | details |
#58 | ACCEPTED | 0.00 s | details |
#59 | ACCEPTED | 0.00 s | details |
#60 | ACCEPTED | 0.00 s | details |
#61 | ACCEPTED | 0.00 s | details |
#62 | ACCEPTED | 0.00 s | details |
#63 | ACCEPTED | 0.00 s | details |
#64 | ACCEPTED | 0.00 s | details |
#65 | ACCEPTED | 0.00 s | details |
#66 | ACCEPTED | 0.01 s | details |
#67 | ACCEPTED | 0.01 s | details |
#68 | ACCEPTED | 0.01 s | details |
#69 | ACCEPTED | 0.01 s | details |
#70 | ACCEPTED | 0.01 s | details |
#71 | ACCEPTED | 0.05 s | details |
#72 | ACCEPTED | 0.05 s | details |
#73 | ACCEPTED | 0.05 s | details |
#74 | ACCEPTED | 0.05 s | details |
#75 | ACCEPTED | 0.05 s | details |
Code
#include <iostream> #include <cmath> #include <vector> #include <cassert> #include <algorithm> using namespace std; #define rep(i, a, b) for(int i=a;i<(b);++i) #define all(x) begin(x),end(x) #define sz(x) int((x).size()) using ll = long long; using pii = pair<int,int>; using vi = vector<int>; int main() { int n, x, y; cin >> n >> x >> y; int h; cin >> h; rep(i,1,n) { int a; cin >> a; h = __gcd(a,h); } if (!(x % h == 0 && y % h == 0)) { cout << "No\n"; return 0; } if (n == 1 && (x+y) % 2 != 0) { cout << "No\n"; return 0; } cout << "Yes\n"; }
Test details
Test 1
Verdict: ACCEPTED
input |
---|
1 5 10 8 |
correct output |
---|
No |
user output |
---|
No |
Test 2
Verdict: ACCEPTED
input |
---|
1 5 2 112 |
correct output |
---|
No |
user output |
---|
No |
Test 3
Verdict: ACCEPTED
input |
---|
1 31 31 31 |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 4
Verdict: ACCEPTED
input |
---|
1 10 10 6 |
correct output |
---|
No |
user output |
---|
No |
Test 5
Verdict: ACCEPTED
input |
---|
1 22 22 22 |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 6
Verdict: ACCEPTED
input |
---|
2 5 10 8 10 |
correct output |
---|
No |
user output |
---|
No |
Test 7
Verdict: ACCEPTED
input |
---|
2 5 2 96 96 |
correct output |
---|
No |
user output |
---|
No |
Test 8
Verdict: ACCEPTED
input |
---|
2 6 1 8 9 |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 9
Verdict: ACCEPTED
input |
---|
2 87 87 174 174 |
correct output |
---|
No |
user output |
---|
No |
Test 10
Verdict: ACCEPTED
input |
---|
2 3 1 9 9 |
correct output |
---|
No |
user output |
---|
No |
Test 11
Verdict: ACCEPTED
input |
---|
3 5 10 8 10 1 |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 12
Verdict: ACCEPTED
input |
---|
3 5 2 45 45 45 |
correct output |
---|
No |
user output |
---|
No |
Test 13
Verdict: ACCEPTED
input |
---|
3 6 1 8 9 3 |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 14
Verdict: ACCEPTED
input |
---|
3 73 73 146 146 146 |
correct output |
---|
No |
user output |
---|
No |
Test 15
Verdict: ACCEPTED
input |
---|
3 3 1 9 9 3 |
correct output |
---|
No |
user output |
---|
No |
Test 16
Verdict: WRONG ANSWER
input |
---|
2 2 1 1 7 |
correct output |
---|
No |
user output |
---|
Yes |
Test 17
Verdict: ACCEPTED
input |
---|
2 2 5 8 9 |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 18
Verdict: ACCEPTED
input |
---|
2 8 7 182 182 |
correct output |
---|
No |
user output |
---|
No |
Test 19
Verdict: ACCEPTED
input |
---|
2 6 10 38 38 |
correct output |
---|
No |
user output |
---|
No |
Test 20
Verdict: ACCEPTED
input |
---|
2 9 9 2 6 |
correct output |
---|
No |
user output |
---|
No |
Test 21
Verdict: WRONG ANSWER
input |
---|
3 2 1 1 7 5 |
correct output |
---|
No |
user output |
---|
Yes |
Test 22
Verdict: ACCEPTED
input |
---|
3 2 5 8 9 3 |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 23
Verdict: ACCEPTED
input |
---|
3 98 98 98 98 98 |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 24
Verdict: ACCEPTED
input |
---|
3 6 10 8 7 9 |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 25
Verdict: ACCEPTED
input |
---|
3 9 9 2 6 1 |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 26
Verdict: ACCEPTED
input |
---|
4 5 10 8 10 1 2 |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 27
Verdict: ACCEPTED
input |
---|
4 5 2 1 10 6 10 |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 28
Verdict: ACCEPTED
input |
---|
4 6 1 116 116 116 116 |
correct output |
---|
No |
user output |
---|
No |
Test 29
Verdict: ACCEPTED
input |
---|
4 62 62 124 124 124 124 |
correct output |
---|
No |
user output |
---|
No |
Test 30
Verdict: ACCEPTED
input |
---|
4 3 1 99 99 99 99 |
correct output |
---|
No |
user output |
---|
No |
Test 31
Verdict: ACCEPTED
input |
---|
5 5 10 16 16 16 16 16 |
correct output |
---|
No |
user output |
---|
No |
Test 32
Verdict: ACCEPTED
input |
---|
5 5 2 1 10 6 10 5 |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 33
Verdict: ACCEPTED
input |
---|
5 91 91 91 91 91 91 91 |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 34
Verdict: ACCEPTED
input |
---|
5 10 10 142 142 142 142 142 |
correct output |
---|
No |
user output |
---|
No |
Test 35
Verdict: ACCEPTED
input |
---|
5 50 50 50 50 50 50 50 |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 36
Verdict: ACCEPTED
input |
---|
10 447773956 773442532 122754 137572548 324627094 157... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 37
Verdict: ACCEPTED
input |
---|
10 468145963 198730372 27838070 590195580 467423853 5... |
correct output |
---|
No |
user output |
---|
No |
Test 38
Verdict: ACCEPTED
input |
---|
10 591414747 75940263 760367935 901888417 312356591 ... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 39
Verdict: ACCEPTED
input |
---|
10 967034924 587586158 185430168 918715986 767527812 ... |
correct output |
---|
No |
user output |
---|
No |
Test 40
Verdict: ACCEPTED
input |
---|
10 238363353 59249204 934941692 892631472 221963002 ... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 41
Verdict: ACCEPTED
input |
---|
100 447773962 773442532 122816 137572579 324627123 157... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 42
Verdict: ACCEPTED
input |
---|
100 468145963 198730372 27838076 590195590 467423861 5... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 43
Verdict: ACCEPTED
input |
---|
100 591414747 75940263 760367920 901888400 312356580 ... |
correct output |
---|
No |
user output |
---|
No |
Test 44
Verdict: ACCEPTED
input |
---|
100 967034924 587586158 185430194 918715995 767527830 ... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 45
Verdict: ACCEPTED
input |
---|
100 238363353 59249204 934941692 892631472 221963002 ... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 46
Verdict: ACCEPTED
input |
---|
1000 193563111 73343920 20911381 713738007 497377109 2... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 47
Verdict: ACCEPTED
input |
---|
1000 165531091 479126951 794622300 937792320 282732340 ... |
correct output |
---|
No |
user output |
---|
No |
Test 48
Verdict: ACCEPTED
input |
---|
1000 835051605 652127789 255057939 922810245 885062330 ... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 49
Verdict: ACCEPTED
input |
---|
1000 551842440 989875540 830179640 707687000 934614600 ... |
correct output |
---|
No |
user output |
---|
No |
Test 50
Verdict: ACCEPTED
input |
---|
1000 911411025 873575332 192088036 634962580 58372034 1... |
correct output |
---|
No |
user output |
---|
No |
Test 51
Verdict: ACCEPTED
input |
---|
1000 657312726 129662684 181537270 324043958 468214806 ... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 52
Verdict: ACCEPTED
input |
---|
1000 402714522 759753451 687521851 337069943 912780542 ... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 53
Verdict: ACCEPTED
input |
---|
1000 914812458 132277432 79353385 137043347 960925660 9... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 54
Verdict: ACCEPTED
input |
---|
1000 162813587 135741125 932808138 850211477 994160127 ... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 55
Verdict: ACCEPTED
input |
---|
1000 210552500 313067625 754598250 398848375 444198100 ... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 56
Verdict: ACCEPTED
input |
---|
1000 102595150 461729870 993215160 274295630 368909100 ... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 57
Verdict: ACCEPTED
input |
---|
1000 84976386 253677050 233563210 613601269 384997082 ... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 58
Verdict: ACCEPTED
input |
---|
1000 772114122 881808164 532413050 693522980 397009010 ... |
correct output |
---|
No |
user output |
---|
No |
Test 59
Verdict: ACCEPTED
input |
---|
1000 162347439 569957770 131868530 341372779 824691456 ... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 60
Verdict: ACCEPTED
input |
---|
1000 431412671 345615445 712283313 272616673 2158448 30... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 61
Verdict: ACCEPTED
input |
---|
1000 900749514 942171039 514249176 442729056 294462840 ... |
correct output |
---|
No |
user output |
---|
No |
Test 62
Verdict: ACCEPTED
input |
---|
1000 64410431 121071591 33343496 264117210 727055618 6... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 63
Verdict: ACCEPTED
input |
---|
1000 265116311 516856979 858462072 387315344 377287820 ... |
correct output |
---|
No |
user output |
---|
No |
Test 64
Verdict: ACCEPTED
input |
---|
1000 481775878 746812254 740990455 5066671 602160022 41... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 65
Verdict: ACCEPTED
input |
---|
1000 274084144 960687179 696459395 627492163 271745075 ... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 66
Verdict: ACCEPTED
input |
---|
10000 52317939 858211636 310429135 729974978 774131725 ... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 67
Verdict: ACCEPTED
input |
---|
10000 223832798 753727010 517201100 784375537 451549274 ... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 68
Verdict: ACCEPTED
input |
---|
10000 555444372 718437552 198629856 821906136 839321976 ... |
correct output |
---|
No |
user output |
---|
No |
Test 69
Verdict: ACCEPTED
input |
---|
10000 316145889 751095345 56752214 340900389 236295457 3... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 70
Verdict: ACCEPTED
input |
---|
10000 934288674 747395152 625215095 465197604 299401040 ... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 71
Verdict: ACCEPTED
input |
---|
100000 307147957 31129494 346102496 827117209 656524198 ... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 72
Verdict: ACCEPTED
input |
---|
100000 922225334 64055691 400195554 452086094 596064992 ... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 73
Verdict: ACCEPTED
input |
---|
100000 266835718 740541026 483157431 718635153 441244325 ... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 74
Verdict: ACCEPTED
input |
---|
100000 41405289 210199839 837626491 454596059 99539902 4... |
correct output |
---|
Yes |
user output |
---|
Yes |
Test 75
Verdict: ACCEPTED
input |
---|
100000 491832755 482963780 331087868 726411502 248557321 ... |
correct output |
---|
Yes |
user output |
---|
Yes |