QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#496935 | #4218. Hidden Graph | haze | WA | 209ms | 5896kb | C++23 | 2.4kb | 2024-07-28 17:04:04 | 2024-07-28 17:04:06 |
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());
int sum = 0;
vector<array<int, 2>>edge;
void submit(){
cout << "! " << edge.size() << endl;
for(auto [u, v] : edge){
cout << F[u] << ' ' << F[v] << endl;
}
exit(0);
}
array<int, 2> query(set<int>&node){
if(node.size() == 1){
return {-1, -1};
}
if(sum == 6000){
submit();
}
++ sum;
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;
shuffle(F + 1, F + n + 1, rng);
irep(i, 1, n){
G[F[i]] = i;
}
vector<set<int>>col = {{1}};
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);
}
submit();
}
int main() {
// IOS
int T = 1;
while (T--) {
solve();
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 5656kb
input:
3 1 2 2 3 1 3
output:
? 2 2 1 ? 2 2 3 ? 2 1 3 ! 3 1 2 2 3 1 3
result:
ok correct
Test #2:
score: 0
Accepted
time: 1ms
memory: 5648kb
input:
10 1 4 1 3 -1 -1 1 2 -1 -1 -1 -1 3 8 4 8 -1 -1 -1 -1 4 10 3 10 -1 -1 -1 -1 2 6 -1 -1 -1 -1 3 7 -1 -1 -1 -1 3 9 -1 -1 -1 -1 4 5 2 5 -1 -1
output:
? 2 1 4 ? 2 1 3 ? 2 4 3 ? 2 1 2 ? 3 4 3 2 ? 2 1 8 ? 4 4 3 2 8 ? 3 4 2 8 ? 2 2 8 ? 3 1 8 10 ? 4 4 3 2 10 ? 3 3 2 10 ? 2 2 10 ? 4 1 8 10 6 ? 4 4 3 2 6 ? 3 4 3 6 ? 5 1 8 10 6 7 ? 4 4 3 2 7 ? 3 4 2 7 ? 6 1 8 10 6 7 9 ? 4 4 3 2 9 ? 3 4 2 9 ? 7 1 8 10 6 7 9 5 ? 4 4 3 2 5 ? 3 3 2 5 ? 2 3 5 ! 12 1 4 1 3 1 2...
result:
ok correct
Test #3:
score: 0
Accepted
time: 1ms
memory: 5704kb
input:
5 2 1 5 1 5 2 3 1 3 2 -1 -1 4 1 4 2 -1 -1
output:
? 2 1 2 ? 2 1 5 ? 2 2 5 ? 2 1 3 ? 2 2 3 ? 2 5 3 ? 2 1 4 ? 2 2 4 ? 3 5 3 4 ! 7 2 1 5 1 5 2 3 1 3 2 4 1 4 2
result:
ok correct
Test #4:
score: 0
Accepted
time: 1ms
memory: 5656kb
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: 5588kb
input:
6 4 5 -1 -1 -1 -1 1 2 2 5 4 2 -1 -1 -1 -1 -1 -1 3 6 3 5 3 1 3 4 3 2
output:
? 2 5 4 ? 2 5 1 ? 2 4 1 ? 3 5 1 2 ? 2 5 2 ? 2 4 2 ? 3 5 1 6 ? 2 4 6 ? 2 2 6 ? 4 5 1 6 3 ? 3 5 1 3 ? 2 1 3 ? 2 4 3 ? 2 2 3 ! 9 4 5 1 2 2 5 4 2 3 6 3 5 3 1 3 4 3 2
result:
ok correct
Test #6:
score: 0
Accepted
time: 0ms
memory: 5576kb
input:
27 6 13 -1 -1 -1 -1 27 11 -1 -1 6 11 -1 -1 6 16 -1 -1 22 27 22 13 22 16 -1 -1 22 11 -1 -1 6 1 1 22 1 11 19 13 19 16 19 27 1 19 6 19 -1 -1 19 11 2 27 -1 -1 -1 -1 -1 -1 2 19 1 9 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 22 25 -1 -1 -1 -1 -1 -1 24 27 24 13 -1 -1 6 24 -1 -1 -1 -1 24 19 17 16 17 25 -1 -1 -1 -1 -1 -1...
output:
? 2 13 6 ? 2 13 27 ? 2 6 27 ? 3 13 27 11 ? 2 13 11 ? 2 6 11 ? 3 13 27 16 ? 2 6 16 ? 2 11 16 ? 4 13 27 16 22 ? 3 13 16 22 ? 2 16 22 ? 2 6 22 ? 2 11 22 ? 4 13 27 16 1 ? 3 6 22 1 ? 2 22 1 ? 2 11 1 ? 5 13 27 16 1 19 ? 4 27 16 1 19 ? 3 27 1 19 ? 2 1 19 ? 3 6 22 19 ? 2 22 19 ? 2 11 19 ? 5 13 27 16 1 2 ? 4...
result:
ok correct
Test #7:
score: 0
Accepted
time: 3ms
memory: 5576kb
input:
47 43 39 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 43 2 -1 -1 43 45 2 12 -1 -1 -1 -1 26 39 45 26 26 15 -1 -1 -1 -1 -1 -1 -1 -1 20 15 -1 -1 20 26 20 12 -1 -1 21 45 21 15 21 35 -1 -1 43 21 -1 -1 20 21 23 35 23 2 -1 -1 23 43 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 13 15 -1 -1 -1 -1 -1 -1 -1 -1 29 35 45 29 29 15 ...
output:
? 2 39 43 ? 2 39 40 ? 2 43 40 ? 3 39 40 15 ? 2 43 15 ? 4 39 40 15 2 ? 2 43 2 ? 5 39 40 15 2 45 ? 2 43 45 ? 6 39 40 15 2 45 12 ? 5 39 40 15 45 12 ? 2 43 12 ? 6 39 40 15 2 45 26 ? 5 40 15 2 45 26 ? 4 40 15 2 26 ? 3 40 2 26 ? 3 43 12 26 ? 6 39 40 15 2 45 35 ? 4 43 12 26 35 ? 7 39 40 15 2 45 35 20 ? 6 3...
result:
ok correct
Test #8:
score: 0
Accepted
time: 3ms
memory: 3596kb
input:
38 -1 -1 14 5 -1 -1 28 33 -1 -1 -1 -1 6 14 -1 -1 33 6 -1 -1 13 28 -1 -1 13 33 -1 -1 -1 -1 28 7 -1 -1 7 5 -1 -1 6 7 -1 -1 28 8 -1 -1 -1 -1 13 8 -1 -1 -1 -1 1 14 -1 -1 1 5 -1 -1 13 1 -1 -1 -1 -1 28 22 -1 -1 33 22 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 16 13 16 6 -1 -1 -1 -1 -1 -1 16 25 -1 -1 13 25 -1 -1 -1 -1 ...
output:
? 2 28 14 ? 3 28 14 5 ? 2 28 5 ? 3 28 14 33 ? 2 14 33 ? 2 5 33 ? 3 28 14 6 ? 2 28 6 ? 3 5 33 6 ? 2 5 6 ? 3 28 14 13 ? 2 14 13 ? 3 5 33 13 ? 2 5 13 ? 2 6 13 ? 3 28 14 7 ? 2 14 7 ? 3 5 33 7 ? 2 33 7 ? 3 6 13 7 ? 2 13 7 ? 3 28 14 8 ? 2 14 8 ? 3 5 33 8 ? 3 6 13 8 ? 2 6 8 ? 2 7 8 ? 3 28 14 1 ? 2 28 1 ? 4...
result:
ok correct
Test #9:
score: 0
Accepted
time: 2ms
memory: 5708kb
input:
25 4 8 -1 -1 12 4 16 12 16 8 -1 -1 5 8 -1 -1 5 4 -1 -1 -1 -1 -1 -1 -1 -1 7 19 -1 -1 16 7 -1 -1 5 7 -1 -1 4 22 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 2 22 2 8 -1 -1 -1 -1 5 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 10 15 24 15 -1 -1 -1 -1 -1 -1 -1 -1 10 11 19 11 -1 -1 2 11 -1 -1 -1 -...
output:
? 2 8 4 ? 2 8 12 ? 2 4 12 ? 3 8 12 16 ? 2 8 16 ? 2 4 16 ? 3 8 12 5 ? 2 12 5 ? 3 4 16 5 ? 2 16 5 ? 3 8 12 19 ? 3 4 16 19 ? 2 5 19 ? 4 8 12 19 7 ? 3 8 12 7 ? 3 4 16 7 ? 2 4 7 ? 2 5 7 ? 4 8 12 19 22 ? 3 4 16 22 ? 2 16 22 ? 2 5 22 ? 2 7 22 ? 5 8 12 19 22 10 ? 3 4 16 10 ? 2 5 10 ? 2 7 10 ? 6 8 12 19 22 1...
result:
ok correct
Test #10:
score: 0
Accepted
time: 1ms
memory: 3660kb
input:
6 -1 -1 -1 -1 -1 -1 2 3 -1 -1 5 6 -1 -1 2 5
output:
? 2 4 6 ? 3 4 6 3 ? 4 4 6 3 1 ? 5 4 6 3 1 2 ? 4 4 6 1 2 ? 5 4 6 3 1 5 ? 4 4 3 1 5 ? 2 2 5 ! 3 2 3 5 6 2 5
result:
ok correct
Test #11:
score: 0
Accepted
time: 0ms
memory: 5868kb
input:
3 2 1 2 3 3 1
output:
? 2 2 1 ? 2 2 3 ? 2 1 3 ! 3 2 1 2 3 3 1
result:
ok correct
Test #12:
score: 0
Accepted
time: 1ms
memory: 5700kb
input:
3 2 1 -1 -1 3 1
output:
? 2 2 1 ? 2 2 3 ? 2 1 3 ! 2 2 1 3 1
result:
ok correct
Test #13:
score: 0
Accepted
time: 1ms
memory: 5656kb
input:
5 2 1 5 1 2 5 3 1 2 3 -1 -1 -1 -1 -1 -1 -1 -1
output:
? 2 1 2 ? 2 1 5 ? 2 2 5 ? 2 1 3 ? 2 2 3 ? 2 5 3 ? 2 1 4 ? 2 2 4 ? 3 5 3 4 ! 5 2 1 5 1 2 5 3 1 2 3
result:
ok correct
Test #14:
score: 0
Accepted
time: 1ms
memory: 5868kb
input:
3 -1 -1 2 1 -1 -1
output:
? 2 2 3 ? 3 2 3 1 ? 2 3 1 ! 1 2 1
result:
ok correct
Test #15:
score: 0
Accepted
time: 0ms
memory: 5788kb
input:
5 2 5 -1 -1 3 5 4 3 -1 -1 -1 -1 -1 -1 -1 -1
output:
? 2 2 5 ? 2 2 3 ? 2 5 3 ? 3 2 3 4 ? 2 2 4 ? 2 5 4 ? 3 2 3 1 ? 3 5 4 1 ! 3 2 5 3 5 4 3
result:
ok correct
Test #16:
score: 0
Accepted
time: 2ms
memory: 5640kb
input:
93 -1 -1 43 31 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 43 79 -1 -1 43 70 -1 -1 -1 -1 -1 -1 5 43 -1 -1 -1 -1 -1 -1 -1 -1 65 79 -1 -1 -1 -1 31 9 -1 -1 -1 -1 -1 -1 63 65 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 78 60 -1 -1 -1 -1 70 61 -1 -1 -1 -1 19 79 -1 -1 -1 -1 -1 -1...
output:
? 2 68 31 ? 3 68 31 43 ? 2 68 43 ? 3 68 31 6 ? 2 43 6 ? 4 68 31 6 48 ? 2 43 48 ? 5 68 31 6 48 39 ? 2 43 39 ? 6 68 31 6 48 39 79 ? 2 43 79 ? 7 68 31 6 48 39 79 70 ? 2 43 70 ? 8 68 31 6 48 39 79 70 78 ? 2 43 78 ? 9 68 31 6 48 39 79 70 78 5 ? 2 43 5 ? 10 68 31 6 48 39 79 70 78 5 3 ? 2 43 3 ? 11 68 31 6...
result:
ok correct
Test #17:
score: 0
Accepted
time: 4ms
memory: 5680kb
input:
111 84 108 -1 -1 -1 -1 17 75 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 108 69 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 94 95 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 108 56 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 56 18 -1 -1 75 18 -1 -1 -1 -1 -1 -1 -1 -1 79 35 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 6 79 -1 -1 -1 -1 ...
output:
? 2 84 108 ? 2 84 17 ? 2 108 17 ? 3 84 17 75 ? 2 84 75 ? 2 108 75 ? 3 84 17 9 ? 3 108 75 9 ? 4 84 17 9 69 ? 3 108 75 69 ? 2 75 69 ? 5 84 17 9 69 51 ? 3 108 75 51 ? 6 84 17 9 69 51 19 ? 3 108 75 19 ? 7 84 17 9 69 51 19 94 ? 3 108 75 94 ? 8 84 17 9 69 51 19 94 95 ? 7 84 17 9 69 51 19 95 ? 3 108 75 95 ...
result:
ok correct
Test #18:
score: 0
Accepted
time: 5ms
memory: 5844kb
input:
132 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 96 40 -1 -1 -1 -1 -1 -1 40 12 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 26 125 -1 -1 -1 -1 -1 -1 -1 -1 24 99 24 54 24 9 -1 -1 -1 -1 82 54 82 40 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 124 132 -1 -1 132 82 -1 -1 52 54 52 99 -1 -1 52 82 -1 -1 -1 -1 -1 -1 12 8 -1 -1 -1 -1 10 8 -...
output:
? 2 94 117 ? 3 94 117 124 ? 4 94 117 124 9 ? 5 94 117 124 9 99 ? 6 94 117 124 9 99 40 ? 7 94 117 124 9 99 40 96 ? 6 94 117 124 9 99 96 ? 7 94 117 124 9 99 40 91 ? 2 96 91 ? 8 94 117 124 9 99 40 91 12 ? 7 94 117 124 9 99 91 12 ? 2 96 12 ? 8 94 117 124 9 99 40 91 54 ? 3 96 12 54 ? 9 94 117 124 9 99 40...
result:
ok correct
Test #19:
score: 0
Accepted
time: 3ms
memory: 5708kb
input:
94 -1 -1 -1 -1 51 2 -1 -1 -1 -1 -1 -1 24 93 -1 -1 24 51 -1 -1 -1 -1 -1 -1 25 84 -1 -1 -1 -1 24 25 -1 -1 25 88 -1 -1 -1 -1 15 34 -1 -1 25 34 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 93 91 -1 -1 51 91 -1 -1 -1 -1 35 63 -1 -1 -1 -1 -1 -1 27 88 27 60 -1 -1 27 25 51 27 27 63 -1 -1 -1 -1 51 5 -1 -1 24 5 5 34 -1 -1 -...
output:
? 2 93 15 ? 3 93 15 2 ? 4 93 15 2 51 ? 3 93 15 51 ? 4 93 15 2 84 ? 2 51 84 ? 5 93 15 2 84 24 ? 4 15 2 84 24 ? 2 51 24 ? 5 93 15 2 84 60 ? 2 51 60 ? 2 24 60 ? 6 93 15 2 84 60 25 ? 5 93 15 2 60 25 ? 2 51 25 ? 2 24 25 ? 6 93 15 2 84 60 88 ? 3 51 25 88 ? 2 51 88 ? 2 24 88 ? 7 93 15 2 84 60 88 34 ? 6 93 ...
result:
ok correct
Test #20:
score: 0
Accepted
time: 5ms
memory: 5716kb
input:
73 51 60 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 60 64 -1 -1 -1 -1 25 18 -1 -1 51 25 -1 -1 13 22 -1 -1 -1 -1 13 25 -1 -1 -1 -1 25 24 60 53 -1 -1 53 13 51 53 -1 -1 -1 -1 -1 -1 -1 -1 53 20 25 20 -1 -1 51 42 -1 -1 53 42 42 25 42 59 -1 -1 59 64 -1 -1 25 59 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ...
output:
? 2 60 51 ? 2 60 18 ? 2 51 18 ? 3 60 18 37 ? 2 51 37 ? 4 60 18 37 67 ? 2 51 67 ? 5 60 18 37 67 22 ? 2 51 22 ? 6 60 18 37 67 22 64 ? 5 18 37 67 22 64 ? 2 51 64 ? 6 60 18 37 67 22 25 ? 5 60 37 67 22 25 ? 3 51 64 25 ? 2 64 25 ? 6 60 18 37 67 22 13 ? 5 60 18 37 67 13 ? 3 51 64 13 ? 2 25 13 ? 6 60 18 37 ...
result:
ok correct
Test #21:
score: 0
Accepted
time: 0ms
memory: 5836kb
input:
77 -1 -1 -1 -1 -1 -1 -1 -1 40 17 34 17 -1 -1 4 34 35 4 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 55 17 -1 -1 -1 -1 -1 -1 77 9 -1 -1 77 17 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 4 30 -1 -1 -1 -1 34 73 22 73 -1 -1 -1 -1 -1 -1 21 22 -1 -1 21 4 -1 -1 -1 -1 37 30 -1 -1 -1 -1 -1 -1 -1 -1 50 4 -1 -1 50 21 -1 -1 75 48 75 34 75 ...
output:
? 2 40 22 ? 3 40 22 34 ? 4 40 22 34 35 ? 5 40 22 34 35 9 ? 6 40 22 34 35 9 17 ? 5 22 34 35 9 17 ? 4 22 35 9 17 ? 6 40 22 34 35 9 4 ? 5 40 22 35 9 4 ? 4 40 22 9 4 ? 2 17 4 ? 6 40 22 34 35 9 48 ? 3 17 4 48 ? 7 40 22 34 35 9 48 55 ? 3 17 4 55 ? 2 4 55 ? 8 40 22 34 35 9 48 55 53 ? 3 17 4 53 ? 9 40 22 34...
result:
ok correct
Test #22:
score: 0
Accepted
time: 4ms
memory: 5720kb
input:
81 -1 -1 -1 -1 -1 -1 62 25 -1 -1 37 78 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 25 75 72 75 -1 -1 -1 -1 69 7 69 37 -1 -1 69 75 -1 -1 -1 -1 75 40 -1 -1 -1 -1 25 56 37 56 -1 -1 62 56 -1 -1 69 56 42 35 -1 -1 42 62 -1 -1 42 69 -1 -1 20 35 20 37 20 25 20 72 -1 -1 -1 -1 -1 -1 -1 -1 25 16 35 16 37 16 -1 -1 75 1...
output:
? 2 37 59 ? 3 37 59 25 ? 4 37 59 25 35 ? 5 37 59 25 35 62 ? 4 37 59 35 62 ? 5 37 59 25 35 78 ? 4 59 25 35 78 ? 2 62 78 ? 5 37 59 25 35 7 ? 3 62 78 7 ? 6 37 59 25 35 7 72 ? 3 62 78 72 ? 7 37 59 25 35 7 72 75 ? 6 37 59 35 7 72 75 ? 5 37 59 35 7 75 ? 3 62 78 75 ? 7 37 59 25 35 7 72 69 ? 6 37 59 25 35 7...
result:
ok correct
Test #23:
score: 0
Accepted
time: 6ms
memory: 3632kb
input:
93 -1 -1 74 93 74 20 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 74 82 -1 -1 -1 -1 -1 -1 -1 -1 61 82 61 20 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 24 70 24 82 -1 -1 61 24 -1 -1 20 17 25 17 -1 -1 -1 -1 24 17 22 70 25 22 -1 -1 74 22 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 24 66 -1 -1 82 46 -1 -1 17 46 -1 -1 22 46 -1 ...
output:
? 2 20 93 ? 3 20 93 74 ? 2 20 74 ? 3 20 93 47 ? 2 74 47 ? 4 20 93 47 80 ? 2 74 80 ? 5 20 93 47 80 82 ? 2 74 82 ? 6 20 93 47 80 82 25 ? 2 74 25 ? 7 20 93 47 80 82 25 70 ? 2 74 70 ? 8 20 93 47 80 82 25 70 61 ? 7 20 93 47 80 25 70 61 ? 6 93 47 80 25 70 61 ? 2 74 61 ? 8 20 93 47 80 82 25 70 31 ? 3 74 61...
result:
ok correct
Test #24:
score: 0
Accepted
time: 0ms
memory: 5672kb
input:
37 -1 -1 3 24 -1 -1 -1 -1 -1 -1 24 34 7 34 -1 -1 -1 -1 7 17 -1 -1 17 34 3 17 35 24 6 35 -1 -1 35 34 -1 -1 35 17 36 24 -1 -1 36 34 36 3 -1 -1 -1 -1 6 21 -1 -1 21 34 3 21 36 21 -1 -1 35 21 6 20 24 20 7 20 3 20 -1 -1 36 20 -1 -1 35 20 -1 -1 30 24 -1 -1 -1 -1 30 17 36 30 -1 -1 30 20 30 21 4 24 -1 -1 4 3...
output:
? 2 6 24 ? 3 6 24 3 ? 2 6 3 ? 3 6 24 7 ? 2 3 7 ? 4 6 24 7 34 ? 3 6 7 34 ? 2 6 34 ? 2 3 34 ? 4 6 24 7 17 ? 3 6 24 17 ? 3 3 34 17 ? 2 3 17 ? 4 6 24 7 35 ? 3 6 7 35 ? 2 7 35 ? 3 3 34 35 ? 2 3 35 ? 2 17 35 ? 4 6 24 7 36 ? 3 6 7 36 ? 3 3 34 36 ? 2 3 36 ? 2 17 36 ? 2 35 36 ? 4 6 24 7 21 ? 3 24 7 21 ? 3 3 ...
result:
ok correct
Test #25:
score: 0
Accepted
time: 0ms
memory: 5708kb
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 86 3 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 135 126 -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 118 87 -1 -1 ...
output:
? 2 135 3 ? 3 135 3 71 ? 4 135 3 71 44 ? 5 135 3 71 44 54 ? 6 135 3 71 44 54 137 ? 7 135 3 71 44 54 137 90 ? 8 135 3 71 44 54 137 90 59 ? 9 135 3 71 44 54 137 90 59 68 ? 10 135 3 71 44 54 137 90 59 68 118 ? 11 135 3 71 44 54 137 90 59 68 118 138 ? 12 135 3 71 44 54 137 90 59 68 118 138 7 ? 13 135 3 ...
result:
ok correct
Test #26:
score: 0
Accepted
time: 15ms
memory: 5700kb
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 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 487 305 -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 124 62 ? 3 124 62 1 ? 4 124 62 1 280 ? 5 124 62 1 280 487 ? 6 124 62 1 280 487 282 ? 7 124 62 1 280 487 282 497 ? 8 124 62 1 280 487 282 497 408 ? 9 124 62 1 280 487 282 497 408 500 ? 10 124 62 1 280 487 282 497 408 500 148 ? 11 124 62 1 280 487 282 497 408 500 148 337 ? 12 124 62 1 280 487 282 ...
result:
ok correct
Test #27:
score: 0
Accepted
time: 45ms
memory: 5772kb
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 -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 409 517 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 197 591 -1 -1 -1 -1 246 20 -1 ...
output:
? 2 263 478 ? 3 263 478 83 ? 4 263 478 83 197 ? 5 263 478 83 197 266 ? 6 263 478 83 197 266 103 ? 7 263 478 83 197 266 103 602 ? 8 263 478 83 197 266 103 602 376 ? 9 263 478 83 197 266 103 602 376 219 ? 10 263 478 83 197 266 103 602 376 219 418 ? 11 263 478 83 197 266 103 602 376 219 418 540 ? 12 26...
result:
ok correct
Test #28:
score: 0
Accepted
time: 73ms
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 357 641 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 658 766 -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 568 658 ? 3 568 658 175 ? 4 568 658 175 745 ? 5 568 658 175 745 615 ? 6 568 658 175 745 615 929 ? 7 568 658 175 745 615 929 612 ? 8 568 658 175 745 615 929 612 278 ? 9 568 658 175 745 615 929 612 278 397 ? 10 568 658 175 745 615 929 612 278 397 641 ? 11 568 658 175 745 615 929 612 278 397 641 55...
result:
ok correct
Test #29:
score: 0
Accepted
time: 65ms
memory: 5896kb
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 232 683 -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 801 40 ? 3 801 40 828 ? 4 801 40 828 10 ? 5 801 40 828 10 160 ? 6 801 40 828 10 160 820 ? 7 801 40 828 10 160 820 636 ? 8 801 40 828 10 160 820 636 613 ? 9 801 40 828 10 160 820 636 613 151 ? 10 801 40 828 10 160 820 636 613 151 234 ? 11 801 40 828 10 160 820 636 613 151 234 713 ? 12 801 40 828 ...
result:
ok correct
Test #30:
score: -100
Wrong Answer
time: 209ms
memory: 3784kb
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 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -...
output:
? 2 1222 1053 ? 3 1222 1053 1465 ? 4 1222 1053 1465 906 ? 5 1222 1053 1465 906 33 ? 6 1222 1053 1465 906 33 150 ? 7 1222 1053 1465 906 33 150 1210 ? 8 1222 1053 1465 906 33 150 1210 880 ? 9 1222 1053 1465 906 33 150 1210 880 1535 ? 10 1222 1053 1465 906 33 150 1210 880 1535 674 ? 11 1222 1053 1465 9...
result:
wrong answer read 895 edges but expected 1031 edges