QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#108365 | #6394. Turn on the Light | GuanYunchang | AC ✓ | 4ms | 3788kb | C++11 | 600b | 2023-05-24 19:35:02 | 2023-05-24 19:35:08 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
详细
Test #1:
score: 100
Accepted
time: 2ms
memory: 3528kb
input:
3 1 2
output:
? 1 ? 2 ! 3
result:
ok Correct position at 3
Test #2:
score: 0
Accepted
time: 2ms
memory: 3616kb
input:
10 1 0 1 0 0
output:
? 1 ? 6 ? 2 ? 4 ? 3 ! 3
result:
ok Correct position at 3
Test #3:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
9 1 2 3 3
output:
? 1 ? 5 ? 7 ? 8 ! 8
result:
ok Correct position at 8
Test #4:
score: 0
Accepted
time: 3ms
memory: 3488kb
input:
8 1 0 1 0 0
output:
? 1 ? 5 ? 2 ? 4 ? 3 ! 3
result:
ok Correct position at 3
Test #5:
score: 0
Accepted
time: 2ms
memory: 3556kb
input:
7 1 2 3
output:
? 1 ? 4 ? 6 ! 7
result:
ok Correct position at 7
Test #6:
score: 0
Accepted
time: 1ms
memory: 3604kb
input:
6 1 0 1 1
output:
? 1 ? 4 ? 2 ? 3 ! 3
result:
ok Correct position at 3
Test #7:
score: 0
Accepted
time: 0ms
memory: 3720kb
input:
5 1 2 3
output:
? 1 ? 3 ? 4 ! 5
result:
ok Correct position at 5
Test #8:
score: 0
Accepted
time: 2ms
memory: 3564kb
input:
4 1 1
output:
? 1 ? 3 ! 3
result:
ok Correct position at 3
Test #9:
score: 0
Accepted
time: 2ms
memory: 3736kb
input:
3 1 1
output:
? 1 ? 2 ! 2
result:
ok Correct position at 2
Test #10:
score: 0
Accepted
time: 0ms
memory: 3784kb
input:
2 1
output:
? 1 ! 2
result:
ok Correct position at 2
Test #11:
score: 0
Accepted
time: 0ms
memory: 3736kb
input:
1
output:
! 1
result:
ok Correct position at 1
Test #12:
score: 0
Accepted
time: 0ms
memory: 3488kb
input:
1000000 1 0 1 0 1 0 1 0 1 0 1 0 1 2 1 2 1 0 1 0 1 0 1 0 1 2 3 2 3 2 2
output:
? 1 ? 500001 ? 2 ? 250002 ? 3 ? 125003 ? 4 ? 62504 ? 5 ? 31255 ? 6 ? 15631 ? 7 ? 7819 ? 11725 ? 9772 ? 10749 ? 10261 ? 9773 ? 10017 ? 9774 ? 9896 ? 9775 ? 9836 ? 9776 ? 9806 ? 9821 ? 9829 ? 9825 ? 9827 ? 9826 ! 9826
result:
ok Correct position at 9826
Test #13:
score: 0
Accepted
time: 4ms
memory: 3568kb
input:
999999 1 2 3 2 3 2 1 0 1 2 1 0 1 2 1 2 3 2 1 0 1 0 1 0 0
output:
? 1 ? 500000 ? 750000 ? 875000 ? 812500 ? 843750 ? 828125 ? 820313 ? 812501 ? 816407 ? 818360 ? 817384 ? 816408 ? 816896 ? 817140 ? 817018 ? 817079 ? 817110 ? 817095 ? 817087 ? 817080 ? 817084 ? 817081 ? 817083 ? 817082 ! 817082
result:
ok Correct position at 817082
Test #14:
score: 0
Accepted
time: 4ms
memory: 3620kb
input:
999998 1 0 1 0 1 0 1 0 1 2 1 0 1 2 1 0 1 2 3 2 1 0 1 0 1 2 1 2 2
output:
? 1 ? 500000 ? 2 ? 250001 ? 3 ? 125002 ? 4 ? 62503 ? 5 ? 31254 ? 46879 ? 39067 ? 31255 ? 35161 ? 37114 ? 36138 ? 35162 ? 35650 ? 35894 ? 36016 ? 35955 ? 35925 ? 35895 ? 35910 ? 35896 ? 35903 ? 35907 ? 35905 ? 35906 ! 35906
result:
ok Correct position at 35906
Test #15:
score: 0
Accepted
time: 2ms
memory: 3532kb
input:
999997 1 2 3 2 3 2 1 0 1 2 1 0 1 2 1 2 3 2 1 0 1 0 1 0 0
output:
? 1 ? 499999 ? 749998 ? 874998 ? 812498 ? 843748 ? 828123 ? 820311 ? 812499 ? 816405 ? 818358 ? 817382 ? 816406 ? 816894 ? 817138 ? 817016 ? 817077 ? 817108 ? 817093 ? 817085 ? 817078 ? 817082 ? 817079 ? 817081 ? 817080 ! 817080
result:
ok Correct position at 817080
Test #16:
score: 0
Accepted
time: 0ms
memory: 3604kb
input:
999996 1 0 1 0 1 0 1 0 1 2 1 0 1 2 1 0 1 2 3 2 1 0 1 0 1 2 1 2 2
output:
? 1 ? 499999 ? 2 ? 250001 ? 3 ? 125002 ? 4 ? 62503 ? 5 ? 31254 ? 46879 ? 39067 ? 31255 ? 35161 ? 37114 ? 36138 ? 35162 ? 35650 ? 35894 ? 36016 ? 35955 ? 35925 ? 35895 ? 35910 ? 35896 ? 35903 ? 35907 ? 35905 ? 35906 ! 35906
result:
ok Correct position at 35906
Test #17:
score: 0
Accepted
time: 1ms
memory: 3620kb
input:
999995 1 2 3 4 5 4 3 2 1 0 1 0 1 2 1 2 3 2 1 0 1 0 1 0 0
output:
? 1 ? 499998 ? 749997 ? 874996 ? 937496 ? 968746 ? 953121 ? 945309 ? 941403 ? 939450 ? 937497 ? 938474 ? 937498 ? 937986 ? 938230 ? 938108 ? 938169 ? 938200 ? 938185 ? 938177 ? 938170 ? 938174 ? 938171 ? 938173 ? 938172 ! 938172
result:
ok Correct position at 938172
Test #18:
score: 0
Accepted
time: 4ms
memory: 3676kb
input:
999994 1 0 1 0 1 0 1 0 1 2 1 0 1 2 1 0 1 2 3 2 1 0 1 0 1 2 1 2 2
output:
? 1 ? 499998 ? 2 ? 250000 ? 3 ? 125002 ? 4 ? 62503 ? 5 ? 31254 ? 46879 ? 39067 ? 31255 ? 35161 ? 37114 ? 36138 ? 35162 ? 35650 ? 35894 ? 36016 ? 35955 ? 35925 ? 35895 ? 35910 ? 35896 ? 35903 ? 35907 ? 35905 ? 35906 ! 35906
result:
ok Correct position at 35906
Test #19:
score: 0
Accepted
time: 4ms
memory: 3708kb
input:
999993 1 2 3 4 5 4 3 2 1 0 1 0 1 2 1 2 3 2 1 0 1 0 1 0 0
output:
? 1 ? 499997 ? 749995 ? 874994 ? 937494 ? 968744 ? 953119 ? 945307 ? 941401 ? 939448 ? 937495 ? 938472 ? 937496 ? 937984 ? 938228 ? 938106 ? 938167 ? 938198 ? 938183 ? 938175 ? 938168 ? 938172 ? 938169 ? 938171 ? 938170 ! 938170
result:
ok Correct position at 938170
Test #20:
score: 0
Accepted
time: 0ms
memory: 3564kb
input:
999992 1 0 1 0 1 0 1 0 1 2 1 0 1 2 1 0 1 2 3 2 1 0 1 0 1 2 1 2 2
output:
? 1 ? 499997 ? 2 ? 250000 ? 3 ? 125002 ? 4 ? 62503 ? 5 ? 31254 ? 46879 ? 39067 ? 31255 ? 35161 ? 37114 ? 36138 ? 35162 ? 35650 ? 35894 ? 36016 ? 35955 ? 35925 ? 35895 ? 35910 ? 35896 ? 35903 ? 35907 ? 35905 ? 35906 ! 35906
result:
ok Correct position at 35906
Test #21:
score: 0
Accepted
time: 4ms
memory: 3540kb
input:
999991 1 2 3 2 1 0 1 0 1 2 1 0 1 2 1 2 3 4 3 2 1 0 1 0 0
output:
? 1 ? 499996 ? 749994 ? 874993 ? 812494 ? 781244 ? 749995 ? 765620 ? 749996 ? 757808 ? 761714 ? 759761 ? 757809 ? 758785 ? 759273 ? 759029 ? 759151 ? 759212 ? 759243 ? 759228 ? 759220 ? 759216 ? 759213 ? 759215 ? 759214 ! 759214
result:
ok Correct position at 759214
Test #22:
score: 0
Accepted
time: 4ms
memory: 3676kb
input:
1000000 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 2 3 4 3 3
output:
? 1 ? 500001 ? 2 ? 250002 ? 3 ? 125003 ? 4 ? 62504 ? 5 ? 31255 ? 6 ? 15631 ? 7 ? 7819 ? 8 ? 3914 ? 9 ? 1962 ? 10 ? 986 ? 11 ? 499 ? 12 ? 256 ? 13 ? 135 ? 14 ? 75 ? 15 ? 45 ? 16 ? 31 ? 38 ? 42 ? 44 ? 43 ! 43
result:
ok Correct position at 43
Test #23:
score: 0
Accepted
time: 4ms
memory: 3436kb
input:
999999 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 2 1 0 1 2 1 1
output:
? 1 ? 500000 ? 2 ? 250001 ? 3 ? 125002 ? 4 ? 62503 ? 5 ? 31254 ? 6 ? 15630 ? 7 ? 7819 ? 8 ? 3914 ? 9 ? 1962 ? 10 ? 986 ? 11 ? 499 ? 12 ? 256 ? 13 ? 135 ? 14 ? 75 ? 15 ? 45 ? 60 ? 53 ? 46 ? 50 ? 52 ? 51 ! 51
result:
ok Correct position at 51
Test #24:
score: 0
Accepted
time: 3ms
memory: 3528kb
input:
999998 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 2 1 0 1 2 1 1
output:
? 1 ? 500000 ? 2 ? 250001 ? 3 ? 125002 ? 4 ? 62503 ? 5 ? 31254 ? 6 ? 15630 ? 7 ? 7819 ? 8 ? 3914 ? 9 ? 1962 ? 10 ? 986 ? 11 ? 499 ? 12 ? 256 ? 13 ? 135 ? 14 ? 75 ? 15 ? 45 ? 60 ? 53 ? 46 ? 50 ? 52 ? 51 ! 51
result:
ok Correct position at 51
Test #25:
score: 0
Accepted
time: 3ms
memory: 3676kb
input:
999997 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 2 1 0 1 2 1 1
output:
? 1 ? 499999 ? 2 ? 250001 ? 3 ? 125002 ? 4 ? 62503 ? 5 ? 31254 ? 6 ? 15630 ? 7 ? 7819 ? 8 ? 3914 ? 9 ? 1962 ? 10 ? 986 ? 11 ? 499 ? 12 ? 256 ? 13 ? 135 ? 14 ? 75 ? 15 ? 45 ? 60 ? 53 ? 46 ? 50 ? 52 ? 51 ! 51
result:
ok Correct position at 51
Test #26:
score: 0
Accepted
time: 2ms
memory: 3540kb
input:
1000000 1 2 3 4 5 6 7 8 9 10 11 12 13 12 11 10 11 12 11 10 10
output:
? 1 ? 500001 ? 750001 ? 875001 ? 937501 ? 968751 ? 984376 ? 992188 ? 996094 ? 998047 ? 999024 ? 999512 ? 999756 ? 999878 ? 999817 ? 999787 ? 999772 ? 999780 ? 999784 ? 999782 ? 999781 ! 999781
result:
ok Correct position at 999781
Test #27:
score: 0
Accepted
time: 4ms
memory: 3604kb
input:
999999 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 15 16 15 16 16
output:
? 1 ? 500000 ? 750000 ? 875000 ? 937500 ? 968750 ? 984375 ? 992187 ? 996093 ? 998046 ? 999023 ? 999511 ? 999755 ? 999877 ? 999938 ? 999969 ? 999984 ? 999977 ? 999981 ? 999979 ? 999980 ! 999980
result:
ok Correct position at 999980
Test #28:
score: 0
Accepted
time: 1ms
memory: 3620kb
input:
999998 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 15 16 15 16 16
output:
? 1 ? 500000 ? 749999 ? 874999 ? 937499 ? 968749 ? 984374 ? 992186 ? 996092 ? 998045 ? 999022 ? 999510 ? 999754 ? 999876 ? 999937 ? 999968 ? 999983 ? 999976 ? 999980 ? 999978 ? 999979 ! 999979
result:
ok Correct position at 999979
Test #29:
score: 0
Accepted
time: 0ms
memory: 3788kb
input:
999997 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 15 16 15 16 16
output:
? 1 ? 499999 ? 749998 ? 874998 ? 937498 ? 968748 ? 984373 ? 992185 ? 996091 ? 998044 ? 999021 ? 999509 ? 999753 ? 999875 ? 999936 ? 999967 ? 999982 ? 999975 ? 999979 ? 999977 ? 999978 ! 999978
result:
ok Correct position at 999978
Test #30:
score: 0
Accepted
time: 0ms
memory: 3528kb
input:
1000000 1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 13 12 11 12 13 13
output:
? 1 ? 500001 ? 2 ? 250002 ? 375002 ? 437502 ? 468752 ? 484377 ? 492189 ? 496095 ? 498048 ? 499025 ? 499513 ? 499757 ? 499879 ? 499940 ? 499971 ? 499956 ? 499948 ? 499944 ? 499946 ? 499947 ! 499947
result:
ok Correct position at 499947
Test #31:
score: 0
Accepted
time: 4ms
memory: 3592kb
input:
999999 1 2 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 2 3 4 5 4 4
output:
? 1 ? 500000 ? 750000 ? 625000 ? 500001 ? 562501 ? 500002 ? 531252 ? 500003 ? 515628 ? 500004 ? 507816 ? 500005 ? 503911 ? 500006 ? 501959 ? 500007 ? 500983 ? 500008 ? 500496 ? 500009 ? 500253 ? 500010 ? 500132 ? 500011 ? 500072 ? 500012 ? 500042 ? 500057 ? 500065 ? 500069 ? 500071 ? 500070 ! 500070
result:
ok Correct position at 500070
Test #32:
score: 0
Accepted
time: 4ms
memory: 3604kb
input:
999998 1 2 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 2 1 0 1 0 1 0 1 1
output:
? 1 ? 500000 ? 749999 ? 625000 ? 500001 ? 562501 ? 500002 ? 531252 ? 500003 ? 515628 ? 500004 ? 507816 ? 500005 ? 503911 ? 500006 ? 501959 ? 500007 ? 500983 ? 500008 ? 500496 ? 500009 ? 500253 ? 500010 ? 500132 ? 500011 ? 500072 ? 500102 ? 500087 ? 500073 ? 500080 ? 500074 ? 500077 ? 500075 ? 500076...
result:
ok Correct position at 500076
Test #33:
score: 0
Accepted
time: 3ms
memory: 3680kb
input:
999997 1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 13 14 15 14 15 15
output:
? 1 ? 499999 ? 2 ? 250001 ? 375000 ? 437500 ? 468750 ? 484375 ? 492187 ? 496093 ? 498046 ? 499023 ? 499511 ? 499755 ? 499877 ? 499938 ? 499969 ? 499954 ? 499962 ? 499966 ? 499964 ? 499965 ! 499965
result:
ok Correct position at 499965
Test #34:
score: 0
Accepted
time: 1ms
memory: 3612kb
input:
1000000 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0
output:
? 1 ? 500001 ? 2 ? 250002 ? 3 ? 125003 ? 4 ? 62504 ? 5 ? 31255 ? 6 ? 15631 ? 7 ? 7819 ? 8 ? 3914 ? 9 ? 1962 ? 10 ? 986 ? 11 ? 499 ? 12 ? 256 ? 13 ? 135 ? 14 ? 75 ? 15 ? 45 ? 16 ? 31 ? 17 ? 24 ? 18 ? 21 ? 19 ! 19
result:
ok Correct position at 19
Test #35:
score: 0
Accepted
time: 2ms
memory: 3560kb
input:
999999 1 2 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0
output:
? 1 ? 500000 ? 750000 ? 625000 ? 500001 ? 562501 ? 500002 ? 531252 ? 500003 ? 515628 ? 500004 ? 507816 ? 500005 ? 503911 ? 500006 ? 501959 ? 500007 ? 500983 ? 500008 ? 500496 ? 500009 ? 500253 ? 500010 ? 500132 ? 500011 ? 500072 ? 500012 ? 500042 ? 500013 ? 500028 ? 500014 ? 500021 ? 500015 ? 500018...
result:
ok Correct position at 500016
Test #36:
score: 0
Accepted
time: 2ms
memory: 3672kb
input:
999998 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0
output:
? 1 ? 500000 ? 2 ? 250001 ? 3 ? 125002 ? 4 ? 62503 ? 5 ? 31254 ? 6 ? 15630 ? 7 ? 7819 ? 8 ? 3914 ? 9 ? 1962 ? 10 ? 986 ? 11 ? 499 ? 12 ? 256 ? 13 ? 135 ? 14 ? 75 ? 15 ? 45 ? 16 ? 31 ? 17 ? 24 ? 18 ? 21 ? 19 ! 19
result:
ok Correct position at 19
Test #37:
score: 0
Accepted
time: 4ms
memory: 3536kb
input:
999997 1 2 3 2 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0
output:
? 1 ? 499999 ? 749998 ? 874998 ? 812498 ? 781248 ? 749999 ? 765624 ? 750000 ? 757812 ? 750001 ? 753907 ? 750002 ? 751955 ? 750003 ? 750979 ? 750004 ? 750492 ? 750005 ? 750249 ? 750006 ? 750128 ? 750007 ? 750068 ? 750008 ? 750038 ? 750009 ? 750024 ? 750010 ? 750017 ? 750011 ? 750014 ? 750012 ! 750012
result:
ok Correct position at 750012
Test #38:
score: 0
Accepted
time: 3ms
memory: 3620kb
input:
1000000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
output:
? 1 ? 500001 ? 750001 ? 875001 ? 937501 ? 968751 ? 984376 ? 992188 ? 996094 ? 998047 ? 999024 ? 999512 ? 999756 ? 999878 ? 999939 ? 999970 ? 999985 ? 999993 ? 999997 ? 999999 ! 1000000
result:
ok Correct position at 1000000
Test #39:
score: 0
Accepted
time: 4ms
memory: 3544kb
input:
999999 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
output:
? 1 ? 500000 ? 750000 ? 875000 ? 937500 ? 968750 ? 984375 ? 992187 ? 996093 ? 998046 ? 999023 ? 999511 ? 999755 ? 999877 ? 999938 ? 999969 ? 999984 ? 999992 ? 999996 ? 999998 ! 999999
result:
ok Correct position at 999999
Test #40:
score: 0
Accepted
time: 0ms
memory: 3540kb
input:
999998 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
output:
? 1 ? 500000 ? 749999 ? 874999 ? 937499 ? 968749 ? 984374 ? 992186 ? 996092 ? 998045 ? 999022 ? 999510 ? 999754 ? 999876 ? 999937 ? 999968 ? 999983 ? 999991 ? 999995 ? 999997 ! 999998
result:
ok Correct position at 999998
Test #41:
score: 0
Accepted
time: 1ms
memory: 3492kb
input:
999997 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
output:
? 1 ? 499999 ? 749998 ? 874998 ? 937498 ? 968748 ? 984373 ? 992185 ? 996091 ? 998044 ? 999021 ? 999509 ? 999753 ? 999875 ? 999936 ? 999967 ? 999982 ? 999990 ? 999994 ? 999996 ! 999997
result:
ok Correct position at 999997
Test #42:
score: 0
Accepted
time: 3ms
memory: 3528kb
input:
1000000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
output:
? 1 ? 500001 ? 750001 ? 875001 ? 937501 ? 968751 ? 984376 ? 992188 ? 996094 ? 998047 ? 999024 ? 999512 ? 999756 ? 999878 ? 999939 ? 999970 ? 999985 ? 999993 ? 999997 ? 999999 ! 1000000
result:
ok Correct position at 1000000
Test #43:
score: 0
Accepted
time: 2ms
memory: 3536kb
input:
1000000 0
output:
? 1 ! 1
result:
ok Correct position at 1