QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#296838 | #2554. AND PLUS OR | houzhiyuan | AC ✓ | 842ms | 7348kb | C++14 | 1.2kb | 2024-01-03 18:04:07 | 2024-01-03 18:04:07 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3544kb
input:
2 0 1 1 2
output:
-1
result:
ok Correct
Test #2:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
2 0 1 1 3
output:
1 2
result:
ok Correct
Test #3:
score: 0
Accepted
time: 0ms
memory: 3548kb
input:
0 100
output:
-1
result:
ok Correct
Test #4:
score: 0
Accepted
time: 2ms
memory: 3596kb
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: 3560kb
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: 6ms
memory: 3708kb
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: 9ms
memory: 3672kb
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: 84ms
memory: 3556kb
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: 85ms
memory: 3548kb
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: 183ms
memory: 4080kb
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: 175ms
memory: 4156kb
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: 832ms
memory: 7200kb
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: 818ms
memory: 7288kb
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: 3780kb
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: 3616kb
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: 2ms
memory: 3764kb
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: 48ms
memory: 7276kb
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: 834ms
memory: 7180kb
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: 10ms
memory: 3668kb
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: 85ms
memory: 3720kb
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: 842ms
memory: 7208kb
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: 3704kb
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: 3640kb
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: 56ms
memory: 7220kb
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: 8ms
memory: 3616kb
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: 84ms
memory: 3576kb
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: 812ms
memory: 7256kb
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: 3896kb
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: 3544kb
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: 111ms
memory: 7348kb
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: 3608kb
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: 8ms
memory: 3596kb
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: 15ms
memory: 4168kb
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: 3620kb
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: 21ms
memory: 3808kb
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: 255ms
memory: 7196kb
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: 235ms
memory: 7192kb
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: 247ms
memory: 7268kb
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: 248ms
memory: 7188kb
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: 1ms
memory: 3600kb
input:
3 2040 17078 28734 21453 5210 16891 6250 12181
output:
3 6
result:
ok Correct