QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#934177 | #6394. Turn on the Light | dxy | AC ✓ | 1ms | 3584kb | C++14 | 4.7kb | 2025-03-14 15:12:19 | 2025-03-14 15:12:20 |
Judging History
answer
#include <iostream>
#include <cstdio>
#include <sstream>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<set>
#include<queue>
#include<deque>
#include <array>
#include <vector>
#include<stack>
#include <numeric>
#include <iomanip>
#include <map>
#include<cctype>
#include <list>
#include <unordered_set>
#include <unordered_map>
#define MAXN 2024000
#define INF 0x3f3f3f3f
#define MOD 100007
using namespace std;
//priority_queue<int, vector<int>, greater<int> >q;
//priority_queue <int, vector<int>, less<int> >q;
long long T = 1;
long long n, m, k, a, b, c, d, t, z, x, y, t1, t2, t3, t4, a1, b1, w, p,h;
long long num = 0, maxx = 0, minn = -1;
long long l, r, head, tail;
long long ans = -1;
struct node {
long long num;
string name;
int ans;
};
vector<int>vec[50];
map<pair<int,int>,long long>mp;
//map<string, int>mp;
//int flag = 0;
//bool cmp(node a, node b) {
// return a.num > b.num;
//}
//int find(int x) {
// if (fa[x] != x) {
// fa[x] = find(fa[x]);
// }
// return fa[x];
//}
//void unionsn(int l,int r) {
// int a =find(l);
// int b = find(r);
// //cout << a << " " << b << "\n";
// if (a != b) {
// int x = max(a, b);
// int y = min(a, b);
// fa[x] = y;
// //cout << fa[x] << "\n";
// }
//}
//int dx[4] = { 1, -1, 0, 0 };
//int dy[4] = { 0, 0, 1, -1 };
int vis[50];
set<int>ss;
//bool check(int x, int y, int z) {
// if (x <0 || y < 0 || z < 0 || x >= m || y >= n || z >= h || volumn[z][x][y] == 0) {
// return false;
// }
// return true;
//}
//void Dfs(int x,long long temp) {
// if (x==n) {
// //cout << temp << "\n";
// if (ans==-1||ans > temp) {
// ans = temp;
// }
// return;
// }
// for (int i = 0; i <vec[x].size(); i++) {
// if (vis[vec[x][i]] == 0) {
// //cout <<x<<" "<< vec[x][i] << "\n";
// vis[vec[x][i]] = 1;
// Dfs(vec[x][i], temp ^ mp[{x,vec[x][i]}]);
// vis[vec[x][i]] = 0;
// }
// }
// return;
//}
//int Bfs(int x,int y,int z) {
// node t={ x,y,z };
// int num = 1;
// queue<node>q;
// q.push(t);
// volumn[z][x][y] = 0;
// while (!q.empty()) {
// node temp = q.front();
// q.pop();
// for(int i = 0; i < 6; i++) {
// if (check(temp.x + direct[i][0], temp.y + direct[i][1], temp.z + direct[i][2])) {
// q.push({ temp.x + direct[i][0],temp.y + direct[i][1] ,temp.z + direct[i][2] });
// volumn[temp.z + direct[i][2]][temp.x + direct[i][0]][temp.y + direct[i][1]] = 0;
// num++;
// }
// }
// }
// return num;
//}
//void add(int x) {
// for (int i = x; i <= n; i += i & -i) {
// aa[i]++;
// }
//}
//int ask(int x) {
// int ans = 0;
// for (int i = x; i > 0; i -= i & -i) {
// ans += aa[i];
// }
// return ans;
//}
//void Dijastra(int x) {
// memset(dis, INF, sizeof(dis));
// memset(times, INF, sizeof(times));
// memset(vis, 0, sizeof(vis));
// times[x] = 0;
// for (int i = 0; i < n; i++) {
// int t = -1;
// for (int j = 0; j < n; j++) {
// if (vis[j]==0&&(t==-1||times[j]<times[t])) {
// t=j;
// }
// }
// //cout << t << "\n";
// vis[t] = 1;
// for (int j = 0; j < n; j++) {
// if (times[j] > times[t] + ti[t][j]) {
// times[j] = times[t] + ti[t][j];
// dis[j] = dis[t] + length[t][j];
// pre1[j] = t;
// }
// else if(times[j] == times[t] + ti[t][j]){
// if (dis[j] > dis[t] + length[t][j]) {
// dis[j] = dis[t] + length[t][j];
// pre1[j] = t;
// }
// }
// }
// }
//}
void solve() {
cin >> n;
long long op = 0, pre = 0;
for (int i = 1; i <= 20; i++) {
cout << "? " << i << "\n";
cin >> op;
if (op == pre) {
cout << "! " << i << "\n";
return;
}
pre = op;
}
long long l = 21, r = 1e6, mid = 0;
pre = 20;
while (l <= r) {
mid = (l + r) / 2;
cout << "? " << mid << "\n";
cin >> op;
if (op == pre) {
cout << "! " << mid << "\n";
return;
}
else if(op>pre){
l = mid + 1;
}
else {
r = mid - 1;
}
pre = op;
}
return;
}
int main()
{
//ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
//cin >> T;
while (T--) {
solve();
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3584kb
input:
3 1 2 2
output:
? 1 ? 2 ? 3 ! 3
result:
ok Correct position at 3
Test #2:
score: 0
Accepted
time: 0ms
memory: 3456kb
input:
10 1 2 3 4 5 6 7 8 8
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ! 9
result:
ok Correct position at 9
Test #3:
score: 0
Accepted
time: 0ms
memory: 3456kb
input:
9 1 2 3 4 5 6 7 7
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ! 8
result:
ok Correct position at 8
Test #4:
score: 0
Accepted
time: 1ms
memory: 3584kb
input:
8 1 2 3 4 5 6 6
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ! 7
result:
ok Correct position at 7
Test #5:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
7 1 2 3 4 5 5
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ! 6
result:
ok Correct position at 6
Test #6:
score: 0
Accepted
time: 1ms
memory: 3456kb
input:
6 1 2 3 4 5 5
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ! 6
result:
ok Correct position at 6
Test #7:
score: 0
Accepted
time: 0ms
memory: 3456kb
input:
5 1 2 3 3
output:
? 1 ? 2 ? 3 ? 4 ! 4
result:
ok Correct position at 4
Test #8:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
4 1 2 3 3
output:
? 1 ? 2 ? 3 ? 4 ! 4
result:
ok Correct position at 4
Test #9:
score: 0
Accepted
time: 1ms
memory: 3456kb
input:
3 1 1
output:
? 1 ? 2 ! 2
result:
ok Correct position at 2
Test #10:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
2 1 1
output:
? 1 ? 2 ! 2
result:
ok Correct position at 2
Test #11:
score: 0
Accepted
time: 1ms
memory: 3456kb
input:
1 0
output:
? 1 ! 1
result:
ok Correct position at 1
Test #12:
score: 0
Accepted
time: 1ms
memory: 3584kb
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 24 25 26 27 28 29 30 31 32 31 32 31 32 33 33
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 750005 ? 875003 ? 937502 ? 906252 ? 921877 ? 929689 ? 933595 ? 935548 ? 936525 ? 937013 ? 937257 ? 937379 ? 937440 ? 937471 ? 937455 ? 937463 ? 937459 ? 937461 ? 937462 ! 937462
result:
ok Correct position at 937462
Test #13:
score: 0
Accepted
time: 1ms
memory: 3456kb
input:
999999 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 19 18 19 18 19 20 21 22 23 24 25 26 27 28 27 28 27 28 29 29
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 250015 ? 125017 ? 187516 ? 156266 ? 171891 ? 179703 ? 183609 ? 185562 ? 186539 ? 187027 ? 187271 ? 187393 ? 187454 ? 187485 ? 187469 ? 187477 ? 187473 ? 187475 ? 187476 ! 187476
result:
ok Correct position at 187476
Test #14:
score: 0
Accepted
time: 0ms
memory: 3456kb
input:
999998 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 19 18 19 18 19 20 21 22 23 24 25 26 27 28 27 28 27 28 29 29
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 250015 ? 125017 ? 187516 ? 156266 ? 171891 ? 179703 ? 183609 ? 185562 ? 186539 ? 187027 ? 187271 ? 187393 ? 187454 ? 187485 ? 187469 ? 187477 ? 187473 ? 187475 ? 187476 ! 187476
result:
ok Correct position at 187476
Test #15:
score: 0
Accepted
time: 1ms
memory: 3456kb
input:
999997 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 19 18 19 18 19 20 21 22 23 24 25 26 27 28 27 28 27 28 29 29
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 250015 ? 125017 ? 187516 ? 156266 ? 171891 ? 179703 ? 183609 ? 185562 ? 186539 ? 187027 ? 187271 ? 187393 ? 187454 ? 187485 ? 187469 ? 187477 ? 187473 ? 187475 ? 187476 ! 187476
result:
ok Correct position at 187476
Test #16:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
999996 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 19 18 19 18 19 20 21 22 23 24 25 26 27 28 27 28 27 28 29 29
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 250015 ? 125017 ? 187516 ? 156266 ? 171891 ? 179703 ? 183609 ? 185562 ? 186539 ? 187027 ? 187271 ? 187393 ? 187454 ? 187485 ? 187469 ? 187477 ? 187473 ? 187475 ? 187476 ! 187476
result:
ok Correct position at 187476
Test #17:
score: 0
Accepted
time: 0ms
memory: 3456kb
input:
999995 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 19 18 19 18 19 20 21 22 23 24 25 26 27 28 27 28 27 28 29 29
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 250015 ? 125017 ? 187516 ? 156266 ? 171891 ? 179703 ? 183609 ? 185562 ? 186539 ? 187027 ? 187271 ? 187393 ? 187454 ? 187485 ? 187469 ? 187477 ? 187473 ? 187475 ? 187476 ! 187476
result:
ok Correct position at 187476
Test #18:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
999994 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 19 18 19 18 19 20 21 22 23 24 25 26 27 28 27 28 27 28 29 29
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 250015 ? 125017 ? 187516 ? 156266 ? 171891 ? 179703 ? 183609 ? 185562 ? 186539 ? 187027 ? 187271 ? 187393 ? 187454 ? 187485 ? 187469 ? 187477 ? 187473 ? 187475 ? 187476 ! 187476
result:
ok Correct position at 187476
Test #19:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
999993 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 19 18 19 18 19 20 21 22 23 24 25 26 27 28 27 28 27 28 29 29
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 250015 ? 125017 ? 187516 ? 156266 ? 171891 ? 179703 ? 183609 ? 185562 ? 186539 ? 187027 ? 187271 ? 187393 ? 187454 ? 187485 ? 187469 ? 187477 ? 187473 ? 187475 ? 187476 ! 187476
result:
ok Correct position at 187476
Test #20:
score: 0
Accepted
time: 0ms
memory: 3456kb
input:
999992 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 19 18 19 18 19 20 21 22 23 24 25 26 27 28 27 28 27 28 29 29
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 250015 ? 125017 ? 187516 ? 156266 ? 171891 ? 179703 ? 183609 ? 185562 ? 186539 ? 187027 ? 187271 ? 187393 ? 187454 ? 187485 ? 187469 ? 187477 ? 187473 ? 187475 ? 187476 ! 187476
result:
ok Correct position at 187476
Test #21:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
999991 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 19 18 19 18 19 20 21 22 23 24 25 26 27 28 27 28 27 28 29 29
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 250015 ? 125017 ? 187516 ? 156266 ? 171891 ? 179703 ? 183609 ? 185562 ? 186539 ? 187027 ? 187271 ? 187393 ? 187454 ? 187485 ? 187469 ? 187477 ? 187473 ? 187475 ? 187476 ! 187476
result:
ok Correct position at 187476
Test #22:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
1000000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 6 7 6 5 5
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 250015 ? 125017 ? 62518 ? 31269 ? 15644 ? 7832 ? 3926 ? 1973 ? 996 ? 508 ? 264 ? 142 ? 81 ? 50 ? 35 ? 42 ? 46 ? 44 ? 43 ! 43
result:
ok Correct position at 43
Test #23:
score: 0
Accepted
time: 1ms
memory: 3456kb
input:
999999 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 7 6 5 4 4
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 250015 ? 125017 ? 62518 ? 31269 ? 15644 ? 7832 ? 3926 ? 1973 ? 996 ? 508 ? 264 ? 142 ? 81 ? 50 ? 65 ? 57 ? 53 ? 51 ! 51
result:
ok Correct position at 51
Test #24:
score: 0
Accepted
time: 0ms
memory: 3456kb
input:
999998 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 7 6 5 4 4
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 250015 ? 125017 ? 62518 ? 31269 ? 15644 ? 7832 ? 3926 ? 1973 ? 996 ? 508 ? 264 ? 142 ? 81 ? 50 ? 65 ? 57 ? 53 ? 51 ! 51
result:
ok Correct position at 51
Test #25:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
999997 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 7 6 5 4 4
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 250015 ? 125017 ? 62518 ? 31269 ? 15644 ? 7832 ? 3926 ? 1973 ? 996 ? 508 ? 264 ? 142 ? 81 ? 50 ? 65 ? 57 ? 53 ? 51 ! 51
result:
ok Correct position at 51
Test #26:
score: 0
Accepted
time: 0ms
memory: 3456kb
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 30 31 30 31 31
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 750005 ? 875003 ? 937502 ? 968751 ? 984376 ? 992188 ? 996094 ? 998047 ? 999024 ? 999512 ? 999756 ? 999878 ? 999817 ? 999786 ? 999771 ? 999778 ? 999782 ? 999780 ? 999781 ! 999781
result:
ok Correct position at 999781
Test #27:
score: 0
Accepted
time: 0ms
memory: 3584kb
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 34 35 35
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 750005 ? 875003 ? 937502 ? 968751 ? 984376 ? 992188 ? 996094 ? 998047 ? 999024 ? 999512 ? 999756 ? 999878 ? 999939 ? 999970 ? 999985 ? 999977 ? 999981 ? 999979 ? 999980 ! 999980
result:
ok Correct position at 999980
Test #28:
score: 0
Accepted
time: 1ms
memory: 3456kb
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 34 34
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 750005 ? 875003 ? 937502 ? 968751 ? 984376 ? 992188 ? 996094 ? 998047 ? 999024 ? 999512 ? 999756 ? 999878 ? 999939 ? 999970 ? 999985 ? 999977 ? 999981 ? 999979 ! 999979
result:
ok Correct position at 999979
Test #29:
score: 0
Accepted
time: 0ms
memory: 3456kb
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 34 33 33
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 750005 ? 875003 ? 937502 ? 968751 ? 984376 ? 992188 ? 996094 ? 998047 ? 999024 ? 999512 ? 999756 ? 999878 ? 999939 ? 999970 ? 999985 ? 999977 ? 999981 ? 999979 ? 999978 ! 999978
result:
ok Correct position at 999978
Test #30:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
1000000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 19 20 21 22 23 24 25 26 27 28 29 30 31 30 31 32 33 34 35 35
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 250015 ? 375012 ? 437511 ? 468760 ? 484385 ? 492197 ? 496103 ? 498056 ? 499033 ? 499521 ? 499765 ? 499887 ? 499948 ? 499917 ? 499932 ? 499940 ? 499944 ? 499946 ? 499947 ! 499947
result:
ok Correct position at 499947
Test #31:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
999999 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 20 19 18 17 16 15 14 13 12 11 10 9 8 9 10 11 12 13 13
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 750005 ? 625007 ? 562508 ? 531259 ? 515634 ? 507822 ? 503916 ? 501963 ? 500986 ? 500498 ? 500254 ? 500132 ? 500071 ? 500040 ? 500055 ? 500063 ? 500067 ? 500069 ? 500070 ! 500070
result:
ok Correct position at 500070
Test #32:
score: 0
Accepted
time: 0ms
memory: 3456kb
input:
999998 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 20 19 18 17 16 15 14 13 12 11 10 9 10 9 8 7 8 8
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 750005 ? 625007 ? 562508 ? 531259 ? 515634 ? 507822 ? 503916 ? 501963 ? 500986 ? 500498 ? 500254 ? 500132 ? 500071 ? 500101 ? 500086 ? 500078 ? 500074 ? 500076 ! 500076
result:
ok Correct position at 500076
Test #33:
score: 0
Accepted
time: 1ms
memory: 3584kb
input:
999997 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 19 20 21 22 23 24 25 26 27 28 29 30 31 32 31 32 31 30 30
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 250015 ? 375012 ? 437511 ? 468760 ? 484385 ? 492197 ? 496103 ? 498056 ? 499033 ? 499521 ? 499765 ? 499887 ? 499948 ? 499979 ? 499963 ? 499971 ? 499967 ? 499965 ! 499965
result:
ok Correct position at 499965
Test #34:
score: 0
Accepted
time: 1ms
memory: 3584kb
input:
1000000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 21 20 21 20 21 22 23 22 23 24 25 26 25 26 25 24 23 23
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 750005 ? 875003 ? 812504 ? 781254 ? 796879 ? 789066 ? 792972 ? 794925 ? 795902 ? 795413 ? 795657 ? 795779 ? 795840 ? 795871 ? 795855 ? 795863 ? 795859 ? 795857 ? 795856 ! 795856
result:
ok Correct position at 795856
Test #35:
score: 0
Accepted
time: 1ms
memory: 3584kb
input:
999999 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 19 18 19 18 19 18 19 20 21 20 21 22 23 24 23 24 23 22 21 21
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 250015 ? 125017 ? 187516 ? 156266 ? 171891 ? 164078 ? 167984 ? 169937 ? 170914 ? 170425 ? 170669 ? 170791 ? 170852 ? 170883 ? 170867 ? 170875 ? 170871 ? 170869 ? 170868 ! 170868
result:
ok Correct position at 170868
Test #36:
score: 0
Accepted
time: 0ms
memory: 3456kb
input:
999998 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 19 18 19 18 19 18 19 20 21 20 21 22 23 24 23 24 23 22 21 21
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 250015 ? 125017 ? 187516 ? 156266 ? 171891 ? 164078 ? 167984 ? 169937 ? 170914 ? 170425 ? 170669 ? 170791 ? 170852 ? 170883 ? 170867 ? 170875 ? 170871 ? 170869 ? 170868 ! 170868
result:
ok Correct position at 170868
Test #37:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
999997 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 19 18 19 18 19 18 19 20 21 20 21 22 23 24 23 24 23 22 21 21
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 250015 ? 125017 ? 187516 ? 156266 ? 171891 ? 164078 ? 167984 ? 169937 ? 170914 ? 170425 ? 170669 ? 170791 ? 170852 ? 170883 ? 170867 ? 170875 ? 170871 ? 170869 ? 170868 ! 170868
result:
ok Correct position at 170868
Test #38:
score: 0
Accepted
time: 0ms
memory: 3456kb
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 39 39
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 750005 ? 875003 ? 937502 ? 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: 1ms
memory: 3584kb
input:
999999 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 37
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 750005 ? 875003 ? 812504 ? 843753 ? 859378 ? 867190 ? 871096 ? 873049 ? 874026 ? 874514 ? 874758 ? 874880 ? 874941 ? 874972 ? 874987 ? 874995 ? 874999 ? 875001 ? 875002 ! 875002
result:
ok Correct position at 875002
Test #40:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
999998 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 37
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 250015 ? 375012 ? 437511 ? 468760 ? 484385 ? 492197 ? 496103 ? 498056 ? 499033 ? 499521 ? 499765 ? 499887 ? 499948 ? 499979 ? 499994 ? 500002 ? 500006 ? 500008 ? 500009 ! 500009
result:
ok Correct position at 500009
Test #41:
score: 0
Accepted
time: 1ms
memory: 3456kb
input:
999997 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 37
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 250015 ? 375012 ? 437511 ? 468760 ? 484385 ? 492197 ? 496103 ? 498056 ? 499033 ? 499521 ? 499765 ? 499887 ? 499948 ? 499979 ? 499994 ? 500002 ? 500006 ? 500008 ? 500009 ! 500009
result:
ok Correct position at 500009
Test #42:
score: 0
Accepted
time: 1ms
memory: 3456kb
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 39 39
output:
? 1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 10 ? 11 ? 12 ? 13 ? 14 ? 15 ? 16 ? 17 ? 18 ? 19 ? 20 ? 500010 ? 750005 ? 875003 ? 937502 ? 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: 0ms
memory: 3584kb
input:
1000000 0
output:
? 1 ! 1
result:
ok Correct position at 1