QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#177016#6394. Turn on the Lightucup-team1547#AC ✓2ms3728kbC++201.0kb2023-09-12 14:10:292023-09-12 14:10:31

詳細信息

Test #1:

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

input:

3
1
2
2

output:

? 1
? 2
? 3
! 3

result:

ok Correct position at 3

Test #2:

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

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: 3632kb

input:

9
1
2
3
3

output:

? 1
? 5
? 7
? 8
! 8

result:

ok Correct position at 8

Test #4:

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

input:

8
1
0
1
1

output:

? 1
? 5
? 2
? 3
! 3

result:

ok Correct position at 3

Test #5:

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

input:

7
1
2
3
3

output:

? 1
? 4
? 6
? 7
! 7

result:

ok Correct position at 7

Test #6:

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

input:

6
1
0
1
1

output:

? 1
? 4
? 2
? 3
! 3

result:

ok Correct position at 3

Test #7:

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

input:

5
1
2
3
3

output:

? 1
? 3
? 4
? 5
! 5

result:

ok Correct position at 5

Test #8:

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

input:

4
1
1

output:

? 1
? 3
! 3

result:

ok Correct position at 3

Test #9:

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

input:

3
1
1

output:

? 1
? 2
! 2

result:

ok Correct position at 2

Test #10:

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

input:

2
1
1

output:

? 1
? 2
! 2

result:

ok Correct position at 2

Test #11:

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

input:

1
0

output:

? 1
! 1

result:

ok Correct position at 1

Test #12:

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

input:

1000000
1
0
1
2
3
2
1
0
1
2
3
4
5
6
5
4
3
2
1
0
1
2
3
4
3
2
1
0
1
2
3
4
3
2
1
1

output:

? 1
? 500001
? 2
? 250001
? 375001
? 437501
? 437500
? 437499
? 375002
? 406250
? 421874
? 429686
? 433592
? 435545
? 436522
? 436521
? 436520
? 436519
? 436518
? 436517
? 435546
? 436031
? 436274
? 436395
? 436456
? 436455
? 436454
? 436453
? 436396
? 436424
? 436438
? 436445
? 436449
? 436448
? 43...

result:

ok Correct position at 436446

Test #13:

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

input:

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

output:

? 1
? 500000
? 750000
? 875000
? 874999
? 874998
? 750001
? 812499
? 843748
? 859373
? 867185
? 871091
? 873044
? 874021
? 874509
? 874753
? 874875
? 874936
? 874967
? 874982
? 874990
? 874989
? 874988
? 874987
? 874986
? 874985
? 874984
! 874984

result:

ok Correct position at 874984

Test #14:

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

input:

999998
1
0
1
0
1
0
1
0
1
2
3
4
5
6
5
4
3
2
1
0
1
2
3
4
3
2
1
0
1
2
3
4
3
2
1
1

output:

? 1
? 500000
? 2
? 250001
? 3
? 125002
? 4
? 62503
? 5
? 31254
? 46878
? 54690
? 58596
? 60549
? 61526
? 61525
? 61524
? 61523
? 61522
? 61521
? 60550
? 61035
? 61278
? 61399
? 61460
? 61459
? 61458
? 61457
? 61400
? 61428
? 61442
? 61449
? 61453
? 61452
? 61451
? 61450
! 61450

result:

ok Correct position at 61450

Test #15:

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

input:

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

output:

? 1
? 499999
? 749998
? 874998
? 874997
? 874996
? 749999
? 812497
? 843746
? 859371
? 867183
? 871089
? 873042
? 874019
? 874507
? 874751
? 874873
? 874934
? 874965
? 874980
? 874988
? 874987
? 874986
? 874985
? 874984
? 874983
? 874982
! 874982

result:

ok Correct position at 874982

Test #16:

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

input:

999996
1
0
1
2
3
2
1
0
1
2
3
4
5
6
5
4
3
2
1
0
1
2
3
4
3
2
1
0
1
2
3
4
3
2
1
1

output:

? 1
? 499999
? 2
? 250000
? 374999
? 437499
? 437498
? 437497
? 375000
? 406248
? 421872
? 429684
? 433590
? 435543
? 436520
? 436519
? 436518
? 436517
? 436516
? 436515
? 435544
? 436029
? 436272
? 436393
? 436454
? 436453
? 436452
? 436451
? 436394
? 436422
? 436436
? 436443
? 436447
? 436446
? 43...

result:

ok Correct position at 436444

Test #17:

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

input:

999995
1
2
3
4
5
4
3
2
1
0
1
2
3
4
3
2
1
0
1
2
3
2
1
0
1
2
3
4
5
6
7
7

output:

? 1
? 499998
? 749997
? 874996
? 937496
? 968746
? 968745
? 968744
? 968743
? 968742
? 937497
? 953119
? 960930
? 964836
? 966789
? 966788
? 966787
? 966786
? 964837
? 965811
? 966298
? 966542
? 966541
? 966540
? 966299
? 966419
? 966479
? 966509
? 966524
? 966532
? 966536
? 966538
! 966538

result:

ok Correct position at 966538

Test #18:

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

input:

999994
1
0
1
0
1
2
3
2
1
0
1
2
3
4
3
2
1
0
1
2
3
2
1
0
1
2
3
4
5
6
7
7

output:

? 1
? 499998
? 2
? 250000
? 3
? 125001
? 187500
? 218750
? 218749
? 218748
? 187501
? 203124
? 210936
? 214842
? 216795
? 216794
? 216793
? 216792
? 214843
? 215817
? 216304
? 216548
? 216547
? 216546
? 216305
? 216425
? 216485
? 216515
? 216530
? 216538
? 216542
? 216544
! 216544

result:

ok Correct position at 216544

Test #19:

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

input:

999993
1
2
3
4
5
4
3
2
1
0
1
2
3
4
3
2
1
0
1
2
3
2
1
0
1
2
3
4
5
6
7
7

output:

? 1
? 499997
? 749995
? 874994
? 937494
? 968744
? 968743
? 968742
? 968741
? 968740
? 937495
? 953117
? 960928
? 964834
? 966787
? 966786
? 966785
? 966784
? 964835
? 965809
? 966296
? 966540
? 966539
? 966538
? 966297
? 966417
? 966477
? 966507
? 966522
? 966530
? 966534
? 966536
! 966536

result:

ok Correct position at 966536

Test #20:

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

input:

999992
1
0
1
2
3
4
3
2
1
0
1
0
1
2
3
4
5
6
7
8
9
8
7
6
5
4
3
2
1
0
1
0
1
0
1
0
0

output:

? 1
? 499997
? 2
? 249999
? 374998
? 437497
? 468747
? 468746
? 468745
? 468744
? 437498
? 453121
? 437499
? 445310
? 449215
? 451168
? 452144
? 452632
? 452876
? 452998
? 453059
? 453090
? 453089
? 453088
? 453087
? 453086
? 453085
? 453084
? 453083
? 453082
? 453060
? 453071
? 453061
? 453066
? 45...

result:

ok Correct position at 453063

Test #21:

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

input:

999991
1
2
3
2
1
0
1
0
1
2
3
4
5
6
5
4
3
2
1
0
1
2
3
4
3
2
1
0
1
2
3
4
3
2
1
1

output:

? 1
? 499996
? 749994
? 874993
? 874992
? 874991
? 749995
? 812493
? 749996
? 781244
? 796868
? 804680
? 808586
? 810539
? 811516
? 811515
? 811514
? 811513
? 811512
? 811511
? 810540
? 811025
? 811268
? 811389
? 811450
? 811449
? 811448
? 811447
? 811390
? 811418
? 811432
? 811439
? 811443
? 811442...

result:

ok Correct position at 811440

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
5

output:

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

result:

ok Correct position at 43

Test #23:

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

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
1

output:

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

result:

ok Correct position at 51

Test #24:

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

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
1

output:

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

result:

ok Correct position at 51

Test #25:

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

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
1

output:

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

result:

ok Correct position at 51

Test #26:

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

input:

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

output:

? 1
? 500001
? 750001
? 875001
? 937501
? 968751
? 984376
? 992188
? 996094
? 998047
? 999024
? 999512
? 999756
? 999878
? 999877
? 999876
? 999875
? 999874
? 999873
? 999872
? 999871
? 999870
? 999869
? 999868
? 999867
? 999866
? 999757
? 999811
? 999758
? 999784
? 999759
? 999771
? 999777
? 999780...

result:

ok Correct position at 999781

Test #27:

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

input:

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

output:

? 1
? 500000
? 750000
? 875000
? 937500
? 968750
? 984375
? 992187
? 996093
? 998046
? 999023
? 999511
? 999755
? 999877
? 999938
? 999969
? 999984
? 999983
? 999982
? 999981
? 999980
! 999980

result:

ok Correct position at 999980

Test #28:

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

input:

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

output:

? 1
? 500000
? 749999
? 874999
? 937499
? 968749
? 984374
? 992186
? 996092
? 998045
? 999022
? 999510
? 999754
? 999876
? 999937
? 999968
? 999983
? 999982
? 999981
? 999980
? 999979
! 999979

result:

ok Correct position at 999979

Test #29:

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

input:

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

output:

? 1
? 499999
? 749998
? 874998
? 937498
? 968748
? 984373
? 992185
? 996091
? 998044
? 999021
? 999509
? 999753
? 999875
? 999936
? 999967
? 999982
? 999981
? 999980
? 999979
? 999978
! 999978

result:

ok Correct position at 999978

Test #30:

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

input:

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

output:

? 1
? 500001
? 2
? 250001
? 375001
? 437501
? 468751
? 484376
? 492188
? 496094
? 498047
? 499024
? 499512
? 499756
? 499878
? 499939
? 499970
? 499969
? 499968
? 499967
? 499966
? 499965
? 499964
? 499963
? 499962
? 499961
? 499960
? 499959
? 499958
? 499957
? 499940
? 499948
? 499941
? 499944
? 49...

result:

ok Correct position at 499947

Test #31:

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

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
2
3
4
5
5

output:

? 1
? 500000
? 750000
? 749999
? 500001
? 625000
? 500002
? 562501
? 500003
? 531252
? 500004
? 515628
? 500005
? 507816
? 500006
? 503911
? 500007
? 501959
? 500008
? 500983
? 500009
? 500496
? 500010
? 500253
? 500011
? 500132
? 500012
? 500072
? 500013
? 500042
? 500057
? 500064
? 500068
? 500070...

result:

ok Correct position at 500070

Test #32:

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

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

output:

? 1
? 500000
? 749999
? 749998
? 500001
? 624999
? 500002
? 562500
? 500003
? 531251
? 500004
? 515627
? 500005
? 507816
? 500006
? 503911
? 500007
? 501959
? 500008
? 500983
? 500009
? 500496
? 500010
? 500253
? 500011
? 500132
? 500012
? 500072
? 500102
? 500101
? 500073
? 500087
? 500074
? 500080...

result:

ok Correct position at 500076

Test #33:

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

input:

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

output:

? 1
? 499999
? 2
? 250000
? 374999
? 437499
? 468749
? 484374
? 492186
? 496092
? 498045
? 499022
? 499510
? 499754
? 499876
? 499937
? 499968
? 499967
? 499966
? 499965
! 499965

result:

ok Correct position at 499965

Test #34:

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

input:

1000000
1
0
1
2
1
0
1
0
1
0
1
0
1
2
1
0
1
0
1
2
1
0
1
0
1
0
1
0
1
2
1
0
1
2
3
2
2

output:

? 1
? 500001
? 2
? 250001
? 375001
? 375000
? 250002
? 312501
? 250003
? 281252
? 250004
? 265628
? 250005
? 257816
? 261722
? 261721
? 257817
? 259769
? 257818
? 258793
? 259281
? 259280
? 258794
? 259037
? 258795
? 258916
? 258796
? 258856
? 258797
? 258826
? 258841
? 258840
? 258827
? 258833
? 25...

result:

ok Correct position at 258837

Test #35:

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

input:

999999
1
2
1
0
1
0
1
0
1
0
1
0
1
2
1
0
1
0
1
2
1
0
1
0
1
0
1
0
1
2
1
0
1
2
3
2
2

output:

? 1
? 500000
? 750000
? 749999
? 500001
? 625000
? 500002
? 562501
? 500003
? 531252
? 500004
? 515628
? 500005
? 507816
? 511722
? 511721
? 507817
? 509769
? 507818
? 508793
? 509281
? 509280
? 508794
? 509037
? 508795
? 508916
? 508796
? 508856
? 508797
? 508826
? 508841
? 508840
? 508827
? 508833...

result:

ok Correct position at 508837

Test #36:

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

input:

999998
1
0
1
0
1
0
1
0
1
0
1
0
1
2
1
0
1
0
1
2
1
0
1
0
1
0
1
0
1
2
1
0
1
2
3
2
2

output:

? 1
? 500000
? 2
? 250001
? 3
? 125002
? 4
? 62503
? 5
? 31254
? 6
? 15630
? 7
? 7818
? 11724
? 11723
? 7819
? 9771
? 7820
? 8795
? 9283
? 9282
? 8796
? 9039
? 8797
? 8918
? 8798
? 8858
? 8799
? 8828
? 8843
? 8842
? 8829
? 8835
? 8838
? 8840
? 8839
! 8839

result:

ok Correct position at 8839

Test #37:

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

input:

999997
1
2
3
2
1
0
1
2
3
2
1
0
1
0
1
0
1
0
1
2
1
0
1
0
1
0
1
0
1
2
1
0
1
2
3
2
2

output:

? 1
? 499999
? 749998
? 874998
? 874997
? 874996
? 749999
? 812497
? 843746
? 859371
? 859370
? 859369
? 843747
? 851558
? 843748
? 847653
? 843749
? 845701
? 843750
? 844725
? 845213
? 845212
? 844726
? 844969
? 844727
? 844848
? 844728
? 844788
? 844729
? 844758
? 844773
? 844772
? 844759
? 844765...

result:

ok Correct position at 844769

Test #38:

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

input:

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

output:

? 1
? 500001
? 750001
? 875001
? 937501
? 968751
? 984376
? 992188
? 996094
? 998047
? 999024
? 999512
? 999756
? 999878
? 999939
? 999970
? 999985
? 999993
? 999997
? 999999
? 1000000
! 1000000

result:

ok Correct position at 1000000

Test #39:

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

input:

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

output:

? 1
? 500000
? 750000
? 875000
? 937500
? 968750
? 984375
? 992187
? 996093
? 998046
? 999023
? 999511
? 999755
? 999877
? 999938
? 999969
? 999984
? 999992
? 999996
? 999998
? 999999
! 999999

result:

ok Correct position at 999999

Test #40:

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

input:

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

output:

? 1
? 500000
? 749999
? 874999
? 937499
? 968749
? 984374
? 992186
? 996092
? 998045
? 999022
? 999510
? 999754
? 999876
? 999937
? 999968
? 999983
? 999991
? 999995
? 999997
? 999998
! 999998

result:

ok Correct position at 999998

Test #41:

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
20

output:

? 1
? 499999
? 749998
? 874998
? 937498
? 968748
? 984373
? 992185
? 996091
? 998044
? 999021
? 999509
? 999753
? 999875
? 999936
? 999967
? 999982
? 999990
? 999994
? 999996
? 999997
! 999997

result:

ok Correct position at 999997

Test #42:

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

input:

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

output:

? 1
? 500001
? 750001
? 875001
? 937501
? 968751
? 984376
? 992188
? 996094
? 998047
? 999024
? 999512
? 999756
? 999878
? 999939
? 999970
? 999985
? 999993
? 999997
? 999999
? 1000000
! 1000000

result:

ok Correct position at 1000000

Test #43:

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

input:

1000000
0

output:

? 1
! 1

result:

ok Correct position at 1