QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#615131#6394. Turn on the LightZhaoZiLongAC ✓1ms3724kbC++20909b2024-10-05 17:41:012024-10-05 17:41:01

详细

Test #1:

score: 100
Accepted
time: 1ms
memory: 3600kb

input:

3
1
2
2

output:

? 2
? 1
? 3
! 3

result:

ok Correct position at 3

Test #2:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

10
1
2
3
4
5
5

output:

? 5
? 1
? 8
? 6
? 9
? 10
! 10

result:

ok Correct position at 10

Test #3:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

9
1
2
3
4
5
5

output:

? 5
? 1
? 7
? 6
? 8
? 9
! 9

result:

ok Correct position at 9

Test #4:

score: 0
Accepted
time: 0ms
memory: 3720kb

input:

8
1
2
3
4
5
5

output:

? 4
? 1
? 6
? 5
? 7
? 8
! 8

result:

ok Correct position at 8

Test #5:

score: 0
Accepted
time: 0ms
memory: 3672kb

input:

7
1
2
3
4
4

output:

? 4
? 1
? 6
? 5
? 7
! 7

result:

ok Correct position at 7

Test #6:

score: 0
Accepted
time: 1ms
memory: 3712kb

input:

6
1
2
3
4
4

output:

? 3
? 1
? 5
? 4
? 6
! 6

result:

ok Correct position at 6

Test #7:

score: 0
Accepted
time: 1ms
memory: 3640kb

input:

5
1
2
3
3

output:

? 3
? 1
? 4
? 5
! 5

result:

ok Correct position at 5

Test #8:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

4
1
2
3
3

output:

? 2
? 1
? 3
? 4
! 4

result:

ok Correct position at 4

Test #9:

score: 0
Accepted
time: 1ms
memory: 3664kb

input:

3
1
1

output:

? 2
? 1
! 1

result:

ok Correct position at 1

Test #10:

score: 0
Accepted
time: 1ms
memory: 3656kb

input:

2
1
1

output:

? 1
? 2
! 2

result:

ok Correct position at 2

Test #11:

score: 0
Accepted
time: 1ms
memory: 3652kb

input:

1
0

output:

? 1
! 1

result:

ok Correct position at 1

Test #12:

score: 0
Accepted
time: 1ms
memory: 3656kb

input:

1000000
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
31
30
29
29

output:

? 500000
? 1
? 750000
? 500001
? 875000
? 750001
? 937500
? 875001
? 968750
? 937501
? 984375
? 968751
? 992188
? 984376
? 996094
? 992189
? 998047
? 996095
? 999024
? 998048
? 999512
? 999025
? 999756
? 999513
? 999878
? 999757
? 999939
? 999879
? 999970
? 999940
? 999985
? 999971
? 999993
? 999989...

result:

ok Correct position at 999986

Test #13:

score: 0
Accepted
time: 0ms
memory: 3720kb

input:

999999
1
2
3
4
5
6
5
4
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
24
24

output:

? 500000
? 1
? 750000
? 500001
? 875000
? 750001
? 937500
? 906250
? 890625
? 882812
? 875001
? 886718
? 882813
? 888671
? 886719
? 889648
? 888672
? 890136
? 889649
? 890380
? 890137
? 890502
? 890381
? 890563
? 890503
? 890594
? 890564
? 890609
? 890595
? 890617
? 890610
? 890621
? 890619
! 890619

result:

ok Correct position at 890619

Test #14:

score: 0
Accepted
time: 1ms
memory: 3660kb

input:

999998
1
2
3
4
5
6
5
4
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
24
24

output:

? 499999
? 1
? 749999
? 500000
? 874999
? 750000
? 937499
? 906249
? 890624
? 882811
? 875000
? 886717
? 882812
? 888670
? 886718
? 889647
? 888671
? 890135
? 889648
? 890379
? 890136
? 890501
? 890380
? 890562
? 890502
? 890593
? 890563
? 890608
? 890594
? 890616
? 890609
? 890620
? 890618
! 890618

result:

ok Correct position at 890618

Test #15:

score: 0
Accepted
time: 1ms
memory: 3660kb

input:

999997
1
2
3
4
5
6
5
4
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
24
24

output:

? 499999
? 1
? 749998
? 500000
? 874998
? 749999
? 937498
? 906248
? 890623
? 882810
? 874999
? 886716
? 882811
? 888669
? 886717
? 889646
? 888670
? 890134
? 889647
? 890378
? 890135
? 890500
? 890379
? 890561
? 890501
? 890592
? 890562
? 890607
? 890593
? 890615
? 890608
? 890619
? 890617
! 890617

result:

ok Correct position at 890617

Test #16:

score: 0
Accepted
time: 1ms
memory: 3668kb

input:

999996
1
2
3
4
5
6
5
4
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
24
24

output:

? 499998
? 1
? 749997
? 499999
? 874997
? 749998
? 937497
? 906247
? 890622
? 882809
? 874998
? 886715
? 882810
? 888668
? 886716
? 889645
? 888669
? 890133
? 889646
? 890377
? 890134
? 890499
? 890378
? 890560
? 890500
? 890591
? 890561
? 890606
? 890592
? 890614
? 890607
? 890618
? 890616
! 890616

result:

ok Correct position at 890616

Test #17:

score: 0
Accepted
time: 1ms
memory: 3716kb

input:

999995
1
2
3
4
5
6
5
4
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
24
24

output:

? 499998
? 1
? 749997
? 499999
? 874996
? 749998
? 937496
? 906246
? 890621
? 882808
? 874997
? 886714
? 882809
? 888667
? 886715
? 889644
? 888668
? 890132
? 889645
? 890376
? 890133
? 890498
? 890377
? 890559
? 890499
? 890590
? 890560
? 890605
? 890591
? 890613
? 890606
? 890617
? 890615
! 890615

result:

ok Correct position at 890615

Test #18:

score: 0
Accepted
time: 1ms
memory: 3636kb

input:

999994
1
2
3
4
5
6
5
4
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
24
24

output:

? 499997
? 1
? 749996
? 499998
? 874995
? 749997
? 937495
? 906245
? 890620
? 882807
? 874996
? 886713
? 882808
? 888666
? 886714
? 889643
? 888667
? 890131
? 889644
? 890375
? 890132
? 890497
? 890376
? 890558
? 890498
? 890589
? 890559
? 890604
? 890590
? 890612
? 890605
? 890616
? 890614
! 890614

result:

ok Correct position at 890614

Test #19:

score: 0
Accepted
time: 1ms
memory: 3652kb

input:

999993
1
2
3
4
5
6
5
4
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
24
24

output:

? 499997
? 1
? 749995
? 499998
? 874994
? 749996
? 937494
? 906244
? 890619
? 882806
? 874995
? 886712
? 882807
? 888665
? 886713
? 889642
? 888666
? 890130
? 889643
? 890374
? 890131
? 890496
? 890375
? 890557
? 890497
? 890588
? 890558
? 890603
? 890589
? 890611
? 890604
? 890615
? 890613
! 890613

result:

ok Correct position at 890613

Test #20:

score: 0
Accepted
time: 1ms
memory: 3636kb

input:

999992
1
2
3
4
5
6
5
4
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
24
24

output:

? 499996
? 1
? 749994
? 499997
? 874993
? 749995
? 937493
? 906243
? 890618
? 882805
? 874994
? 886711
? 882806
? 888664
? 886712
? 889641
? 888665
? 890129
? 889642
? 890373
? 890130
? 890495
? 890374
? 890556
? 890496
? 890587
? 890557
? 890602
? 890588
? 890610
? 890603
? 890614
? 890612
! 890612

result:

ok Correct position at 890612

Test #21:

score: 0
Accepted
time: 1ms
memory: 3612kb

input:

999991
1
2
3
4
5
6
7
8
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
28
27
28
29
29

output:

? 499996
? 1
? 749994
? 499997
? 874993
? 749995
? 937492
? 874994
? 968742
? 953117
? 937493
? 960929
? 953118
? 964835
? 960930
? 966788
? 964836
? 967765
? 966789
? 968253
? 967766
? 968497
? 968254
? 968619
? 968498
? 968680
? 968620
? 968711
? 968681
? 968726
? 968712
? 968734
? 968730
? 968728...

result:

ok Correct position at 968729

Test #22:

score: 0
Accepted
time: 1ms
memory: 3636kb

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
5
6
6

output:

? 500000
? 1
? 250001
? 2
? 125002
? 3
? 62503
? 4
? 31254
? 5
? 15630
? 6
? 7818
? 7
? 3913
? 8
? 1961
? 9
? 985
? 10
? 498
? 11
? 255
? 12
? 134
? 13
? 74
? 14
? 44
? 15
? 30
? 16
? 37
? 31
? 41
? 38
? 43
! 43

result:

ok Correct position at 43

Test #23:

score: 0
Accepted
time: 1ms
memory: 3672kb

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
1

output:

? 500000
? 1
? 250001
? 2
? 125002
? 3
? 62503
? 4
? 31254
? 5
? 15630
? 6
? 7818
? 7
? 3913
? 8
? 1961
? 9
? 985
? 10
? 498
? 11
? 255
? 12
? 134
? 13
? 74
? 14
? 44
? 15
? 59
? 51
! 51

result:

ok Correct position at 51

Test #24:

score: 0
Accepted
time: 1ms
memory: 3604kb

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
1

output:

? 499999
? 1
? 250000
? 2
? 125001
? 3
? 62502
? 4
? 31253
? 5
? 15629
? 6
? 7818
? 7
? 3913
? 8
? 1961
? 9
? 985
? 10
? 498
? 11
? 255
? 12
? 134
? 13
? 74
? 14
? 44
? 15
? 59
? 51
! 51

result:

ok Correct position at 51

Test #25:

score: 0
Accepted
time: 1ms
memory: 3600kb

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
1

output:

? 499999
? 1
? 250000
? 2
? 125001
? 3
? 62502
? 4
? 31253
? 5
? 15629
? 6
? 7818
? 7
? 3913
? 8
? 1961
? 9
? 985
? 10
? 498
? 11
? 255
? 12
? 134
? 13
? 74
? 14
? 44
? 15
? 59
? 51
! 51

result:

ok Correct position at 51

Test #26:

score: 0
Accepted
time: 1ms
memory: 3652kb

input:

1000000
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
23
22
21
22
23
24
25
24
25
26
26

output:

? 500000
? 1
? 750000
? 500001
? 875000
? 750001
? 937500
? 875001
? 968750
? 937501
? 984375
? 968751
? 992188
? 984376
? 996094
? 992189
? 998047
? 996095
? 999024
? 998048
? 999512
? 999025
? 999756
? 999513
? 999878
? 999817
? 999786
? 999771
? 999757
? 999778
? 999772
? 999782
? 999780
? 999779...

result:

ok Correct position at 999781

Test #27:

score: 0
Accepted
time: 1ms
memory: 3592kb

input:

999999
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
29
30
31
31

output:

? 500000
? 1
? 750000
? 500001
? 875000
? 750001
? 937500
? 875001
? 968750
? 937501
? 984375
? 968751
? 992187
? 984376
? 996093
? 992188
? 998046
? 996094
? 999023
? 998047
? 999511
? 999024
? 999755
? 999512
? 999877
? 999756
? 999938
? 999878
? 999969
? 999939
? 999984
? 999976
? 999970
? 999980...

result:

ok Correct position at 999980

Test #28:

score: 0
Accepted
time: 1ms
memory: 3648kb

input:

999998
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
29
30
31
31

output:

? 499999
? 1
? 749999
? 500000
? 874999
? 750000
? 937499
? 875000
? 968749
? 937500
? 984374
? 968750
? 992186
? 984375
? 996092
? 992187
? 998045
? 996093
? 999022
? 998046
? 999510
? 999023
? 999754
? 999511
? 999876
? 999755
? 999937
? 999877
? 999968
? 999938
? 999983
? 999975
? 999969
? 999979...

result:

ok Correct position at 999979

Test #29:

score: 0
Accepted
time: 1ms
memory: 3652kb

input:

999997
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
29
30
31
31

output:

? 499999
? 1
? 749998
? 500000
? 874998
? 749999
? 937498
? 874999
? 968748
? 937499
? 984373
? 968749
? 992185
? 984374
? 996091
? 992186
? 998044
? 996092
? 999021
? 998045
? 999509
? 999022
? 999753
? 999510
? 999875
? 999754
? 999936
? 999876
? 999967
? 999937
? 999982
? 999974
? 999968
? 999978...

result:

ok Correct position at 999978

Test #30:

score: 0
Accepted
time: 1ms
memory: 3592kb

input:

1000000
1
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
25
24
25
26
25
24
24

output:

? 500000
? 1
? 250001
? 2
? 375001
? 250002
? 437501
? 375002
? 468751
? 437502
? 484376
? 468752
? 492188
? 484377
? 496094
? 492189
? 498047
? 496095
? 499024
? 498048
? 499512
? 499025
? 499756
? 499513
? 499878
? 499757
? 499939
? 499879
? 499970
? 499954
? 499946
? 499940
? 499950
? 499948
? 49...

result:

ok Correct position at 499947

Test #31:

score: 0
Accepted
time: 0ms
memory: 3640kb

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
6
7
8
8

output:

? 500000
? 1
? 750000
? 625000
? 562500
? 500001
? 531251
? 500002
? 515627
? 500003
? 507815
? 500004
? 503910
? 500005
? 501958
? 500006
? 500982
? 500007
? 500495
? 500008
? 500252
? 500009
? 500131
? 500010
? 500071
? 500011
? 500041
? 500012
? 500056
? 500042
? 500064
? 500057
? 500068
? 500065...

result:

ok Correct position at 500070

Test #32:

score: 0
Accepted
time: 1ms
memory: 3640kb

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
2
2

output:

? 499999
? 1
? 749999
? 624999
? 562499
? 500000
? 531250
? 500001
? 515626
? 500002
? 507814
? 500003
? 503909
? 500004
? 501957
? 500005
? 500981
? 500006
? 500494
? 500007
? 500251
? 500008
? 500130
? 500009
? 500070
? 500010
? 500100
? 500085
? 500077
? 500071
? 500074
? 500072
? 500076
! 500076

result:

ok Correct position at 500076

Test #33:

score: 0
Accepted
time: 1ms
memory: 3596kb

input:

999997
1
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
25
26
27
28
29
29

output:

? 499999
? 1
? 250000
? 2
? 375000
? 250001
? 437500
? 375001
? 468750
? 437501
? 484375
? 468751
? 492187
? 484376
? 496093
? 492188
? 498046
? 496094
? 499023
? 498047
? 499511
? 499024
? 499755
? 499512
? 499877
? 499756
? 499938
? 499878
? 499969
? 499953
? 499939
? 499961
? 499954
? 499965
! 49...

result:

ok Correct position at 499965

Test #34:

score: 0
Accepted
time: 0ms
memory: 3652kb

input:

1000000
1
2
3
4
5
6
7
8
9
10
11
12
11
12
13
14
15
14
15
16
17
18
19
20
21
22
21
22
23
22
21
20
20

output:

? 500000
? 1
? 750000
? 500001
? 875000
? 750001
? 937500
? 875001
? 968750
? 937501
? 984375
? 968751
? 992188
? 988281
? 984376
? 990234
? 988282
? 991211
? 990722
? 990235
? 990966
? 990723
? 991088
? 990967
? 991149
? 991089
? 991180
? 991164
? 991150
? 991172
? 991168
? 991166
? 991165
! 991165

result:

ok Correct position at 991165

Test #35:

score: 0
Accepted
time: 1ms
memory: 3724kb

input:

999999
1
2
1
0
1
2
1
0
1
2
3
4
5
6
5
6
7
8
9
10
11
12
13
12
13
14
13
12
11
11

output:

? 500000
? 1
? 750000
? 625000
? 562500
? 500001
? 593750
? 578125
? 570312
? 562501
? 574218
? 570313
? 576171
? 574219
? 577148
? 576659
? 576172
? 576903
? 576660
? 577025
? 576904
? 577086
? 577026
? 577117
? 577101
? 577087
? 577109
? 577105
? 577103
? 577102
! 577102

result:

ok Correct position at 577102

Test #36:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

999998
1
2
1
0
1
2
1
0
1
2
3
4
5
6
5
6
7
8
9
10
11
12
13
12
13
14
13
12
11
11

output:

? 499999
? 1
? 749999
? 624999
? 562499
? 500000
? 593749
? 578124
? 570311
? 562500
? 574217
? 570312
? 576170
? 574218
? 577147
? 576658
? 576171
? 576902
? 576659
? 577024
? 576903
? 577085
? 577025
? 577116
? 577100
? 577086
? 577108
? 577104
? 577102
? 577101
! 577101

result:

ok Correct position at 577101

Test #37:

score: 0
Accepted
time: 1ms
memory: 3660kb

input:

999997
1
2
3
4
3
2
1
0
1
2
3
4
5
6
5
6
7
8
9
10
11
12
13
12
13
14
13
12
11
11

output:

? 499999
? 1
? 749998
? 500000
? 874998
? 812498
? 781248
? 765623
? 757810
? 749999
? 761716
? 757811
? 763669
? 761717
? 764646
? 764157
? 763670
? 764401
? 764158
? 764523
? 764402
? 764584
? 764524
? 764615
? 764599
? 764585
? 764607
? 764603
? 764601
? 764600
! 764600

result:

ok Correct position at 764600

Test #38:

score: 0
Accepted
time: 1ms
memory: 3632kb

input:

1000000
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
38

output:

? 500000
? 1
? 750000
? 500001
? 875000
? 750001
? 937500
? 875001
? 968750
? 937501
? 984375
? 968751
? 992188
? 984376
? 996094
? 992189
? 998047
? 996095
? 999024
? 998048
? 999512
? 999025
? 999756
? 999513
? 999878
? 999757
? 999939
? 999879
? 999970
? 999940
? 999985
? 999971
? 999993
? 999986...

result:

ok Correct position at 1000000

Test #39:

score: 0
Accepted
time: 1ms
memory: 3668kb

input:

999999
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
38

output:

? 500000
? 1
? 750000
? 500001
? 875000
? 750001
? 937500
? 875001
? 968750
? 937501
? 984375
? 968751
? 992187
? 984376
? 996093
? 992188
? 998046
? 996094
? 999023
? 998047
? 999511
? 999024
? 999755
? 999512
? 999877
? 999756
? 999938
? 999878
? 999969
? 999939
? 999984
? 999970
? 999992
? 999985...

result:

ok Correct position at 999999

Test #40:

score: 0
Accepted
time: 1ms
memory: 3596kb

input:

999998
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
38

output:

? 499999
? 1
? 749999
? 500000
? 874999
? 750000
? 937499
? 875000
? 968749
? 937500
? 984374
? 968750
? 992186
? 984375
? 996092
? 992187
? 998045
? 996093
? 999022
? 998046
? 999510
? 999023
? 999754
? 999511
? 999876
? 999755
? 999937
? 999877
? 999968
? 999938
? 999983
? 999969
? 999991
? 999984...

result:

ok Correct position at 999998

Test #41:

score: 0
Accepted
time: 0ms
memory: 3656kb

input:

999997
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
38

output:

? 499999
? 1
? 749998
? 500000
? 874998
? 749999
? 937498
? 874999
? 968748
? 937499
? 984373
? 968749
? 992185
? 984374
? 996091
? 992186
? 998044
? 996092
? 999021
? 998045
? 999509
? 999022
? 999753
? 999510
? 999875
? 999754
? 999936
? 999876
? 999967
? 999937
? 999982
? 999968
? 999990
? 999983...

result:

ok Correct position at 999997

Test #42:

score: 0
Accepted
time: 1ms
memory: 3672kb

input:

1000000
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
38

output:

? 500000
? 1
? 750000
? 500001
? 875000
? 750001
? 937500
? 875001
? 968750
? 937501
? 984375
? 968751
? 992188
? 984376
? 996094
? 992189
? 998047
? 996095
? 999024
? 998048
? 999512
? 999025
? 999756
? 999513
? 999878
? 999757
? 999939
? 999879
? 999970
? 999940
? 999985
? 999971
? 999993
? 999986...

result:

ok Correct position at 1000000

Test #43:

score: 0
Accepted
time: 1ms
memory: 3588kb

input:

1000000
1
1

output:

? 500000
? 1
! 1

result:

ok Correct position at 1