QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#571557 | #2554. AND PLUS OR | Urd | AC ✓ | 721ms | 7812kb | C++17 | 791b | 2024-09-18 00:31:42 | 2024-09-18 00:31:43 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3564kb
input:
2 0 1 1 2
output:
-1
result:
ok Correct
Test #2:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
2 0 1 1 3
output:
1 2
result:
ok Correct
Test #3:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
0 100
output:
-1
result:
ok Correct
Test #4:
score: 0
Accepted
time: 2ms
memory: 3672kb
input:
12 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...
output:
-1
result:
ok Correct
Test #5:
score: 0
Accepted
time: 2ms
memory: 3728kb
input:
12 0 1 1 2 1 2 2 3 1 2 2 3 2 3 3 4 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 3 4 4 5 4 5 5 6 4 5 5 6 5 6 6 7 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3...
output:
-1
result:
ok Correct
Test #6:
score: 0
Accepted
time: 8ms
memory: 3660kb
input:
14 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...
output:
-1
result:
ok Correct
Test #7:
score: 0
Accepted
time: 7ms
memory: 3736kb
input:
14 0 1 1 2 1 2 2 3 1 2 2 3 2 3 3 4 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 3 4 4 5 4 5 5 6 4 5 5 6 5 6 6 7 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3...
output:
-1
result:
ok Correct
Test #8:
score: 0
Accepted
time: 71ms
memory: 4112kb
input:
17 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...
output:
-1
result:
ok Correct
Test #9:
score: 0
Accepted
time: 74ms
memory: 4220kb
input:
17 0 1 1 2 1 2 2 3 1 2 2 3 2 3 3 4 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 3 4 4 5 4 5 5 6 4 5 5 6 5 6 6 7 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3...
output:
-1
result:
ok Correct
Test #10:
score: 0
Accepted
time: 162ms
memory: 5756kb
input:
18 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...
output:
-1
result:
ok Correct
Test #11:
score: 0
Accepted
time: 159ms
memory: 6440kb
input:
18 0 1 1 2 1 2 2 3 1 2 2 3 2 3 3 4 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 3 4 4 5 4 5 5 6 4 5 5 6 5 6 6 7 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3...
output:
-1
result:
ok Correct
Test #12:
score: 0
Accepted
time: 714ms
memory: 7756kb
input:
20 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...
output:
-1
result:
ok Correct
Test #13:
score: 0
Accepted
time: 692ms
memory: 7812kb
input:
20 0 1 1 2 1 2 2 3 1 2 2 3 2 3 3 4 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 3 4 4 5 4 5 5 6 4 5 5 6 5 6 6 7 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3...
output:
-1
result:
ok Correct
Test #14:
score: 0
Accepted
time: 1ms
memory: 3680kb
input:
12 9999998 9999996 9999996 9999992 9999996 9999992 9999992 9999984 9999996 9999992 9999992 9999984 9999992 9999984 9999984 9999968 9999996 9999992 9999992 9999984 9999992 9999984 9999984 9999968 9999992 9999984 9999984 9999968 9999984 9999968 9999968 9999936 9999996 9999992 9999992 9999984 9999992 9...
output:
1024 2048
result:
ok Correct
Test #15:
score: 0
Accepted
time: 1ms
memory: 3700kb
input:
14 9999998 9999996 9999996 9999992 9999996 9999992 9999992 9999984 9999996 9999992 9999992 9999984 9999992 9999984 9999984 9999968 9999996 9999992 9999992 9999984 9999992 9999984 9999984 9999968 9999992 9999984 9999984 9999968 9999984 9999968 9999968 9999936 9999996 9999992 9999992 9999984 9999992 9...
output:
4096 8192
result:
ok Correct
Test #16:
score: 0
Accepted
time: 7ms
memory: 5836kb
input:
17 9999998 9999996 9999996 9999992 9999996 9999992 9999992 9999984 9999996 9999992 9999992 9999984 9999992 9999984 9999984 9999968 9999996 9999992 9999992 9999984 9999992 9999984 9999984 9999968 9999992 9999984 9999984 9999968 9999984 9999968 9999968 9999936 9999996 9999992 9999992 9999984 9999992 9...
output:
32768 65536
result:
ok Correct
Test #17:
score: 0
Accepted
time: 50ms
memory: 7724kb
input:
20 9999998 9999996 9999996 9999992 9999996 9999992 9999992 9999984 9999996 9999992 9999992 9999984 9999992 9999984 9999984 9999968 9999996 9999992 9999992 9999984 9999992 9999984 9999984 9999968 9999992 9999984 9999984 9999968 9999984 9999968 9999968 9999936 9999996 9999992 9999992 9999984 9999992 9...
output:
262144 524288
result:
ok Correct
Test #18:
score: 0
Accepted
time: 721ms
memory: 7808kb
input:
20 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 ...
output:
-1
result:
ok Correct
Test #19:
score: 0
Accepted
time: 8ms
memory: 3696kb
input:
14 0 287591 280332 513369 288652 477661 551010 685465 208821 396938 464307 597870 467487 557022 704999 739980 383454 590303 579332 731627 653998 762265 831902 885615 579099 686474 750131 802952 819657 828450 972715 926954 267900 553415 491856 722817 531352 718285 737334 869713 474407 660448 673517 8...
output:
-1
result:
ok Correct
Test #20:
score: 0
Accepted
time: 76ms
memory: 4148kb
input:
17 0 340669 312301 598416 390680 632767 685007 872540 238892 480087 526347 712988 599586 742199 869067 957126 467164 727091 695011 900384 839736 1001081 1049609 1156400 692880 853333 895881 1001780 1035466 1097337 1220493 1227810 345073 683666 600998 885037 710553 950564 948504 1133961 581651 820770...
output:
-1
result:
ok Correct
Test #21:
score: 0
Accepted
time: 717ms
memory: 7688kb
input:
20 0 434418 373306 753170 489819 825655 845151 1126433 260418 595362 608878 889268 720251 956613 1050737 1232545 555130 908806 843982 1143104 1026841 1281935 1297719 1498259 802372 1056574 1066378 1266026 1244097 1399717 1490129 1591195 459532 891874 776462 1154250 924151 1257911 1223107 1502313 717...
output:
-1
result:
ok Correct
Test #22:
score: 0
Accepted
time: 1ms
memory: 3728kb
input:
14 0 287591 280332 513369 288652 477661 551010 685465 208821 396938 464307 597870 467487 557022 704999 739980 383454 590303 579332 731627 653998 762265 831902 885615 579099 686474 750131 802952 819657 828450 972715 926954 267900 553415 491856 722817 531352 718285 737334 869713 474407 660448 673517 8...
output:
197 4292
result:
ok Correct
Test #23:
score: 0
Accepted
time: 8ms
memory: 4160kb
input:
17 0 340669 312301 598416 390680 632767 685007 872540 238892 480087 526347 712988 599586 742199 869067 957126 467164 727091 695011 900384 839736 1001081 1049609 1156400 692880 853333 895881 1001780 1035466 1097337 1220493 1227810 345073 683666 600998 885037 710553 950564 948504 1133961 581651 820770...
output:
1547 3593
result:
ok Correct
Test #24:
score: 0
Accepted
time: 55ms
memory: 7692kb
input:
20 0 434418 373306 753170 489819 825655 845151 1126433 260418 595362 608878 889268 720251 956613 1050737 1232545 555130 908806 843982 1143104 1026841 1281935 1297719 1498259 802372 1056574 1066378 1266026 1244097 1399717 1490129 1591195 459532 891874 776462 1154250 924151 1257911 1223107 1502313 717...
output:
3899 7994
result:
ok Correct
Test #25:
score: 0
Accepted
time: 7ms
memory: 3656kb
input:
14 0 1 1 2 1 2 2 3 1 2 2 3 2 3 3 4 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 3 4 4 5 4 5 5 6 4 5 5 6 5 6 6 7 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3...
output:
-1
result:
ok Correct
Test #26:
score: 0
Accepted
time: 74ms
memory: 6056kb
input:
17 0 1 1 2 1 2 2 3 1 2 2 3 2 3 3 4 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 3 4 4 5 4 5 5 6 4 5 5 6 5 6 6 7 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3...
output:
-1
result:
ok Correct
Test #27:
score: 0
Accepted
time: 704ms
memory: 7768kb
input:
20 0 1 1 2 1 2 2 3 1 2 2 3 2 3 3 4 1 2 2 3 2 3 2 3 2 3 3 4 3 4 3 4 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3 4 3 4 3 4 4 5 4 5 4 5 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3 4 3 4 3 4 4 5 4 5 4 5 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 3 4 4 5 4 5 4 5 4 5 5 6 5 6 5 6 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3...
output:
-1
result:
ok Correct
Test #28:
score: 0
Accepted
time: 1ms
memory: 3780kb
input:
14 0 1 1 2 1 2 2 3 1 2 2 3 2 3 3 4 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 3 4 4 5 4 5 5 6 4 5 5 6 5 6 6 7 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3...
output:
591 2631
result:
ok Correct
Test #29:
score: 0
Accepted
time: 7ms
memory: 5832kb
input:
17 0 1 1 2 1 2 2 3 1 2 2 3 2 3 3 4 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 3 4 4 5 4 5 5 6 4 5 5 6 5 6 6 7 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3...
output:
4399 20779
result:
ok Correct
Test #30:
score: 0
Accepted
time: 102ms
memory: 7800kb
input:
20 0 1 1 2 1 2 2 3 1 2 2 3 2 3 3 4 1 2 2 3 2 3 2 3 2 3 3 4 3 4 3 4 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3 4 3 4 3 4 4 5 4 5 4 5 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3 4 3 4 3 4 4 5 4 5 4 5 2 3 3 4 3 4 4 5 3 4 4 5 4 5 5 6 3 4 4 5 4 5 4 5 4 5 5 6 5 6 5 6 1 2 2 3 2 3 3 4 2 3 3 4 3 4 4 5 2 3 3 4 3...
output:
91469 222540
result:
ok Correct
Test #31:
score: 0
Accepted
time: 1ms
memory: 3660kb
input:
14 0 500001 500002 1000003 500004 1000005 1000006 1500007 500008 1000009 1000010 1500011 1000012 1500013 1500014 2000015 500016 1000017 1000018 1500019 1000020 1500021 1500022 2000023 1000024 1500025 1500026 2000027 1500028 2000029 2000030 2500031 500032 1000033 1000034 1500035 1000036 1500037 15000...
output:
229 357
result:
ok Correct
Test #32:
score: 0
Accepted
time: 7ms
memory: 4228kb
input:
17 0 500001 500002 1000003 500004 1000005 1000006 1500007 500008 1000009 1000010 1500011 1000012 1500013 1500014 2000015 500016 1000017 1000018 1500019 1000020 1500021 1500022 2000023 1000024 1500025 1500026 2000027 1500028 2000029 2000030 2500031 500032 1000033 1000034 1500035 1000036 1500037 15000...
output:
229 357
result:
ok Correct
Test #33:
score: 0
Accepted
time: 11ms
memory: 4616kb
input:
18 0 500001 500002 1000003 500004 1000005 1000006 1500007 500008 1000009 1000010 1500011 1000012 1500013 1500014 2000015 500016 1000017 1000018 1500019 1000020 1500021 1500022 2000023 1000024 1500025 1500026 2000027 1500028 2000029 2000030 2500031 500032 1000033 1000034 1500035 1000036 1500037 15000...
output:
229 357
result:
ok Correct
Test #34:
score: 0
Accepted
time: 3ms
memory: 3772kb
input:
14 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...
output:
8191 12287
result:
ok Correct
Test #35:
score: 0
Accepted
time: 26ms
memory: 6080kb
input:
17 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...
output:
65535 98303
result:
ok Correct
Test #36:
score: 0
Accepted
time: 227ms
memory: 7724kb
input:
20 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...
output:
524287 786431
result:
ok Correct
Test #37:
score: 0
Accepted
time: 210ms
memory: 7684kb
input:
20 9999998 9999996 9999996 9999992 9999996 9999992 9999992 9999984 9999996 9999992 9999992 9999984 9999992 9999984 9999984 9999968 9999996 9999992 9999992 9999984 9999992 9999984 9999984 9999968 9999992 9999984 9999984 9999968 9999984 9999968 9999968 9999936 9999996 9999992 9999992 9999984 9999992 9...
output:
491520 753664
result:
ok Correct
Test #38:
score: 0
Accepted
time: 221ms
memory: 7756kb
input:
20 9999998 9999996 9999996 9999992 9999996 9999992 9999992 9999984 9999996 9999992 9999992 9999984 9999992 9999984 9999984 9999968 9999996 9999992 9999992 9999984 9999992 9999984 9999984 9999968 9999992 9999984 9999984 9999968 9999984 9999968 9999968 9999936 9999996 9999992 9999992 9999984 9999992 9...
output:
507904 770048
result:
ok Correct
Test #39:
score: 0
Accepted
time: 230ms
memory: 7744kb
input:
20 9999998 9999996 9999996 9999992 9999996 9999992 9999992 9999984 9999996 9999992 9999992 9999984 9999992 9999984 9999984 9999968 9999996 9999992 9999992 9999984 9999992 9999984 9999984 9999968 9999992 9999984 9999984 9999968 9999984 9999968 9999968 9999936 9999996 9999992 9999992 9999984 9999992 9...
output:
516096 778240
result:
ok Correct
Test #40:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
3 2040 17078 28734 21453 5210 16891 6250 12181
output:
3 6
result:
ok Correct