QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#113053 | #6394. Turn on the Light | hos_lyric | AC ✓ | 3ms | 3760kb | C++14 | 2.7kb | 2023-06-16 08:29:47 | 2023-06-16 08:29:48 |
Judging History
answer
#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
using Int = long long;
template <class T1, class T2> ostream &operator<<(ostream &os, const pair<T1, T2> &a) { return os << "(" << a.first << ", " << a.second << ")"; };
template <class T> ostream &operator<<(ostream &os, const vector<T> &as) { const int sz = as.size(); os << "["; for (int i = 0; i < sz; ++i) { if (i >= 256) { os << ", ..."; break; } if (i > 0) { os << ", "; } os << as[i]; } return os << "]"; }
template <class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cerr << *i << " "; cerr << endl; }
template <class T> bool chmin(T &t, const T &f) { if (t > f) { t = f; return true; } return false; }
template <class T> bool chmax(T &t, const T &f) { if (t < f) { t = f; return true; } return false; }
int Ask(int x) {
printf("? %d\n", x);
fflush(stdout);
int ret;
scanf("%d", &ret);
return ret;
}
void Answer(int x) {
printf("! %d\n", x);
fflush(stdout);
exit(0);
}
int main() {
int N;
scanf("%d", &N);
int last = 0;
vector<int> cands;
auto brute = [&]() -> void {
const int len = cands.size();
for (int i = 0; i < len - 1; ++i) {
const int res = Ask(cands[i]);
if (last == res) Answer(cands[i]);
last = res;
}
Answer(cands[len - 1]);
};
int L = 1, R = N;
int A, B;
for (; ; ) {
const int l = (L + L + L + R) / 4;
const int r = (L + R + R + R) / 4;
if (l == r) {
for (int x = L; x <= R; ++x) cands.push_back(x);
brute();
}
const int f = Ask(l); if (last == f) { Answer(l); } last = f;
const int g = Ask(r); if (last == g) { Answer(r); } last = g;
if (g) {
A = l - 1;
B = r + 1;
break;
} else {
L = l + 1;
R = r - 1;
}
}
// cerr<<"waf "<<L<<" "<<A<<" "<<B<<" "<<R<<endl;
for (; L <= A && B <= R; ) {
const int l = (L + A) / 2;
const int r = (B + R) / 2;
const int e = last;
const int f = Ask(l); if (last == f) { Answer(l); } last = f;
const int g = Ask(r); if (last == g) { Answer(r); } last = g;
if (e < g) {
A = l - 1;
B = r + 1;
} else {
L = l + 1;
R = r - 1;
}
}
for (int x = L; x <= A; ++x) cands.push_back(x);
for (int x = B; x <= R; ++x) cands.push_back(x);
brute();
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 2ms
memory: 3732kb
input:
3 1 2
output:
? 1 ? 2 ! 3
result:
ok Correct position at 3
Test #2:
score: 0
Accepted
time: 2ms
memory: 3624kb
input:
10 1 2 3 2 3 3
output:
? 3 ? 7 ? 1 ? 9 ? 2 ? 8 ! 8
result:
ok Correct position at 8
Test #3:
score: 0
Accepted
time: 0ms
memory: 3736kb
input:
9 1 2 3 3
output:
? 3 ? 7 ? 1 ? 8 ! 8
result:
ok Correct position at 8
Test #4:
score: 0
Accepted
time: 1ms
memory: 3620kb
input:
8 1 0 1 1
output:
? 2 ? 6 ? 3 ? 4 ! 4
result:
ok Correct position at 4
Test #5:
score: 0
Accepted
time: 1ms
memory: 3624kb
input:
7 1 2 3 3
output:
? 2 ? 5 ? 1 ? 6 ! 6
result:
ok Correct position at 6
Test #6:
score: 0
Accepted
time: 1ms
memory: 3624kb
input:
6 1 2 3 3
output:
? 2 ? 4 ? 1 ? 5 ! 5
result:
ok Correct position at 5
Test #7:
score: 0
Accepted
time: 1ms
memory: 3612kb
input:
5 1 2 3 3
output:
? 2 ? 4 ? 1 ? 5 ! 5
result:
ok Correct position at 5
Test #8:
score: 0
Accepted
time: 1ms
memory: 3628kb
input:
4 1 1
output:
? 1 ? 3 ! 3
result:
ok Correct position at 3
Test #9:
score: 0
Accepted
time: 1ms
memory: 3676kb
input:
3 1 1
output:
? 1 ? 2 ! 2
result:
ok Correct position at 2
Test #10:
score: 0
Accepted
time: 2ms
memory: 3700kb
input:
2 1
output:
? 1 ! 2
result:
ok Correct position at 2
Test #11:
score: 0
Accepted
time: 2ms
memory: 3580kb
input:
1
output:
! 1
result:
ok Correct position at 1
Test #12:
score: 0
Accepted
time: 2ms
memory: 3624kb
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 27 28 29 30 31 32 33 32 33 33
output:
? 250000 ? 750000 ? 375000 ? 624999 ? 312500 ? 687499 ? 281250 ? 718749 ? 265625 ? 734374 ? 257812 ? 742187 ? 253906 ? 746093 ? 251953 ? 748046 ? 250976 ? 749023 ? 250488 ? 749511 ? 250244 ? 749755 ? 250122 ? 749877 ? 250061 ? 749938 ? 250030 ? 749969 ? 250015 ? 749984 ? 250007 ? 749992 ? 250003 ? 7...
result:
ok Correct position at 749997
Test #13:
score: 0
Accepted
time: 2ms
memory: 3704kb
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 34 35 35
output:
? 250000 ? 749999 ? 125000 ? 874999 ? 62500 ? 937499 ? 31250 ? 968749 ? 15625 ? 984374 ? 7812 ? 992187 ? 3906 ? 996093 ? 1953 ? 998046 ? 976 ? 999023 ? 488 ? 999511 ? 244 ? 999755 ? 122 ? 999877 ? 61 ? 999938 ? 30 ? 999969 ? 15 ? 999984 ? 7 ? 999992 ? 3 ? 999996 ? 1 ? 999998 ? 2 ? 999997 ! 999997
result:
ok Correct position at 999997
Test #14:
score: 0
Accepted
time: 0ms
memory: 3696kb
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 34 35 35
output:
? 250000 ? 749998 ? 125000 ? 874998 ? 62500 ? 937498 ? 31250 ? 968748 ? 15625 ? 984373 ? 7812 ? 992186 ? 3906 ? 996092 ? 1953 ? 998045 ? 976 ? 999022 ? 488 ? 999510 ? 244 ? 999754 ? 122 ? 999876 ? 61 ? 999937 ? 30 ? 999968 ? 15 ? 999983 ? 7 ? 999991 ? 3 ? 999995 ? 1 ? 999997 ? 2 ? 999996 ! 999996
result:
ok Correct position at 999996
Test #15:
score: 0
Accepted
time: 2ms
memory: 3608kb
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 34 35 35
output:
? 250000 ? 749998 ? 125000 ? 874998 ? 62500 ? 937498 ? 31250 ? 968748 ? 15625 ? 984373 ? 7812 ? 992185 ? 3906 ? 996091 ? 1953 ? 998044 ? 976 ? 999021 ? 488 ? 999509 ? 244 ? 999753 ? 122 ? 999875 ? 61 ? 999936 ? 30 ? 999967 ? 15 ? 999982 ? 7 ? 999990 ? 3 ? 999994 ? 1 ? 999996 ? 2 ? 999995 ! 999995
result:
ok Correct position at 999995
Test #16:
score: 0
Accepted
time: 1ms
memory: 3636kb
input:
999996 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 27 28 29 30 31 32 33 32 33 33
output:
? 249999 ? 749997 ? 374999 ? 624997 ? 312499 ? 687497 ? 281249 ? 718747 ? 265624 ? 734372 ? 257811 ? 742184 ? 253905 ? 746090 ? 251952 ? 748043 ? 250975 ? 749020 ? 250487 ? 749508 ? 250243 ? 749752 ? 250121 ? 749874 ? 250060 ? 749935 ? 250029 ? 749966 ? 250014 ? 749981 ? 250006 ? 749989 ? 250002 ? 7...
result:
ok Correct position at 749994
Test #17:
score: 0
Accepted
time: 2ms
memory: 3628kb
input:
999995 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 34 35 35
output:
? 249999 ? 749996 ? 124999 ? 874996 ? 62499 ? 937496 ? 31249 ? 968746 ? 15624 ? 984371 ? 7812 ? 992183 ? 3906 ? 996089 ? 1953 ? 998042 ? 976 ? 999019 ? 488 ? 999507 ? 244 ? 999751 ? 122 ? 999873 ? 61 ? 999934 ? 30 ? 999965 ? 15 ? 999980 ? 7 ? 999988 ? 3 ? 999992 ? 1 ? 999994 ? 2 ? 999993 ! 999993
result:
ok Correct position at 999993
Test #18:
score: 0
Accepted
time: 2ms
memory: 3664kb
input:
999994 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 34 35 35
output:
? 249999 ? 749995 ? 124999 ? 874995 ? 62499 ? 937495 ? 31249 ? 968745 ? 15624 ? 984370 ? 7812 ? 992182 ? 3906 ? 996088 ? 1953 ? 998041 ? 976 ? 999018 ? 488 ? 999506 ? 244 ? 999750 ? 122 ? 999872 ? 61 ? 999933 ? 30 ? 999964 ? 15 ? 999979 ? 7 ? 999987 ? 3 ? 999991 ? 1 ? 999993 ? 2 ? 999992 ! 999992
result:
ok Correct position at 999992
Test #19:
score: 0
Accepted
time: 2ms
memory: 3756kb
input:
999993 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 34 35 35
output:
? 249999 ? 749995 ? 124999 ? 874994 ? 62499 ? 937494 ? 31249 ? 968744 ? 15624 ? 984369 ? 7812 ? 992181 ? 3906 ? 996087 ? 1953 ? 998040 ? 976 ? 999017 ? 488 ? 999505 ? 244 ? 999749 ? 122 ? 999871 ? 61 ? 999932 ? 30 ? 999963 ? 15 ? 999978 ? 7 ? 999986 ? 3 ? 999990 ? 1 ? 999992 ? 2 ? 999991 ! 999991
result:
ok Correct position at 999991
Test #20:
score: 0
Accepted
time: 1ms
memory: 3624kb
input:
999992 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 27 28 29 30 31 32 33 32 33 33
output:
? 249998 ? 749994 ? 374997 ? 624994 ? 312497 ? 687494 ? 281247 ? 718744 ? 265622 ? 734369 ? 257810 ? 742181 ? 253904 ? 746087 ? 251951 ? 748040 ? 250974 ? 749017 ? 250486 ? 749505 ? 250242 ? 749749 ? 250120 ? 749871 ? 250059 ? 749932 ? 250028 ? 749963 ? 250013 ? 749978 ? 250005 ? 749986 ? 250001 ? 7...
result:
ok Correct position at 749991
Test #21:
score: 0
Accepted
time: 3ms
memory: 3620kb
input:
999991 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 34 35 35
output:
? 249998 ? 749993 ? 124999 ? 874992 ? 62499 ? 937492 ? 31249 ? 968742 ? 15624 ? 984367 ? 7812 ? 992179 ? 3906 ? 996085 ? 1953 ? 998038 ? 976 ? 999015 ? 488 ? 999503 ? 244 ? 999747 ? 122 ? 999869 ? 61 ? 999930 ? 30 ? 999961 ? 15 ? 999976 ? 7 ? 999984 ? 3 ? 999988 ? 1 ? 999990 ? 2 ? 999989 ! 999989
result:
ok Correct position at 999989
Test #22:
score: 0
Accepted
time: 2ms
memory: 3620kb
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 25 26 27 28 27 28 27 28 28
output:
? 250000 ? 750000 ? 125000 ? 875000 ? 62500 ? 937500 ? 31250 ? 968750 ? 15625 ? 984375 ? 7812 ? 992188 ? 3906 ? 996094 ? 1953 ? 998047 ? 976 ? 999024 ? 488 ? 999512 ? 244 ? 999756 ? 122 ? 999878 ? 61 ? 999939 ? 30 ? 999970 ? 45 ? 999954 ? 37 ? 999962 ? 41 ? 999958 ? 43 ! 43
result:
ok Correct position at 43
Test #23:
score: 0
Accepted
time: 0ms
memory: 3644kb
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 25 26 25 26 27 28 27 28 28
output:
? 250000 ? 749999 ? 125000 ? 874999 ? 62500 ? 937499 ? 31250 ? 968749 ? 15625 ? 984374 ? 7812 ? 992187 ? 3906 ? 996093 ? 1953 ? 998046 ? 976 ? 999023 ? 488 ? 999511 ? 244 ? 999755 ? 122 ? 999877 ? 61 ? 999938 ? 30 ? 999969 ? 45 ? 999953 ? 53 ? 999945 ? 49 ? 999949 ? 51 ! 51
result:
ok Correct position at 51
Test #24:
score: 0
Accepted
time: 0ms
memory: 3620kb
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 25 26 25 26 27 28 27 28 28
output:
? 250000 ? 749998 ? 125000 ? 874998 ? 62500 ? 937498 ? 31250 ? 968748 ? 15625 ? 984373 ? 7812 ? 992186 ? 3906 ? 996092 ? 1953 ? 998045 ? 976 ? 999022 ? 488 ? 999510 ? 244 ? 999754 ? 122 ? 999876 ? 61 ? 999937 ? 30 ? 999968 ? 45 ? 999952 ? 53 ? 999944 ? 49 ? 999948 ? 51 ! 51
result:
ok Correct position at 51
Test #25:
score: 0
Accepted
time: 2ms
memory: 3676kb
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 25 26 25 26 27 28 27 28 28
output:
? 250000 ? 749998 ? 125000 ? 874998 ? 62500 ? 937498 ? 31250 ? 968748 ? 15625 ? 984373 ? 7812 ? 992185 ? 3906 ? 996091 ? 1953 ? 998044 ? 976 ? 999021 ? 488 ? 999509 ? 244 ? 999753 ? 122 ? 999875 ? 61 ? 999936 ? 30 ? 999967 ? 45 ? 999951 ? 53 ? 999943 ? 49 ? 999947 ? 51 ! 51
result:
ok Correct position at 51
Test #26:
score: 0
Accepted
time: 2ms
memory: 3732kb
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 22 23 22 23 22 23 24 25 26 27 26 27 28 29 29
output:
? 250000 ? 750000 ? 125000 ? 875000 ? 62500 ? 937500 ? 31250 ? 968750 ? 15625 ? 984375 ? 7812 ? 992188 ? 3906 ? 996094 ? 1953 ? 998047 ? 976 ? 999024 ? 488 ? 999512 ? 244 ? 999756 ? 122 ? 999878 ? 183 ? 999817 ? 213 ? 999786 ? 228 ? 999771 ? 220 ? 999778 ? 216 ? 999782 ? 218 ? 999780 ? 217 ? 999781 ...
result:
ok Correct position at 999781
Test #27:
score: 0
Accepted
time: 0ms
memory: 3632kb
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 28 29 30 31 31
output:
? 250000 ? 749999 ? 125000 ? 874999 ? 62500 ? 937499 ? 31250 ? 968749 ? 15625 ? 984374 ? 7812 ? 992187 ? 3906 ? 996093 ? 1953 ? 998046 ? 976 ? 999023 ? 488 ? 999511 ? 244 ? 999755 ? 122 ? 999877 ? 61 ? 999938 ? 30 ? 999969 ? 15 ? 999984 ? 22 ? 999976 ? 18 ? 999980 ! 999980
result:
ok Correct position at 999980
Test #28:
score: 0
Accepted
time: 0ms
memory: 3636kb
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 28 29 30 31 31
output:
? 250000 ? 749998 ? 125000 ? 874998 ? 62500 ? 937498 ? 31250 ? 968748 ? 15625 ? 984373 ? 7812 ? 992186 ? 3906 ? 996092 ? 1953 ? 998045 ? 976 ? 999022 ? 488 ? 999510 ? 244 ? 999754 ? 122 ? 999876 ? 61 ? 999937 ? 30 ? 999968 ? 15 ? 999983 ? 22 ? 999975 ? 18 ? 999979 ! 999979
result:
ok Correct position at 999979
Test #29:
score: 0
Accepted
time: 3ms
memory: 3752kb
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 28 29 30 31 31
output:
? 250000 ? 749998 ? 125000 ? 874998 ? 62500 ? 937498 ? 31250 ? 968748 ? 15625 ? 984373 ? 7812 ? 992185 ? 3906 ? 996091 ? 1953 ? 998044 ? 976 ? 999021 ? 488 ? 999509 ? 244 ? 999753 ? 122 ? 999875 ? 61 ? 999936 ? 30 ? 999967 ? 15 ? 999982 ? 22 ? 999974 ? 18 ? 999978 ! 999978
result:
ok Correct position at 999978
Test #30:
score: 0
Accepted
time: 1ms
memory: 3732kb
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 2 3 4 3 4 5 6 5 6 6
output:
? 250000 ? 750000 ? 375000 ? 624999 ? 437500 ? 562498 ? 468750 ? 531248 ? 484375 ? 515623 ? 492187 ? 507810 ? 496093 ? 503903 ? 498046 ? 501950 ? 499022 ? 500973 ? 499510 ? 500484 ? 499754 ? 500240 ? 499876 ? 500118 ? 499937 ? 500057 ? 499967 ? 500026 ? 499952 ? 500041 ? 499944 ? 500049 ? 499948 ? 5...
result:
ok Correct position at 499947
Test #31:
score: 0
Accepted
time: 3ms
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 2 3 2 3 2 3 4 5 6 7 7
output:
? 250000 ? 749999 ? 375000 ? 624998 ? 437500 ? 562498 ? 468750 ? 531248 ? 484375 ? 515623 ? 492187 ? 507810 ? 496093 ? 503903 ? 498046 ? 501950 ? 499022 ? 500973 ? 499510 ? 500484 ? 499754 ? 500240 ? 499876 ? 500118 ? 499937 ? 500057 ? 499906 ? 500087 ? 499921 ? 500072 ? 499929 ? 500064 ? 499925 ? 5...
result:
ok Correct position at 500070
Test #32:
score: 0
Accepted
time: 3ms
memory: 3760kb
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 2 3 2 3 4 5 4 5 6 7 6 7 7
output:
? 250000 ? 749998 ? 375000 ? 624998 ? 437500 ? 562498 ? 468750 ? 531248 ? 484375 ? 515623 ? 492187 ? 507810 ? 496093 ? 503903 ? 498046 ? 501950 ? 499022 ? 500973 ? 499510 ? 500484 ? 499754 ? 500240 ? 499876 ? 500118 ? 499937 ? 500057 ? 499906 ? 500087 ? 499921 ? 500072 ? 499913 ? 500079 ? 499917 ? 5...
result:
ok Correct position at 500076
Test #33:
score: 0
Accepted
time: 2ms
memory: 3632kb
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 2 1 2 1 2 1 2 2
output:
? 250000 ? 749998 ? 375000 ? 624998 ? 437500 ? 562498 ? 468750 ? 531248 ? 484375 ? 515623 ? 492187 ? 507810 ? 496093 ? 503903 ? 498046 ? 501950 ? 499022 ? 500973 ? 499510 ? 500484 ? 499754 ? 500240 ? 499876 ? 500118 ? 499937 ? 500057 ? 499967 ? 500026 ? 499952 ? 500041 ? 499959 ? 500033 ? 499963 ? 5...
result:
ok Correct position at 499965
Test #34:
score: 0
Accepted
time: 2ms
memory: 3652kb
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 27 28 29 30 31 32 33 32 33 33
output:
? 250000 ? 750000 ? 375000 ? 624999 ? 312500 ? 687499 ? 281250 ? 718749 ? 265625 ? 734374 ? 257812 ? 742187 ? 253906 ? 746093 ? 251953 ? 748046 ? 250976 ? 749023 ? 250488 ? 749511 ? 250244 ? 749755 ? 250122 ? 749877 ? 250061 ? 749938 ? 250030 ? 749969 ? 250015 ? 749984 ? 250007 ? 749992 ? 250003 ? 7...
result:
ok Correct position at 749997
Test #35:
score: 0
Accepted
time: 1ms
memory: 3648kb
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 34 35 35
output:
? 250000 ? 749999 ? 125000 ? 874999 ? 62500 ? 937499 ? 31250 ? 968749 ? 15625 ? 984374 ? 7812 ? 992187 ? 3906 ? 996093 ? 1953 ? 998046 ? 976 ? 999023 ? 488 ? 999511 ? 244 ? 999755 ? 122 ? 999877 ? 61 ? 999938 ? 30 ? 999969 ? 15 ? 999984 ? 7 ? 999992 ? 3 ? 999996 ? 1 ? 999998 ? 2 ? 999997 ! 999997
result:
ok Correct position at 999997
Test #36:
score: 0
Accepted
time: 2ms
memory: 3640kb
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 34 35 35
output:
? 250000 ? 749998 ? 125000 ? 874998 ? 62500 ? 937498 ? 31250 ? 968748 ? 15625 ? 984373 ? 7812 ? 992186 ? 3906 ? 996092 ? 1953 ? 998045 ? 976 ? 999022 ? 488 ? 999510 ? 244 ? 999754 ? 122 ? 999876 ? 61 ? 999937 ? 30 ? 999968 ? 15 ? 999983 ? 7 ? 999991 ? 3 ? 999995 ? 1 ? 999997 ? 2 ? 999996 ! 999996
result:
ok Correct position at 999996
Test #37:
score: 0
Accepted
time: 2ms
memory: 3736kb
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 34 35 35
output:
? 250000 ? 749998 ? 125000 ? 874998 ? 62500 ? 937498 ? 31250 ? 968748 ? 15625 ? 984373 ? 7812 ? 992185 ? 3906 ? 996091 ? 1953 ? 998044 ? 976 ? 999021 ? 488 ? 999509 ? 244 ? 999753 ? 122 ? 999875 ? 61 ? 999936 ? 30 ? 999967 ? 15 ? 999982 ? 7 ? 999990 ? 3 ? 999994 ? 1 ? 999996 ? 2 ? 999995 ! 999995
result:
ok Correct position at 999995
Test #38:
score: 0
Accepted
time: 2ms
memory: 3704kb
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
output:
? 250000 ? 750000 ? 125000 ? 875000 ? 62500 ? 937500 ? 31250 ? 968750 ? 15625 ? 984375 ? 7812 ? 992188 ? 3906 ? 996094 ? 1953 ? 998047 ? 976 ? 999024 ? 488 ? 999512 ? 244 ? 999756 ? 122 ? 999878 ? 61 ? 999939 ? 30 ? 999970 ? 15 ? 999985 ? 7 ? 999993 ? 3 ? 999997 ? 1 ? 999999 ! 1000000
result:
ok Correct position at 1000000
Test #39:
score: 0
Accepted
time: 2ms
memory: 3620kb
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
output:
? 250000 ? 749999 ? 125000 ? 874999 ? 62500 ? 937499 ? 31250 ? 968749 ? 15625 ? 984374 ? 7812 ? 992187 ? 3906 ? 996093 ? 1953 ? 998046 ? 976 ? 999023 ? 488 ? 999511 ? 244 ? 999755 ? 122 ? 999877 ? 61 ? 999938 ? 30 ? 999969 ? 15 ? 999984 ? 7 ? 999992 ? 3 ? 999996 ? 1 ? 999998 ! 999999
result:
ok Correct position at 999999
Test #40:
score: 0
Accepted
time: 2ms
memory: 3700kb
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
output:
? 250000 ? 749998 ? 125000 ? 874998 ? 62500 ? 937498 ? 31250 ? 968748 ? 15625 ? 984373 ? 7812 ? 992186 ? 3906 ? 996092 ? 1953 ? 998045 ? 976 ? 999022 ? 488 ? 999510 ? 244 ? 999754 ? 122 ? 999876 ? 61 ? 999937 ? 30 ? 999968 ? 15 ? 999983 ? 7 ? 999991 ? 3 ? 999995 ? 1 ? 999997 ! 999998
result:
ok Correct position at 999998
Test #41:
score: 0
Accepted
time: 2ms
memory: 3648kb
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
output:
? 250000 ? 749998 ? 125000 ? 874998 ? 62500 ? 937498 ? 31250 ? 968748 ? 15625 ? 984373 ? 7812 ? 992185 ? 3906 ? 996091 ? 1953 ? 998044 ? 976 ? 999021 ? 488 ? 999509 ? 244 ? 999753 ? 122 ? 999875 ? 61 ? 999936 ? 30 ? 999967 ? 15 ? 999982 ? 7 ? 999990 ? 3 ? 999994 ? 1 ? 999996 ! 999997
result:
ok Correct position at 999997
Test #42:
score: 0
Accepted
time: 0ms
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 33 34 35 36
output:
? 250000 ? 750000 ? 125000 ? 875000 ? 62500 ? 937500 ? 31250 ? 968750 ? 15625 ? 984375 ? 7812 ? 992188 ? 3906 ? 996094 ? 1953 ? 998047 ? 976 ? 999024 ? 488 ? 999512 ? 244 ? 999756 ? 122 ? 999878 ? 61 ? 999939 ? 30 ? 999970 ? 15 ? 999985 ? 7 ? 999993 ? 3 ? 999997 ? 1 ? 999999 ! 1000000
result:
ok Correct position at 1000000
Test #43:
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 25 26 27 28 29 30 31 32 33 34 34
output:
? 250000 ? 750000 ? 125000 ? 875000 ? 62500 ? 937500 ? 31250 ? 968750 ? 15625 ? 984375 ? 7812 ? 992188 ? 3906 ? 996094 ? 1953 ? 998047 ? 976 ? 999024 ? 488 ? 999512 ? 244 ? 999756 ? 122 ? 999878 ? 61 ? 999939 ? 30 ? 999970 ? 15 ? 999985 ? 7 ? 999993 ? 3 ? 999997 ? 1 ! 1
result:
ok Correct position at 1