QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#496946 | #4218. Hidden Graph | haze | WA | 153ms | 5896kb | C++23 | 2.5kb | 2024-07-28 17:09:48 | 2024-07-28 17:09:48 |
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;
int cnt = 0;
irep(c, 0, col.size() - 1){
if(n == 2000 and cnt >= 4)break;
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){
++ cnt;
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: 1ms
memory: 5864kb
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: 5880kb
input:
10 -1 -1 4 8 -1 -1 4 10 -1 -1 -1 -1 -1 -1 -1 -1 2 6 -1 -1 -1 -1 1 4 -1 -1 1 2 -1 -1 -1 -1 -1 -1 -1 -1 3 9 3 7 -1 -1 3 10 3 8 -1 -1 1 3 4 5 -1 -1 2 5 -1 -1 -1 -1 -1 -1
output:
? 2 4 6 ? 3 4 6 8 ? 2 6 8 ? 3 4 6 10 ? 2 6 10 ? 2 8 10 ? 3 4 6 7 ? 3 8 10 7 ? 4 4 6 7 2 ? 3 4 7 2 ? 3 8 10 2 ? 4 4 6 7 1 ? 3 6 7 1 ? 4 8 10 2 1 ? 3 8 10 1 ? 4 4 6 7 9 ? 4 8 10 2 9 ? 2 1 9 ? 5 4 6 7 9 3 ? 4 4 6 7 3 ? 3 4 6 3 ? 4 8 10 2 3 ? 3 8 2 3 ? 2 2 3 ? 2 1 3 ? 5 4 6 7 9 5 ? 4 6 7 9 5 ? 4 8 10 2 ...
result:
ok correct
Test #3:
score: 0
Accepted
time: 1ms
memory: 5640kb
input:
5 -1 -1 5 2 3 2 5 1 3 1 2 1 -1 -1 4 2 4 1
output:
? 2 3 5 ? 3 3 5 2 ? 2 3 2 ? 3 3 5 1 ? 2 3 1 ? 2 2 1 ? 3 3 5 4 ? 2 2 4 ? 2 1 4 ! 7 5 2 3 2 5 1 3 1 2 1 4 2 4 1
result:
ok correct
Test #4:
score: 0
Accepted
time: 0ms
memory: 5592kb
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: 1ms
memory: 5796kb
input:
6 3 2 1 2 3 1 2 5 3 5 -1 -1 -1 -1 3 6 -1 -1 4 2 3 4 4 5 -1 -1
output:
? 2 2 3 ? 2 2 1 ? 2 3 1 ? 2 2 5 ? 2 3 5 ? 2 1 5 ? 2 2 6 ? 2 3 6 ? 3 1 5 6 ? 2 2 4 ? 2 3 4 ? 4 1 5 6 4 ? 3 1 6 4 ! 9 3 2 1 2 3 1 2 5 3 5 3 6 4 2 3 4 4 5
result:
ok correct
Test #6:
score: 0
Accepted
time: 0ms
memory: 5880kb
input:
27 -1 -1 23 27 -1 -1 6 1 -1 -1 -1 -1 -1 -1 3 1 -1 -1 3 2 -1 -1 2 27 -1 -1 3 21 -1 -1 21 1 21 27 21 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 6 24 24 10 -1 -1 24 27 -1 -1 -1 -1 21 24 -1 -1 -1 -1 -1 -1 -1 -1 7 22 -1 -1 1 22 22 27 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 6 14 14 12 -1 -1 14 1 -1 -1 ...
output:
? 2 23 6 ? 3 23 6 27 ? 2 6 27 ? 3 23 6 1 ? 2 23 1 ? 2 27 1 ? 3 23 6 3 ? 3 27 1 3 ? 2 27 3 ? 4 23 6 3 2 ? 3 23 6 2 ? 3 27 1 2 ? 2 1 2 ? 4 23 6 3 21 ? 3 23 6 21 ? 3 27 1 21 ? 2 27 21 ? 2 2 21 ? 4 23 6 3 4 ? 3 27 1 4 ? 2 2 4 ? 2 21 4 ? 5 23 6 3 4 10 ? 3 27 1 10 ? 2 2 10 ? 2 21 10 ? 6 23 6 3 4 10 24 ? 5...
result:
ok correct
Test #7:
score: 0
Accepted
time: 0ms
memory: 5732kb
input:
47 -1 -1 -1 -1 40 6 40 3 -1 -1 -1 -1 -1 -1 6 37 -1 -1 -1 -1 17 3 -1 -1 -1 -1 6 36 -1 -1 40 36 -1 -1 -1 -1 17 30 -1 -1 -1 -1 22 6 22 33 -1 -1 17 22 -1 -1 22 36 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 31 37 -1 -1 31 36 -1 -1 45 47 -1 -1 17 45 -1 -1 -1 -1 -1 -1 2 33 -1 -1 -1 -1 -1 -1 -1 -1 43 3 43 33 -1 -1 17 43...
output:
? 2 33 6 ? 3 33 6 3 ? 4 33 6 3 40 ? 3 33 3 40 ? 2 33 40 ? 4 33 6 3 47 ? 2 40 47 ? 5 33 6 3 47 37 ? 4 33 3 47 37 ? 2 40 37 ? 5 33 6 3 47 17 ? 4 33 6 47 17 ? 3 40 37 17 ? 5 33 6 3 47 36 ? 4 33 3 47 36 ? 4 40 37 17 36 ? 3 37 17 36 ? 5 33 6 3 47 30 ? 4 40 37 17 30 ? 3 40 37 30 ? 2 36 30 ? 6 33 6 3 47 30...
result:
ok correct
Test #8:
score: 0
Accepted
time: 0ms
memory: 5672kb
input:
38 -1 -1 -1 -1 -1 -1 16 17 -1 -1 29 3 -1 -1 29 17 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 26 19 16 19 -1 -1 -1 -1 -1 -1 38 14 3 14 -1 -1 19 14 -1 -1 -1 -1 38 37 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 29 35 -1 -1 36 35 -1 -1 -1 -1 -1 -1 -1 -1 30 17 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 16 12 12 35 12 7 38 12 -1 -1 37 12 ...
output:
? 2 7 3 ? 3 7 3 16 ? 4 7 3 16 38 ? 5 7 3 16 38 17 ? 4 7 3 38 17 ? 5 7 3 16 38 29 ? 4 7 16 38 29 ? 2 17 29 ? 5 7 3 16 38 26 ? 2 17 26 ? 2 29 26 ? 6 7 3 16 38 26 9 ? 2 17 9 ? 2 29 9 ? 7 7 3 16 38 26 9 19 ? 6 7 3 16 38 9 19 ? 5 7 3 38 9 19 ? 2 17 19 ? 2 29 19 ? 7 7 3 16 38 26 9 14 ? 6 7 3 16 26 9 14 ? ...
result:
ok correct
Test #9:
score: 0
Accepted
time: 2ms
memory: 5668kb
input:
25 -1 -1 8 21 -1 -1 -1 -1 21 11 -1 -1 -1 -1 19 11 -1 -1 -1 -1 4 17 4 8 -1 -1 -1 -1 10 11 10 17 -1 -1 10 21 -1 -1 -1 -1 -1 -1 10 15 24 15 -1 -1 -1 -1 -1 -1 8 23 -1 -1 -1 -1 -1 -1 -1 -1 12 4 -1 -1 -1 -1 18 8 18 12 -1 -1 18 4 18 21 -1 -1 -1 -1 2 11 2 8 -1 -1 -1 -1 18 2 -1 -1 -1 -1 20 23 -1 -1 -1 -1 20 ...
output:
? 2 17 8 ? 3 17 8 21 ? 2 17 21 ? 3 17 8 11 ? 2 21 11 ? 4 17 8 11 1 ? 2 21 1 ? 5 17 8 11 1 19 ? 4 17 8 1 19 ? 2 21 19 ? 5 17 8 11 1 4 ? 4 8 11 1 4 ? 3 11 1 4 ? 3 21 19 4 ? 5 17 8 11 1 10 ? 4 17 8 1 10 ? 3 8 1 10 ? 4 21 19 4 10 ? 3 19 4 10 ? 5 17 8 11 1 15 ? 4 21 19 4 15 ? 2 10 15 ? 6 17 8 11 1 15 24 ...
result:
ok correct
Test #10:
score: 0
Accepted
time: 1ms
memory: 5828kb
input:
6 -1 -1 2 5 5 6 -1 -1 -1 -1 2 3 -1 -1 -1 -1 -1 -1 -1 -1
output:
? 2 6 2 ? 3 6 2 5 ? 2 6 5 ? 3 6 2 1 ? 2 5 1 ? 4 6 2 1 3 ? 3 6 1 3 ? 2 5 3 ? 4 6 2 1 4 ? 3 5 3 4 ! 3 2 5 5 6 2 3
result:
ok correct
Test #11:
score: 0
Accepted
time: 1ms
memory: 5580kb
input:
3 3 1 2 3 2 1
output:
? 2 3 1 ? 2 3 2 ? 2 1 2 ! 3 3 1 2 3 2 1
result:
ok correct
Test #12:
score: 0
Accepted
time: 1ms
memory: 5872kb
input:
3 3 1 2 1 -1 -1
output:
? 2 1 3 ? 2 1 2 ? 2 3 2 ! 2 3 1 2 1
result:
ok correct
Test #13:
score: 0
Accepted
time: 1ms
memory: 5644kb
input:
5 -1 -1 5 1 -1 -1 3 1 -1 -1 -1 -1 2 1 -1 -1 2 3 2 5
output:
? 2 4 1 ? 3 4 1 5 ? 2 4 5 ? 3 4 1 3 ? 2 4 3 ? 2 5 3 ? 3 4 1 2 ? 2 4 2 ? 3 5 3 2 ? 2 5 2 ! 5 5 1 3 1 2 1 2 3 2 5
result:
ok correct
Test #14:
score: 0
Accepted
time: 0ms
memory: 3600kb
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: 5664kb
input:
5 -1 -1 4 3 -1 -1 -1 -1 -1 -1 3 5 2 5 -1 -1 -1 -1
output:
? 2 2 3 ? 3 2 3 4 ? 2 2 4 ? 3 2 3 1 ? 2 4 1 ? 4 2 3 1 5 ? 3 2 1 5 ? 2 1 5 ? 2 4 5 ! 3 4 3 3 5 2 5
result:
ok correct
Test #16:
score: 0
Accepted
time: 0ms
memory: 5636kb
input:
93 62 81 -1 -1 -1 -1 -1 -1 -1 -1 41 57 -1 -1 81 41 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 82 15 -1 -1 81 15 -1 -1 44 20 62 44 -1 -1 44 81 -1 -1 62 14 80 14 -1 -1 -1 -1 -1 -1 88 7 88 54 -1 -1 -1 -1 88 44 -1 -1 62 79 -1 -1 81 79 -1 -1 -1 -1 -1 -1 -1 -1 53 15 -1 -1 -1 -...
output:
? 2 62 81 ? 2 62 57 ? 2 81 57 ? 3 62 57 82 ? 2 81 82 ? 4 62 57 82 41 ? 3 62 82 41 ? 2 81 41 ? 4 62 57 82 20 ? 2 81 20 ? 2 41 20 ? 5 62 57 82 20 80 ? 2 81 80 ? 2 41 80 ? 6 62 57 82 20 80 7 ? 2 81 7 ? 2 41 7 ? 7 62 57 82 20 80 7 54 ? 2 81 54 ? 2 41 54 ? 8 62 57 82 20 80 7 54 15 ? 7 62 57 20 80 7 54 15...
result:
ok correct
Test #17:
score: 0
Accepted
time: 0ms
memory: 5612kb
input:
111 -1 -1 -1 -1 -1 -1 57 4 4 64 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 56 78 -1 -1 -1 -1 57 6 -1 -1 -1 -1 27 45 -1 -1 -1 -1 -1 -1 42 4 42 6 42 27 -1 -1 84 45 -1 -1 -1 -1 42 74 45 74 -1 -1 -1 -1 16 55 -1 -1 -1 -1 -1 -1 4 81 -1 -1 -1 -1 6 68 27 68 -1 -1 40 94 -1 -1 -1 -1 68 22 78 22 -1 ...
output:
? 2 78 40 ? 3 78 40 57 ? 4 78 40 57 64 ? 5 78 40 57 64 4 ? 4 78 40 64 4 ? 3 78 40 4 ? 5 78 40 57 64 5 ? 2 4 5 ? 6 78 40 57 64 5 16 ? 2 4 16 ? 7 78 40 57 64 5 16 45 ? 2 4 45 ? 8 78 40 57 64 5 16 45 104 ? 2 4 104 ? 9 78 40 57 64 5 16 45 104 56 ? 8 40 57 64 5 16 45 104 56 ? 2 4 56 ? 9 78 40 57 64 5 16 ...
result:
ok correct
Test #18:
score: 0
Accepted
time: 3ms
memory: 5724kb
input:
132 -1 -1 -1 -1 -1 -1 -1 -1 89 32 -1 -1 -1 -1 -1 -1 5 28 -1 -1 -1 -1 81 39 -1 -1 -1 -1 81 51 -1 -1 -1 -1 -1 -1 -1 -1 124 81 -1 -1 -1 -1 74 29 -1 -1 74 124 74 39 -1 -1 -1 -1 -1 -1 -1 -1 81 92 -1 -1 32 92 -1 -1 -1 -1 -1 -1 51 50 -1 -1 -1 -1 83 48 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 17 74 -1 -1 29 40 -1 -1 8...
output:
? 2 81 29 ? 3 81 29 18 ? 4 81 29 18 89 ? 5 81 29 18 89 16 ? 6 81 29 18 89 16 32 ? 5 81 29 18 16 32 ? 6 81 29 18 89 16 28 ? 2 32 28 ? 7 81 29 18 89 16 28 5 ? 6 81 29 18 89 16 5 ? 2 32 5 ? 7 81 29 18 89 16 28 39 ? 6 29 18 89 16 28 39 ? 3 32 5 39 ? 7 81 29 18 89 16 28 51 ? 6 29 18 89 16 28 51 ? 4 32 5 ...
result:
ok correct
Test #19:
score: 0
Accepted
time: 4ms
memory: 5556kb
input:
94 -1 -1 14 55 -1 -1 25 50 -1 -1 -1 -1 55 89 -1 -1 -1 -1 -1 -1 88 89 25 88 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 14 85 -1 -1 21 85 -1 -1 -1 -1 88 59 -1 -1 -1 -1 39 85 39 28 39 55 -1 -1 39 14 39 21 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 14 10 -1 -1 -1 -1 55 7 -1 -1 25 7 -1 -1 -1 -1 -1 -1 -1 -1 39 54 54 7 53 28 ...
output:
? 2 55 50 ? 3 55 50 14 ? 2 50 14 ? 3 55 50 25 ? 2 55 25 ? 2 14 25 ? 3 55 50 89 ? 2 50 89 ? 3 14 25 89 ? 3 55 50 88 ? 4 14 25 89 88 ? 3 14 25 88 ? 2 14 88 ? 4 55 50 88 28 ? 4 14 25 89 28 ? 5 55 50 88 28 41 ? 4 14 25 89 41 ? 6 55 50 88 28 41 85 ? 4 14 25 89 85 ? 3 25 89 85 ? 7 55 50 88 28 41 85 21 ? 6...
result:
ok correct
Test #20:
score: 0
Accepted
time: 1ms
memory: 5724kb
input:
73 -1 -1 8 68 -1 -1 -1 -1 -1 -1 69 8 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 40 10 -1 -1 -1 -1 -1 -1 10 27 -1 -1 12 23 -1 -1 12 10 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 17 40 17 57 -1 -1 -1 -1 -1 -1 49 40 49 23 -1 -1 -1 -1 12 49 -1 -1 -1 -1 -1 -1 4 34 4 40 -1 -1 4 10 17 4 -1 -1 -1 -1 -1 -1 -1 -1 -1 ...
output:
? 2 8 44 ? 3 8 44 68 ? 2 44 68 ? 3 8 44 34 ? 2 68 34 ? 4 8 44 34 69 ? 3 44 34 69 ? 2 68 69 ? 4 8 44 34 40 ? 3 68 69 40 ? 5 8 44 34 40 23 ? 3 68 69 23 ? 6 8 44 34 40 23 10 ? 5 8 44 34 23 10 ? 3 68 69 10 ? 6 8 44 34 40 23 27 ? 4 68 69 10 27 ? 3 68 69 27 ? 7 8 44 34 40 23 27 12 ? 6 8 44 34 40 27 12 ? 4...
result:
ok correct
Test #21:
score: 0
Accepted
time: 7ms
memory: 5660kb
input:
77 -1 -1 42 28 -1 -1 42 56 -1 -1 -1 -1 -1 -1 14 28 14 56 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 18 24 -1 -1 -1 -1 18 32 -1 -1 28 32 -1 -1 -1 -1 -1 -1 34 32 14 72 -1 -1 24 72 56 72 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 16 42 16 34 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 14 38 -1 -1 -1 -1 -1 -1 76 73 34 73 -1 -1 73 ...
output:
? 2 42 39 ? 3 42 39 28 ? 2 39 28 ? 3 42 39 56 ? 2 39 56 ? 2 28 56 ? 3 42 39 14 ? 3 28 56 14 ? 2 56 14 ? 4 42 39 14 18 ? 3 28 56 18 ? 5 42 39 14 18 76 ? 3 28 56 76 ? 6 42 39 14 18 76 48 ? 3 28 56 48 ? 7 42 39 14 18 76 48 24 ? 6 42 39 14 76 48 24 ? 3 28 56 24 ? 7 42 39 14 18 76 48 32 ? 6 42 39 14 76 4...
result:
ok correct
Test #22:
score: 0
Accepted
time: 8ms
memory: 5684kb
input:
81 -1 -1 46 51 73 46 73 47 -1 -1 46 47 -1 -1 -1 -1 -1 -1 80 6 6 51 -1 -1 46 6 -1 -1 -1 -1 -1 -1 60 47 60 6 60 37 73 37 -1 -1 -1 -1 47 37 -1 -1 39 51 -1 -1 39 46 -1 -1 39 47 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 2 60 -1 -1 2 37 -1 -1 2 47 -1 -1 -1 -1 -1 -1 -1 -1 6 17 -1 -1 -1 -1 8 51 -1 -1 -1 -1 -1 -1 -1 -1 ...
output:
? 2 73 51 ? 3 73 51 46 ? 2 73 46 ? 3 73 51 47 ? 2 51 47 ? 2 46 47 ? 3 73 51 80 ? 2 46 80 ? 2 47 80 ? 4 73 51 80 6 ? 3 73 51 6 ? 2 73 6 ? 2 46 6 ? 2 47 6 ? 4 73 51 80 60 ? 2 46 60 ? 3 47 6 60 ? 2 6 60 ? 5 73 51 80 60 37 ? 4 73 51 80 37 ? 3 51 80 37 ? 2 46 37 ? 3 47 6 37 ? 2 6 37 ? 5 73 51 80 60 39 ? ...
result:
ok correct
Test #23:
score: 0
Accepted
time: 4ms
memory: 5684kb
input:
93 -1 -1 43 90 -1 -1 17 90 -1 -1 -1 -1 -1 -1 -1 -1 90 84 -1 -1 17 84 -1 -1 -1 -1 43 70 -1 -1 -1 -1 -1 -1 -1 -1 74 84 -1 -1 17 21 -1 -1 -1 -1 1 21 -1 -1 17 1 43 1 -1 -1 -1 -1 69 17 -1 -1 -1 -1 74 22 22 70 -1 -1 -1 -1 -1 -1 11 21 70 11 -1 -1 -1 -1 -1 -1 69 12 -1 -1 43 12 -1 -1 84 12 -1 -1 83 90 83 70 ...
output:
? 2 92 90 ? 3 92 90 43 ? 2 92 43 ? 3 92 90 17 ? 2 92 17 ? 2 43 17 ? 3 92 90 47 ? 3 43 17 47 ? 4 92 90 47 84 ? 3 92 47 84 ? 3 43 17 84 ? 2 43 84 ? 4 92 90 47 70 ? 3 43 17 70 ? 2 17 70 ? 2 84 70 ? 5 92 90 47 70 74 ? 3 43 17 74 ? 2 84 74 ? 6 92 90 47 70 74 21 ? 3 43 17 21 ? 2 43 21 ? 2 84 21 ? 7 92 90 ...
result:
ok correct
Test #24:
score: 0
Accepted
time: 4ms
memory: 5844kb
input:
37 37 18 20 18 20 37 -1 -1 27 37 27 20 6 27 6 18 -1 -1 6 20 35 27 -1 -1 35 37 6 35 35 20 18 26 27 26 6 26 37 26 -1 -1 35 26 17 18 -1 -1 -1 -1 17 26 -1 -1 35 17 23 18 -1 -1 6 23 23 37 -1 -1 -1 -1 35 23 15 18 27 15 15 37 15 17 -1 -1 15 23 15 26 -1 -1 -1 -1 1 18 -1 -1 1 37 1 17 -1 -1 1 26 20 1 -1 -1 1 ...
output:
? 2 18 37 ? 2 18 20 ? 2 37 20 ? 2 18 27 ? 2 37 27 ? 2 20 27 ? 3 18 27 6 ? 2 18 6 ? 2 37 6 ? 2 20 6 ? 3 18 27 35 ? 2 18 35 ? 3 37 6 35 ? 2 6 35 ? 2 20 35 ? 3 18 27 26 ? 2 27 26 ? 3 37 6 26 ? 2 37 26 ? 2 20 26 ? 2 35 26 ? 3 18 27 17 ? 2 27 17 ? 3 37 6 17 ? 3 20 26 17 ? 2 20 17 ? 2 35 17 ? 3 18 27 23 ?...
result:
ok correct
Test #25:
score: 0
Accepted
time: 1ms
memory: 5876kb
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 -1 -1 -1 -1 -1 -1 86 3 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 134 48 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 60 56 60 76 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 134 99 -1 -1 -...
output:
? 2 18 25 ? 3 18 25 8 ? 4 18 25 8 120 ? 5 18 25 8 120 54 ? 6 18 25 8 120 54 26 ? 7 18 25 8 120 54 26 30 ? 8 18 25 8 120 54 26 30 34 ? 9 18 25 8 120 54 26 30 34 104 ? 10 18 25 8 120 54 26 30 34 104 57 ? 11 18 25 8 120 54 26 30 34 104 57 62 ? 12 18 25 8 120 54 26 30 34 104 57 62 7 ? 13 18 25 8 120 54 ...
result:
ok correct
Test #26:
score: 0
Accepted
time: 26ms
memory: 3808kb
input:
561 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 464 173 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 492 12 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 491 492 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 514...
output:
? 2 316 303 ? 3 316 303 349 ? 4 316 303 349 392 ? 5 316 303 349 392 157 ? 6 316 303 349 392 157 464 ? 7 316 303 349 392 157 464 270 ? 8 316 303 349 392 157 464 270 173 ? 7 316 303 349 392 157 270 173 ? 8 316 303 349 392 157 464 270 35 ? 2 173 35 ? 9 316 303 349 392 157 464 270 35 12 ? 2 173 12 ? 10 ...
result:
ok correct
Test #27:
score: 0
Accepted
time: 26ms
memory: 3624kb
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 176 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 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ...
output:
? 2 561 449 ? 3 561 449 29 ? 4 561 449 29 110 ? 5 561 449 29 110 46 ? 6 561 449 29 110 46 333 ? 7 561 449 29 110 46 333 50 ? 8 561 449 29 110 46 333 50 173 ? 9 561 449 29 110 46 333 50 173 109 ? 10 561 449 29 110 46 333 50 173 109 361 ? 11 561 449 29 110 46 333 50 173 109 361 315 ? 12 561 449 29 110...
result:
ok correct
Test #28:
score: 0
Accepted
time: 59ms
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 -1 -1 -1 -1 -1 -1 -1 -1 285 800 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 689 603 -1 -1 -1 -1 -1 -1 -1 -1 -1 -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 231 266 ? 3 231 266 990 ? 4 231 266 990 902 ? 5 231 266 990 902 574 ? 6 231 266 990 902 574 887 ? 7 231 266 990 902 574 887 860 ? 8 231 266 990 902 574 887 860 888 ? 9 231 266 990 902 574 887 860 888 285 ? 10 231 266 990 902 574 887 860 888 285 204 ? 11 231 266 990 902 574 887 860 888 285 204 91...
result:
ok correct
Test #29:
score: 0
Accepted
time: 71ms
memory: 5700kb
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 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 594 745 -1 -1 -1 -1 -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 200 331 ? 3 200 331 536 ? 4 200 331 536 255 ? 5 200 331 536 255 550 ? 6 200 331 536 255 550 43 ? 7 200 331 536 255 550 43 179 ? 8 200 331 536 255 550 43 179 1 ? 9 200 331 536 255 550 43 179 1 906 ? 10 200 331 536 255 550 43 179 1 906 748 ? 11 200 331 536 255 550 43 179 1 906 748 581 ? 12 200 331...
result:
ok correct
Test #30:
score: -100
Wrong Answer
time: 153ms
memory: 5848kb
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 226 355 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1...
output:
? 2 1583 791 ? 3 1583 791 157 ? 4 1583 791 157 230 ? 5 1583 791 157 230 1653 ? 6 1583 791 157 230 1653 1333 ? 7 1583 791 157 230 1653 1333 571 ? 8 1583 791 157 230 1653 1333 571 1555 ? 9 1583 791 157 230 1653 1333 571 1555 1496 ? 10 1583 791 157 230 1653 1333 571 1555 1496 1742 ? 11 1583 791 157 230...
result:
wrong answer read 677 edges but expected 1031 edges