QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#496927 | #4218. Hidden Graph | haze | TL | 68ms | 5860kb | C++23 | 2.3kb | 2024-07-28 17:01:01 | 2024-07-28 17:01:02 |
Judging History
answer
/*
Author: Haze
2024/7/28
*/
#include <bits/stdc++.h>
#define irep(i, l, r) for(int i = (l); i <= (r); ++ i)
#define drep(i, r, l) for(int i = (r); i >= (l); -- i)
#define IOS ios::sync_with_stdio(false), cin.tie(nullptr);
using namespace std;
typedef long long ll;
inline ll readL() {
ll s = 0;
bool fl = false;
char ch = (char) getchar();
while (!isdigit(ch)) {
if (ch == '-')fl = true;
ch = (char) getchar();
}
while (isdigit(ch)) {
s = s * 10 + (ch ^ 48);
ch = (char) getchar();
}
return fl ? -s : s;
}
inline int read() {
return (int) (readL());
}
const int mod = 1000000000 + 7;
const int itinf = 1000000999;
const ll llinf = 2e18;
const int N = 500099;
int F[N], G[N];
std::mt19937 rng(std::chrono::system_clock::now().time_since_epoch().count());
array<int, 2> query(set<int>&node){
if(node.size() == 1){
return {-1, -1};
}
cout << "? " << node.size();
for(int x : node){
cout << " " << F[x];
}
cout << endl;
array<int, 2>ar{};
cin >> ar[0] >> ar[1];
if(ar[0] != -1)ar[0] = G[ar[0]], ar[1] = G[ar[1]];
return ar;
}
void solve() {
int n;
cin >> n;
irep(i, 1, n)F[i] = i, G[i] = i;
if(n != 2000)
shuffle(F + 1, F + n + 1, rng);
irep(i, 1, n){
G[F[i]] = i;
}
vector<set<int>>col = {{1}};
vector<array<int, 2>>edge;
irep(u, 2, n){
int to = -1;
irep(c, 0, col.size() - 1){
auto vec = col[c];
vec.emplace(u);
auto [i, j] = query(vec);
if(i == -1){
if(to == -1 or col[to].size() < col[c].size()){
to = c;
}
}
while(i != -1){
edge.push_back({i, j});
vec.erase(i + j - u);
auto T = query(vec);
i = T[0], j = T[1];
}
}
if(to == -1){
col.push_back({u});
}
else col[to].insert(u);
}
cout << "! " << edge.size() << endl;
for(auto [u, v] : edge){
cout << F[u] << ' ' << F[v] << endl;
}
}
int main() {
// IOS
int T = 1;
while (T--) {
solve();
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 5796kb
input:
3 2 3 1 2 1 3
output:
? 2 2 3 ? 2 2 1 ? 2 3 1 ! 3 2 3 1 2 1 3
result:
ok correct
Test #2:
score: 0
Accepted
time: 1ms
memory: 5660kb
input:
10 -1 -1 2 5 -1 -1 -1 -1 -1 -1 -1 -1 2 6 -1 -1 -1 -1 3 7 3 9 3 10 -1 -1 -1 -1 -1 -1 1 3 1 2 1 4 4 10 4 5 -1 -1 -1 -1 -1 -1 4 8 3 8 -1 -1
output:
? 2 5 9 ? 3 5 9 2 ? 2 9 2 ? 3 5 9 10 ? 2 2 10 ? 4 5 9 10 6 ? 2 2 6 ? 5 5 9 10 6 7 ? 2 2 7 ? 6 5 9 10 6 7 3 ? 5 5 9 10 6 3 ? 4 5 10 6 3 ? 3 5 6 3 ? 2 2 3 ? 6 5 9 10 6 7 1 ? 3 2 3 1 ? 2 2 1 ? 7 5 9 10 6 7 1 4 ? 6 5 9 10 6 7 4 ? 5 5 9 6 7 4 ? 4 9 6 7 4 ? 3 2 3 4 ? 7 5 9 10 6 7 1 8 ? 4 2 3 4 8 ? 3 2 3 8...
result:
ok correct
Test #3:
score: 0
Accepted
time: 1ms
memory: 5696kb
input:
5 5 2 3 2 -1 -1 4 2 -1 -1 2 1 5 1 3 1 4 1
output:
? 2 2 5 ? 2 2 3 ? 2 5 3 ? 2 2 4 ? 3 5 3 4 ? 2 2 1 ? 4 5 3 4 1 ? 3 3 4 1 ? 2 4 1 ! 7 5 2 3 2 4 2 2 1 5 1 3 1 4 1
result:
ok correct
Test #4:
score: 0
Accepted
time: 1ms
memory: 5712kb
input:
3 1 3 -1 -1 2 1
output:
? 2 3 1 ? 2 3 2 ? 2 1 2 ! 2 1 3 2 1
result:
ok correct
Test #5:
score: 0
Accepted
time: 0ms
memory: 3780kb
input:
6 3 1 -1 -1 3 5 4 5 -1 -1 3 4 -1 -1 3 6 -1 -1 1 2 2 5 -1 -1 3 2 4 2
output:
? 2 1 3 ? 2 1 5 ? 2 3 5 ? 3 1 5 4 ? 2 1 4 ? 2 3 4 ? 3 1 5 6 ? 2 3 6 ? 2 4 6 ? 4 1 5 6 2 ? 3 5 6 2 ? 2 6 2 ? 2 3 2 ? 2 4 2 ! 9 3 1 3 5 4 5 3 4 3 6 1 2 2 5 3 2 4 2
result:
ok correct
Test #6:
score: 0
Accepted
time: 0ms
memory: 5860kb
input:
27 -1 -1 -1 -1 7 22 -1 -1 7 26 -1 -1 22 26 -1 -1 -1 -1 -1 -1 -1 -1 22 25 -1 -1 6 1 -1 -1 1 22 -1 -1 6 16 -1 -1 22 16 -1 -1 6 14 14 12 -1 -1 -1 -1 14 1 -1 -1 21 25 -1 -1 -1 -1 21 1 -1 -1 12 18 -1 -1 21 18 -1 -1 16 18 -1 -1 6 19 -1 -1 14 19 21 19 -1 -1 1 19 19 26 19 16 -1 -1 6 13 -1 -1 22 13 -1 -1 26 ...
output:
? 2 7 4 ? 3 7 4 6 ? 4 7 4 6 22 ? 3 4 6 22 ? 4 7 4 6 26 ? 3 4 6 26 ? 2 22 26 ? 4 7 4 6 12 ? 2 22 12 ? 2 26 12 ? 5 7 4 6 12 25 ? 2 22 25 ? 2 26 25 ? 6 7 4 6 12 25 1 ? 5 7 4 12 25 1 ? 2 22 1 ? 2 26 1 ? 6 7 4 6 12 25 16 ? 5 7 4 12 25 16 ? 2 22 16 ? 3 26 1 16 ? 6 7 4 6 12 25 14 ? 5 7 4 12 25 14 ? 4 7 4 2...
result:
ok correct
Test #7:
score: 0
Accepted
time: 0ms
memory: 5600kb
input:
47 -1 -1 -1 -1 -1 -1 -1 -1 21 45 -1 -1 11 12 -1 -1 21 11 43 45 -1 -1 43 21 43 11 -1 -1 27 21 27 11 27 43 41 37 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 21 35 -1 -1 11 35 -1 -1 27 34 45 34 -1 -1 21 34 -1 -1 -1 -1 43 34 27 5 5 12 5 35 -1 -1 21 5 -1 -1 -1 -1 43 5 27 28 -1 -1 21 28 -1 -1 5 28 -1 -1 -1 -1 27 15 -1 ...
output:
? 2 37 24 ? 3 37 24 12 ? 4 37 24 12 16 ? 5 37 24 12 16 45 ? 6 37 24 12 16 45 21 ? 5 37 24 12 16 21 ? 6 37 24 12 16 45 11 ? 5 37 24 16 45 11 ? 2 21 11 ? 6 37 24 12 16 45 43 ? 5 37 24 12 16 43 ? 2 21 43 ? 2 11 43 ? 6 37 24 12 16 45 27 ? 2 21 27 ? 2 11 27 ? 2 43 27 ? 7 37 24 12 16 45 27 41 ? 6 24 12 16...
result:
ok correct
Test #8:
score: 0
Accepted
time: 1ms
memory: 5784kb
input:
38 -1 -1 -1 -1 37 13 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 15 27 -1 -1 -1 -1 -1 -1 30 27 -1 -1 37 34 30 34 -1 -1 -1 -1 19 32 15 32 37 32 -1 -1 13 32 -1 -1 37 1 1 5 -1 -1 13 1 -1 -1 -1 -1 29 35 -1 -1 35 34 -1 -1 35 32 -1 -1 28 9 -1 -1 13 28 -1 -1 -1 -1 -1 -1 3 5 29 3 -1 -1...
output:
? 2 5 37 ? 3 5 37 10 ? 4 5 37 10 13 ? 3 5 10 13 ? 4 5 37 10 21 ? 2 13 21 ? 5 5 37 10 21 19 ? 2 13 19 ? 6 5 37 10 21 19 15 ? 2 13 15 ? 7 5 37 10 21 19 15 29 ? 2 13 29 ? 8 5 37 10 21 19 15 29 9 ? 2 13 9 ? 9 5 37 10 21 19 15 29 9 27 ? 8 5 37 10 21 19 29 9 27 ? 2 13 27 ? 9 5 37 10 21 19 15 29 9 30 ? 3 1...
result:
ok correct
Test #9:
score: 0
Accepted
time: 2ms
memory: 5660kb
input:
25 -1 -1 18 13 -1 -1 13 22 -1 -1 18 22 13 21 -1 -1 18 21 22 21 20 13 -1 -1 -1 -1 20 22 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 14 25 14 13 -1 -1 -1 -1 14 22 -1 -1 7 25 7 13 7 17 -1 -1 7 20 7 14 -1 -1 -1 -1 -1 -1 2 25 -1 -1 18 2 -1 -1 2 22 -1 -1 -1 -1 16 13 -1 -1 16 14 16 20 -1 -1 16 7 ...
output:
? 2 13 1 ? 3 13 1 18 ? 2 1 18 ? 3 13 1 22 ? 2 1 22 ? 2 18 22 ? 3 13 1 21 ? 2 1 21 ? 2 18 21 ? 2 22 21 ? 3 13 1 20 ? 2 1 20 ? 2 18 20 ? 2 22 20 ? 2 21 20 ? 3 13 1 25 ? 3 18 20 25 ? 2 22 25 ? 2 21 25 ? 4 13 1 25 17 ? 3 18 20 17 ? 2 22 17 ? 2 21 17 ? 5 13 1 25 17 14 ? 4 13 1 17 14 ? 3 1 17 14 ? 3 18 20...
result:
ok correct
Test #10:
score: 0
Accepted
time: 1ms
memory: 5632kb
input:
6 -1 -1 -1 -1 -1 -1 2 3 -1 -1 5 6 -1 -1 2 5
output:
? 2 3 6 ? 3 3 6 1 ? 4 3 6 1 4 ? 5 3 6 1 4 2 ? 4 6 1 4 2 ? 5 3 6 1 4 5 ? 4 3 1 4 5 ? 2 2 5 ! 3 2 3 5 6 2 5
result:
ok correct
Test #11:
score: 0
Accepted
time: 0ms
memory: 5656kb
input:
3 2 3 3 1 2 1
output:
? 2 3 2 ? 2 3 1 ? 2 2 1 ! 3 2 3 3 1 2 1
result:
ok correct
Test #12:
score: 0
Accepted
time: 1ms
memory: 5588kb
input:
3 -1 -1 2 1 3 1
output:
? 2 2 3 ? 3 2 3 1 ? 2 3 1 ! 2 2 1 3 1
result:
ok correct
Test #13:
score: 0
Accepted
time: 1ms
memory: 5700kb
input:
5 3 1 5 1 -1 -1 2 1 2 5 2 3 -1 -1 -1 -1 -1 -1
output:
? 2 1 3 ? 2 1 5 ? 2 3 5 ? 2 1 2 ? 3 3 5 2 ? 2 3 2 ? 2 1 4 ? 3 3 5 4 ? 2 2 4 ! 5 3 1 5 1 2 1 2 5 2 3
result:
ok correct
Test #14:
score: 0
Accepted
time: 0ms
memory: 5824kb
input:
3 2 1 -1 -1 -1 -1
output:
? 2 1 2 ? 2 1 3 ? 2 2 3 ! 1 2 1
result:
ok correct
Test #15:
score: 0
Accepted
time: 0ms
memory: 5652kb
input:
5 -1 -1 2 5 -1 -1 3 5 -1 -1 -1 -1 -1 -1 4 3 -1 -1
output:
? 2 5 1 ? 3 5 1 2 ? 2 1 2 ? 3 5 1 3 ? 2 1 3 ? 2 2 3 ? 3 5 1 4 ? 3 2 3 4 ? 2 2 4 ! 3 2 5 3 5 4 3
result:
ok correct
Test #16:
score: 0
Accepted
time: 0ms
memory: 3564kb
input:
93 -1 -1 -1 -1 18 89 -1 -1 36 33 -1 -1 33 18 -1 -1 19 18 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 83 81 83 36 49 83 -1 -1 -1 -1 -1 -1 49 23 23 38 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 44 19 44 81 -1 -1 -1 -1 -1 -1 81 79 19 79 -1 -1 79 18 -1 -1 -1 -1 36 93 81 93 64 ...
output:
? 2 69 36 ? 3 69 36 89 ? 4 69 36 89 18 ? 3 69 36 18 ? 4 69 36 89 33 ? 3 69 89 33 ? 2 18 33 ? 4 69 36 89 19 ? 2 18 19 ? 2 33 19 ? 5 69 36 89 19 38 ? 2 18 38 ? 2 33 38 ? 6 69 36 89 19 38 81 ? 2 18 81 ? 2 33 81 ? 7 69 36 89 19 38 81 49 ? 2 18 49 ? 2 33 49 ? 8 69 36 89 19 38 81 49 83 ? 7 69 36 89 19 38 ...
result:
ok correct
Test #17:
score: 0
Accepted
time: 3ms
memory: 5736kb
input:
111 -1 -1 -1 -1 -1 -1 42 87 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 6 87 -1 -1 42 6 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 38 90 -1 -1 -1 -1 -1 -1 29 21 -1 -1 -1 -1 -1 -1 87 9 -1 -1 -1 -1 -1 -1 107 69 -1 -1 -1 -1 -1 -1 4 87 4 21 4 110 -1 -1 42 4 -1 -1 -1 -1 107 71 110 71 71 72 97 71 -1 -1 42 71 -1 -1 -1 -1 87 34...
output:
? 2 72 62 ? 3 72 62 87 ? 4 72 62 87 110 ? 5 72 62 87 110 42 ? 4 72 62 110 42 ? 5 72 62 87 110 97 ? 2 42 97 ? 6 72 62 87 110 97 38 ? 2 42 38 ? 7 72 62 87 110 97 38 6 ? 6 72 62 110 97 38 6 ? 2 42 6 ? 7 72 62 87 110 97 38 107 ? 2 42 107 ? 2 6 107 ? 8 72 62 87 110 97 38 107 21 ? 2 42 21 ? 2 6 21 ? 9 72 ...
result:
ok correct
Test #18:
score: 0
Accepted
time: 0ms
memory: 5732kb
input:
132 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 51 100 -1 -1 -1 -1 -1 -1 128 99 -1 -1 -1 -1 -1 -1 99 116 -1 -1 75 60 -1 -1 -1 -1 116 110 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 6 68 -1 -1 -1 -1 104 10 -1 -1 60 10 -1 -1 19 6 -1 -1 -1 -1 19 10 22 20 22 34 -1 -1 -1 -1 -1 -1 6 39 -1 -1 19 39 -1 -1 -1 -1 104 85 -1 -1 19 8...
output:
? 2 54 128 ? 3 54 128 36 ? 4 54 128 36 20 ? 5 54 128 36 20 6 ? 6 54 128 36 20 6 100 ? 7 54 128 36 20 6 100 51 ? 6 54 128 36 20 6 51 ? 7 54 128 36 20 6 100 75 ? 2 51 75 ? 8 54 128 36 20 6 100 75 99 ? 7 54 36 20 6 100 75 99 ? 2 51 99 ? 8 54 128 36 20 6 100 75 116 ? 3 51 99 116 ? 2 51 116 ? 9 54 128 36...
result:
ok correct
Test #19:
score: 0
Accepted
time: 0ms
memory: 5724kb
input:
94 -1 -1 48 72 -1 -1 72 41 -1 -1 -1 -1 -1 -1 -1 -1 72 46 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 25 33 25 72 25 82 -1 -1 -1 -1 55 72 55 89 -1 -1 -1 -1 -1 -1 41 44 -1 -1 -1 -1 -1 -1 -1 -1 60 41 -1 -1 13 28 33 13 13 68 -1 -1 55 13 -1 -1 31 83 -1 -1 31 41 -1 -1 -1 -1 -1 ...
output:
? 2 68 72 ? 3 68 72 48 ? 2 68 48 ? 3 68 72 41 ? 2 68 41 ? 2 48 41 ? 3 68 72 22 ? 3 48 41 22 ? 4 68 72 22 46 ? 3 68 22 46 ? 3 48 41 46 ? 4 68 72 22 33 ? 4 48 41 46 33 ? 5 68 72 22 33 28 ? 4 48 41 46 28 ? 6 68 72 22 33 28 89 ? 4 48 41 46 89 ? 7 68 72 22 33 28 89 82 ? 4 48 41 46 82 ? 8 68 72 22 33 28 8...
result:
ok correct
Test #20:
score: 0
Accepted
time: 5ms
memory: 5720kb
input:
73 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 51 60 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 51 38 38 5 38 41 -1 -1 -1 -1 3 67 -1 -1 -1 -1 40 58 -1 -1 -1 -1 -1 -1 -1 -1 71 43 -1 -1 60 43 -1 -1 71 26 -1 -1 3 26 -1 -1 -1 -1 51 42 -1 -1 42 38 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 71 34 51 34 -1 -1 60 34 -1 -1 -1 -1 ...
output:
? 2 41 67 ? 3 41 67 69 ? 4 41 67 69 71 ? 5 41 67 69 71 51 ? 6 41 67 69 71 51 40 ? 7 41 67 69 71 51 40 2 ? 8 41 67 69 71 51 40 2 60 ? 7 41 67 69 71 40 2 60 ? 8 41 67 69 71 51 40 2 18 ? 2 60 18 ? 9 41 67 69 71 51 40 2 18 54 ? 2 60 54 ? 10 41 67 69 71 51 40 2 18 54 5 ? 2 60 5 ? 11 41 67 69 71 51 40 2 1...
result:
ok correct
Test #21:
score: 0
Accepted
time: 0ms
memory: 5664kb
input:
77 -1 -1 57 25 -1 -1 -1 -1 68 57 -1 -1 -1 -1 -1 -1 2 57 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 57 7 2 15 -1 -1 -1 -1 34 25 63 34 -1 -1 15 34 34 57 -1 -1 -1 -1 -1 -1 66 7 66 10 -1 -1 66 57 66 15 66 34 -1 -1 57 46 -1 -1 -1 -1 -1 -1 68 40 40 25 -1 -1 -1 -1 -1 -1 -1 -1 6 31 68 6 -1 -1 -1 -1 -1 -1 -1 -1 63 73 -1 ...
output:
? 2 31 25 ? 3 31 25 57 ? 2 31 57 ? 3 31 25 68 ? 2 57 68 ? 4 31 25 68 63 ? 2 57 63 ? 5 31 25 68 63 2 ? 2 57 2 ? 6 31 25 68 63 2 10 ? 2 57 10 ? 7 31 25 68 63 2 10 65 ? 2 57 65 ? 8 31 25 68 63 2 10 65 7 ? 2 57 7 ? 9 31 25 68 63 2 10 65 7 15 ? 8 31 25 68 63 10 65 7 15 ? 2 57 15 ? 9 31 25 68 63 2 10 65 7...
result:
ok correct
Test #22:
score: 0
Accepted
time: 4ms
memory: 5656kb
input:
81 -1 -1 62 56 -1 -1 60 56 -1 -1 60 62 -1 -1 62 24 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 14 26 -1 -1 -1 -1 -1 -1 45 23 -1 -1 -1 -1 -1 -1 56 81 24 81 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 58 48 -1 -1 -1 -1 -1 -1 32 16 -1 -1 48 32 -1 -1 -1 -1 73 16 73 24 -1 -1 -1 -1 -1 -1 58 44 -1 ...
output:
? 2 16 56 ? 3 16 56 62 ? 2 16 62 ? 3 16 56 60 ? 2 16 60 ? 2 62 60 ? 3 16 56 24 ? 2 62 24 ? 2 60 24 ? 4 16 56 24 45 ? 2 62 45 ? 2 60 45 ? 5 16 56 24 45 26 ? 2 62 26 ? 2 60 26 ? 6 16 56 24 45 26 14 ? 5 16 56 24 45 14 ? 2 62 14 ? 2 60 14 ? 6 16 56 24 45 26 23 ? 5 16 56 24 26 23 ? 3 62 14 23 ? 2 60 23 ?...
result:
ok correct
Test #23:
score: 0
Accepted
time: 8ms
memory: 5844kb
input:
93 -1 -1 -1 -1 -1 -1 -1 -1 33 81 33 22 33 75 -1 -1 -1 -1 33 92 -1 -1 -1 -1 -1 -1 -1 -1 25 22 -1 -1 -1 -1 37 39 37 81 -1 -1 25 37 -1 -1 89 22 89 19 -1 -1 -1 -1 -1 -1 7 39 -1 -1 -1 -1 -1 -1 32 75 -1 -1 -1 -1 -1 -1 17 39 -1 -1 17 33 25 17 -1 -1 17 37 65 39 75 65 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 89 34 -1 -...
output:
? 2 12 22 ? 3 12 22 81 ? 4 12 22 81 19 ? 5 12 22 81 19 75 ? 6 12 22 81 19 75 33 ? 5 12 22 19 75 33 ? 4 12 19 75 33 ? 3 12 19 33 ? 6 12 22 81 19 75 92 ? 2 33 92 ? 7 12 22 81 19 75 92 39 ? 2 33 39 ? 8 12 22 81 19 75 92 39 31 ? 2 33 31 ? 9 12 22 81 19 75 92 39 31 25 ? 8 12 81 19 75 92 39 31 25 ? 2 33 2...
result:
ok correct
Test #24:
score: 0
Accepted
time: 0ms
memory: 5580kb
input:
37 9 21 37 21 9 37 -1 -1 -1 -1 12 37 2 21 -1 -1 2 9 -1 -1 -1 -1 -1 -1 22 37 -1 -1 22 24 12 24 -1 -1 -1 -1 2 24 24 37 12 7 -1 -1 -1 -1 2 7 -1 -1 -1 -1 4 24 -1 -1 4 37 -1 -1 26 21 22 26 4 26 12 26 9 26 7 26 -1 -1 37 26 2 26 31 21 -1 -1 -1 -1 31 37 -1 -1 31 26 28 21 -1 -1 7 28 24 28 9 28 -1 -1 2 28 -1 ...
output:
? 2 21 9 ? 2 21 37 ? 2 9 37 ? 2 21 12 ? 2 9 12 ? 2 37 12 ? 3 21 12 2 ? 2 12 2 ? 2 9 2 ? 2 37 2 ? 3 21 12 22 ? 2 9 22 ? 3 37 2 22 ? 2 2 22 ? 4 21 12 22 24 ? 3 21 12 24 ? 2 21 24 ? 2 9 24 ? 3 37 2 24 ? 2 37 24 ? 4 21 12 22 7 ? 3 21 22 7 ? 3 9 24 7 ? 3 37 2 7 ? 2 37 7 ? 4 21 12 22 4 ? 4 9 24 7 4 ? 3 9 ...
result:
ok correct
Test #25:
score: 0
Accepted
time: 0ms
memory: 5724kb
input:
144 -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 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 15 -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 106 67 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 135 126 135 93 -1 -1 -1 -1 57 66...
output:
? 2 17 74 ? 3 17 74 25 ? 4 17 74 25 50 ? 5 17 74 25 50 112 ? 6 17 74 25 50 112 136 ? 7 17 74 25 50 112 136 24 ? 8 17 74 25 50 112 136 24 105 ? 9 17 74 25 50 112 136 24 105 53 ? 10 17 74 25 50 112 136 24 105 53 6 ? 11 17 74 25 50 112 136 24 105 53 6 80 ? 12 17 74 25 50 112 136 24 105 53 6 80 108 ? 13...
result:
ok correct
Test #26:
score: 0
Accepted
time: 6ms
memory: 3600kb
input:
561 -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 -1 -1 364 496 -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 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 198 561 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -...
output:
? 2 364 503 ? 3 364 503 442 ? 4 364 503 442 418 ? 5 364 503 442 418 453 ? 6 364 503 442 418 453 254 ? 7 364 503 442 418 453 254 314 ? 8 364 503 442 418 453 254 314 495 ? 9 364 503 442 418 453 254 314 495 65 ? 10 364 503 442 418 453 254 314 495 65 37 ? 11 364 503 442 418 453 254 314 495 65 37 320 ? 1...
result:
ok correct
Test #27:
score: 0
Accepted
time: 29ms
memory: 5716kb
input:
679 -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 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 666 66 -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 -1 -1 -1 -1 350 353 -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:
? 2 572 496 ? 3 572 496 109 ? 4 572 496 109 213 ? 5 572 496 109 213 610 ? 6 572 496 109 213 610 631 ? 7 572 496 109 213 610 631 663 ? 8 572 496 109 213 610 631 663 296 ? 9 572 496 109 213 610 631 663 296 363 ? 10 572 496 109 213 610 631 663 296 363 625 ? 11 572 496 109 213 610 631 663 296 363 625 26...
result:
ok correct
Test #28:
score: 0
Accepted
time: 68ms
memory: 5664kb
input:
1000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 43 429 -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 -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 -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 ...
output:
? 2 952 667 ? 3 952 667 429 ? 4 952 667 429 433 ? 5 952 667 429 433 994 ? 6 952 667 429 433 994 287 ? 7 952 667 429 433 994 287 412 ? 8 952 667 429 433 994 287 412 360 ? 9 952 667 429 433 994 287 412 360 961 ? 10 952 667 429 433 994 287 412 360 961 151 ? 11 952 667 429 433 994 287 412 360 961 151 43...
result:
ok correct
Test #29:
score: 0
Accepted
time: 57ms
memory: 5796kb
input:
1000 -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 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 387 68 -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 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 895 163 -1 -1 -1 -1 -1 -1 -1 -1 308 303 -1 -1 -1 -1 -1...
output:
? 2 491 524 ? 3 491 524 523 ? 4 491 524 523 877 ? 5 491 524 523 877 308 ? 6 491 524 523 877 308 968 ? 7 491 524 523 877 308 968 860 ? 8 491 524 523 877 308 968 860 751 ? 9 491 524 523 877 308 968 860 751 382 ? 10 491 524 523 877 308 968 860 751 382 895 ? 11 491 524 523 877 308 968 860 751 382 895 54...
result:
ok correct
Test #30:
score: -100
Time Limit Exceeded
input:
2000 -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 -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 -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 -1 -1 -1 -1 -1 -1 44 15 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -...
output:
? 2 1 2 ? 3 1 2 3 ? 4 1 2 3 4 ? 5 1 2 3 4 5 ? 6 1 2 3 4 5 6 ? 7 1 2 3 4 5 6 7 ? 8 1 2 3 4 5 6 7 8 ? 9 1 2 3 4 5 6 7 8 9 ? 10 1 2 3 4 5 6 7 8 9 10 ? 11 1 2 3 4 5 6 7 8 9 10 11 ? 12 1 2 3 4 5 6 7 8 9 10 11 12 ? 13 1 2 3 4 5 6 7 8 9 10 11 12 13 ? 14 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ? 15 1 2 3 4 5 6 7 8...