QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#506405 | #7804. Intersegment Activation | Wall_breaker | WA | 3ms | 3688kb | C++14 | 1.2kb | 2024-08-05 17:12:38 | 2024-08-05 17:12:38 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
vector <int> q[11];
int ask(int l, int r) {
cout << l << ' ' << r << '\n';
cout << flush;
int ret;
cin >> ret;
return ret;
}
int cnt, cur, n;
bool dfs(int dep) {
if (dep == q[cnt].size()) return false;
int temp = ask(cnt, q[cnt][dep]);
bool flg = false;
if (temp == n) {
cur = n;
return true;
}
if (temp < cur) {
flg = true;
temp = ask(cnt, q[cnt][dep]);
cur = temp;
}
if (temp > cur) {
cur = temp;
flg = true;
}
if (dfs(dep + 1)) {
if (cur == n) return true;
return true;
}
if (!flg) {
temp = ask(cnt, q[cnt][dep]);
if (temp == n) {
cur = n;
return true;
}
if (temp < cur) {
flg = true;
temp = ask(cnt, q[cnt][dep]);
cur = temp;
}
if (temp > cur) {
cur = temp;
flg = true;
}
if (dfs(dep + 1)) {
if (cur == n) return true;
return true;
}
}
return flg;
}
int main() {
cin >> n;
for (int i = 1; i <= n; i ++) {
for (int j = n; j >= i; j --) {
q[i].push_back(j);
}
}
cin >> cur;
cnt = 1;
while (cur != n && cnt != n + 1) {
dfs(0);
cnt ++;
}
assert(cur == n);
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3560kb
input:
3 0 0 0 0 0 0 0 0 0 1 0 1 3
output:
1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 3 1 2 1 1 1 1 2 3
result:
ok OK, 12 queries
Test #2:
score: 0
Accepted
time: 1ms
memory: 3600kb
input:
1 0 1
output:
1 1
result:
ok OK, 1 queries
Test #3:
score: 0
Accepted
time: 0ms
memory: 3680kb
input:
2 1 0 1 2
output:
1 2 1 2 1 1
result:
ok OK, 3 queries
Test #4:
score: 0
Accepted
time: 1ms
memory: 3664kb
input:
2 0 0 1 2
output:
1 2 1 1 2 2
result:
ok OK, 3 queries
Test #5:
score: 0
Accepted
time: 1ms
memory: 3688kb
input:
2 0 0 0 0 0 1 2
output:
1 2 1 1 1 1 1 2 1 1 2 2
result:
ok OK, 6 queries
Test #6:
score: 0
Accepted
time: 1ms
memory: 3684kb
input:
2 0 2
output:
1 2
result:
ok OK, 1 queries
Test #7:
score: 0
Accepted
time: 1ms
memory: 3532kb
input:
3 0 1 2 3
output:
1 3 1 2 1 1
result:
ok OK, 3 queries
Test #8:
score: 0
Accepted
time: 0ms
memory: 3532kb
input:
3 0 0 0 1 1 2 3
output:
1 3 1 2 1 1 2 3 2 2 3 3
result:
ok OK, 6 queries
Test #9:
score: 0
Accepted
time: 0ms
memory: 3684kb
input:
3 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 2 3
output:
1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 3 1 2 1 1 1 1 1 2 1 1 2 3 2 2 2 2 2 3 2 2 3 3
result:
ok OK, 19 queries
Test #10:
score: 0
Accepted
time: 1ms
memory: 3600kb
input:
3 0 3
output:
1 3
result:
ok OK, 1 queries
Test #11:
score: 0
Accepted
time: 0ms
memory: 3684kb
input:
4 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 2 1 2 2 3 4
output:
1 4 1 3 1 2 1 1 1 1 1 2 1 1 2 4 2 3 2 2 2 2 2 3 2 2 2 2 2 4 2 3 2 2 2 2 3 4 3 3 4 4
result:
ok OK, 21 queries
Test #12:
score: 0
Accepted
time: 1ms
memory: 3684kb
input:
4 0 0 0 0 1 1 1 2 2 3 4
output:
1 4 1 3 1 2 1 1 2 4 2 3 2 2 3 4 3 3 4 4
result:
ok OK, 10 queries
Test #13:
score: 0
Accepted
time: 1ms
memory: 3532kb
input:
4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 3 4
output:
1 4 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 4 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 3 1 2 1 1 1 1 1 2 1 1 2 4 2 3 2 2 2 2 2 3 2 2 2 2 2 4 2 3 2 2 2 2 2 3 2 2 3 4 3 3 3 3 3 4 3 3 4 4
result:
ok OK, 48 queries
Test #14:
score: 0
Accepted
time: 1ms
memory: 3556kb
input:
4 0 4
output:
1 4
result:
ok OK, 1 queries
Test #15:
score: 0
Accepted
time: 1ms
memory: 3560kb
input:
5 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 4 5
output:
1 5 1 4 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 3 1 2 1 1 1 1 2 5 2 4 2 3 2 2 2 2 2 3 2 2 2 2 2 4 2 3 2 2 2 2 2 3 2 2 2 2 2 5 2 4 2 3 2 2 2 2 2 3 2 2 2 2 2 4 2 3 2 2 3 5 3 4 3 3 3 3 3 4 3 3 3 3 3 5 3 4 3 3 3 3 3 4 3 3 4 5 4 4 5 5
result:
ok OK, 55 queries
Test #16:
score: 0
Accepted
time: 1ms
memory: 3560kb
input:
5 0 0 0 0 0 1 1 1 1 2 2 2 3 3 4 5
output:
1 5 1 4 1 3 1 2 1 1 2 5 2 4 2 3 2 2 3 5 3 4 3 3 4 5 4 4 5 5
result:
ok OK, 15 queries
Test #17:
score: 0
Accepted
time: 1ms
memory: 3600kb
input:
5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 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1 4 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 3 1 2 ...
result:
ok OK, 129 queries
Test #20:
score: 0
Accepted
time: 0ms
memory: 3680kb
input:
6 0 0 0 0 0 0 1 1 1 1 1 2 2 2 2 3 3 3 4 4 5 6
output:
1 6 1 5 1 4 1 3 1 2 1 1 2 6 2 5 2 4 2 3 2 2 3 6 3 5 3 4 3 3 4 6 4 5 4 4 5 6 5 5 6 6
result:
ok OK, 21 queries
Test #21:
score: 0
Accepted
time: 2ms
memory: 3592kb
input:
6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
1 6 1 5 1 4 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 4 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 5 1 4 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 4 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 6 1 5 1 4 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 3 1 2 ...
result:
ok OK, 234 queries
Test #22:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
6 0 6
output:
1 6
result:
ok OK, 1 queries
Test #23:
score: 0
Accepted
time: 1ms
memory: 3592kb
input:
7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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1 5 1 4 1 3 1 2 1 1 1 1 1 2 1 1 1 1 ...
result:
ok OK, 996 queries
Test #30:
score: 0
Accepted
time: 0ms
memory: 3524kb
input:
8 0 8
output:
1 8
result:
ok OK, 1 queries
Test #31:
score: 0
Accepted
time: 0ms
memory: 3684kb
input:
9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
output:
1 9 1 8 1 7 1 6 1 5 1 4 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 4 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 5 1 4 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 4 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 6 1 5 1 4 1 3 1 2 1 1 1 1 1 2 1 1 ...
result:
ok OK, 1052 queries
Test #32:
score: 0
Accepted
time: 1ms
memory: 3524kb
input:
9 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3 4 4 4 4 4 5 5 5 5 6 6 6 7 7 8 9
output:
1 9 1 8 1 7 1 6 1 5 1 4 1 3 1 2 1 1 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 3 9 3 8 3 7 3 6 3 5 3 4 3 3 4 9 4 8 4 7 4 6 4 5 4 4 5 9 5 8 5 7 5 6 5 5 6 9 6 8 6 7 6 6 7 9 7 8 7 7 8 9 8 8 9 9
result:
ok OK, 45 queries
Test #33:
score: 0
Accepted
time: 3ms
memory: 3604kb
input:
9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
output:
1 9 1 8 1 7 1 6 1 5 1 4 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 4 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 5 1 4 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 4 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 6 1 5 1 4 1 3 1 2 1 1 1 1 1 2 1 1 ...
result:
ok OK, 2017 queries
Test #34:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
9 0 9
output:
1 9
result:
ok OK, 1 queries
Test #35:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
1 10 1 9 1 8 1 7 1 6 1 5 1 4 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 4 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 5 1 4 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 4 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 6 1 5 1 4 1 3 1 2 1 1 1 1 1 2...
result:
ok OK, 2238 queries
Test #36:
score: 0
Accepted
time: 1ms
memory: 3524kb
input:
10 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 6 6 6 6 7 7 7 8 8 9 10
output:
1 10 1 9 1 8 1 7 1 6 1 5 1 4 1 3 1 2 1 1 2 10 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 3 10 3 9 3 8 3 7 3 6 3 5 3 4 3 3 4 10 4 9 4 8 4 7 4 6 4 5 4 4 5 10 5 9 5 8 5 7 5 6 5 5 6 10 6 9 6 8 6 7 6 6 7 10 7 9 7 8 7 7 8 10 8 9 8 8 9 10 9 9 10 10
result:
ok OK, 55 queries
Test #37:
score: -100
Wrong Answer
time: 3ms
memory: 3608kb
input:
10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
1 10 1 9 1 8 1 7 1 6 1 5 1 4 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 4 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 5 1 4 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 4 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 6 1 5 1 4 1 3 1 2 1 1 1 1 1 2...
result:
wrong answer Didn't solve the problem in 2500 queries