QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#496940 | #4218. Hidden Graph | haze | WA | 8ms | 5888kb | C++23 | 2.4kb | 2024-07-28 17:06:52 | 2024-07-28 17:06:52 |
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;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 5632kb
input:
3 1 3 2 3 1 2
output:
? 2 3 1 ? 2 3 2 ? 2 1 2 ! 3 1 3 2 3 1 2
result:
ok correct
Test #2:
score: 0
Accepted
time: 1ms
memory: 5852kb
input:
10 -1 -1 -1 -1 4 5 4 10 -1 -1 -1 -1 1 4 -1 -1 -1 -1 -1 -1 4 8 3 10 3 7 3 9 3 8 1 3 -1 -1 -1 -1 -1 -1 -1 -1 1 2 2 5 2 6 -1 -1 -1 -1
output:
? 2 5 9 ? 3 5 9 10 ? 4 5 9 10 4 ? 3 9 10 4 ? 2 9 4 ? 4 5 9 10 1 ? 2 4 1 ? 5 5 9 10 1 7 ? 2 4 7 ? 6 5 9 10 1 7 8 ? 2 4 8 ? 7 5 9 10 1 7 8 3 ? 6 5 9 1 7 8 3 ? 5 5 9 1 8 3 ? 4 5 1 8 3 ? 3 5 1 3 ? 2 5 3 ? 2 4 3 ? 7 5 9 10 1 7 8 6 ? 3 4 3 6 ? 8 5 9 10 1 7 8 6 2 ? 7 5 9 10 7 8 6 2 ? 6 9 10 7 8 6 2 ? 5 9 1...
result:
ok correct
Test #3:
score: 0
Accepted
time: 0ms
memory: 5868kb
input:
5 4 2 2 1 4 1 3 2 -1 -1 3 1 5 2 -1 -1 5 1
output:
? 2 2 4 ? 2 2 1 ? 2 4 1 ? 2 2 3 ? 2 4 3 ? 2 1 3 ? 2 2 5 ? 3 4 3 5 ? 2 1 5 ! 7 4 2 2 1 4 1 3 2 3 1 5 2 5 1
result:
ok correct
Test #4:
score: 0
Accepted
time: 1ms
memory: 5820kb
input:
3 1 3 2 1 -1 -1
output:
? 2 1 3 ? 2 1 2 ? 2 3 2 ! 2 1 3 2 1
result:
ok correct
Test #5:
score: 0
Accepted
time: 1ms
memory: 5824kb
input:
6 -1 -1 -1 -1 1 2 2 5 -1 -1 3 5 3 1 3 6 3 2 4 5 -1 -1 4 2 3 4
output:
? 2 1 5 ? 3 1 5 6 ? 4 1 5 6 2 ? 3 5 6 2 ? 2 6 2 ? 4 1 5 6 3 ? 3 1 6 3 ? 2 6 3 ? 2 2 3 ? 4 1 5 6 4 ? 3 1 6 4 ? 2 2 4 ? 2 3 4 ! 9 1 2 2 5 3 5 3 1 3 6 3 2 4 5 4 2 3 4
result:
ok correct
Test #6:
score: 0
Accepted
time: 0ms
memory: 5668kb
input:
27 17 25 -1 -1 -1 -1 24 5 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 3 5 3 17 24 18 -1 -1 17 18 -1 -1 24 19 3 19 -1 -1 5 19 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 22 25 7 22 -1 -1 -1 -1 -1 -1 7 26 -1 -1 22 26 17 26 5 26 19 26 -1 -1 -1 -1 22 16 17 16 -1 -1 19 16 16 18 -1 -1 3 2 -1 -1 2 5 -1 -1 2 19 -1 -1 2 26 -1 -1 5 20 2...
output:
? 2 25 17 ? 2 25 24 ? 2 17 24 ? 3 25 24 5 ? 2 25 5 ? 2 17 5 ? 3 25 24 23 ? 3 17 5 23 ? 4 25 24 23 3 ? 3 17 5 3 ? 2 17 3 ? 5 25 24 23 3 18 ? 4 25 23 3 18 ? 3 17 5 18 ? 2 5 18 ? 5 25 24 23 3 19 ? 4 25 23 3 19 ? 3 25 23 19 ? 3 17 5 19 ? 2 17 19 ? 2 18 19 ? 5 25 24 23 3 7 ? 3 17 5 7 ? 3 18 19 7 ? 6 25 2...
result:
ok correct
Test #7:
score: 0
Accepted
time: 4ms
memory: 5836kb
input:
47 22 36 22 34 -1 -1 -1 -1 28 36 -1 -1 22 7 -1 -1 7 34 -1 -1 21 28 22 21 21 34 -1 -1 21 7 22 11 -1 -1 -1 -1 7 11 21 11 27 28 -1 -1 27 34 27 36 27 11 27 7 27 21 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 23 28 -1 -1 23 8 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 7 24 23 24 -1 -1 -1 -1 -1 -1 31 36 31 24 -1 -1 -1 -1 -1 -...
output:
? 2 22 36 ? 2 22 34 ? 2 36 34 ? 2 22 28 ? 3 36 34 28 ? 2 34 28 ? 3 22 28 7 ? 2 28 7 ? 3 36 34 7 ? 2 36 7 ? 3 22 28 21 ? 2 22 21 ? 3 36 34 21 ? 2 36 21 ? 2 7 21 ? 3 22 28 11 ? 2 28 11 ? 3 36 34 11 ? 2 7 11 ? 2 21 11 ? 3 22 28 27 ? 2 22 27 ? 4 36 34 11 27 ? 3 36 11 27 ? 2 11 27 ? 2 7 27 ? 2 21 27 ? 3 ...
result:
ok correct
Test #8:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
38 -1 -1 -1 -1 -1 -1 4 6 -1 -1 -1 -1 -1 -1 4 33 33 9 -1 -1 33 6 2 7 4 7 12 7 -1 -1 6 7 -1 -1 -1 -1 -1 -1 -1 -1 2 25 -1 -1 -1 -1 -1 -1 4 20 -1 -1 6 20 -1 -1 4 10 -1 -1 -1 -1 -1 -1 -1 -1 6 23 23 25 -1 -1 16 23 16 12 -1 -1 16 6 16 25 16 20 -1 -1 12 32 -1 -1 -1 -1 -1 -1 -1 -1 1 23 4 1 -1 -1 -1 -1 -1 -1 ...
output:
? 2 9 30 ? 3 9 30 2 ? 4 9 30 2 4 ? 5 9 30 2 4 6 ? 4 9 30 2 6 ? 5 9 30 2 4 12 ? 2 6 12 ? 6 9 30 2 4 12 33 ? 5 9 30 2 12 33 ? 4 30 2 12 33 ? 2 6 33 ? 6 9 30 2 4 12 7 ? 5 9 30 4 12 7 ? 4 9 30 12 7 ? 3 9 30 7 ? 2 6 7 ? 2 33 7 ? 6 9 30 2 4 12 26 ? 2 6 26 ? 3 33 7 26 ? 7 9 30 2 4 12 26 25 ? 6 9 30 4 12 26...
result:
ok correct
Test #9:
score: 0
Accepted
time: 0ms
memory: 5716kb
input:
25 16 21 22 21 -1 -1 -1 -1 -1 -1 -1 -1 16 14 14 22 -1 -1 18 21 -1 -1 18 22 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 24 15 -1 -1 -1 -1 14 3 -1 -1 22 3 16 3 -1 -1 -1 -1 -1 -1 16 9 -1 -1 -1 -1 21 11 9 11 -1 -1 19 11 -1 -1 -1 -1 -1 -1 16 12 -1 -1 18 12 -1 -1 -1 -1 -1 -1 -1 -1 5 14 5 21 -1 -1 -1 -1 -1 -1 7 14 -1 -1...
output:
? 2 21 16 ? 2 21 22 ? 2 16 22 ? 2 21 15 ? 3 16 22 15 ? 2 21 14 ? 4 16 22 15 14 ? 3 22 15 14 ? 2 15 14 ? 3 21 14 18 ? 2 14 18 ? 4 16 22 15 18 ? 3 16 15 18 ? 3 21 14 19 ? 4 16 22 15 19 ? 2 18 19 ? 3 21 14 24 ? 5 16 22 15 19 24 ? 4 16 22 19 24 ? 2 18 24 ? 4 21 14 24 3 ? 3 21 24 3 ? 5 16 22 15 19 3 ? 4 ...
result:
ok correct
Test #10:
score: 0
Accepted
time: 1ms
memory: 5696kb
input:
6 -1 -1 2 5 2 3 -1 -1 -1 -1 -1 -1 -1 -1 5 6 -1 -1 -1 -1
output:
? 2 3 5 ? 3 3 5 2 ? 2 3 2 ? 3 3 5 1 ? 2 2 1 ? 4 3 5 1 4 ? 2 2 4 ? 5 3 5 1 4 6 ? 4 3 1 4 6 ? 2 2 6 ! 3 2 5 2 3 5 6
result:
ok correct
Test #11:
score: 0
Accepted
time: 1ms
memory: 5584kb
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: 5656kb
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: 5592kb
input:
5 -1 -1 3 1 -1 -1 2 3 -1 -1 2 1 -1 -1 5 1 2 5
output:
? 2 4 3 ? 3 4 3 1 ? 2 4 1 ? 3 4 3 2 ? 2 4 2 ? 2 1 2 ? 3 4 3 5 ? 2 1 5 ? 2 2 5 ! 5 3 1 2 3 2 1 5 1 2 5
result:
ok correct
Test #14:
score: 0
Accepted
time: 1ms
memory: 5708kb
input:
3 -1 -1 2 1 -1 -1
output:
? 2 1 3 ? 3 1 3 2 ? 2 3 2 ! 1 2 1
result:
ok correct
Test #15:
score: 0
Accepted
time: 1ms
memory: 3548kb
input:
5 -1 -1 -1 -1 2 5 -1 -1 4 3 -1 -1 3 5
output:
? 2 1 2 ? 3 1 2 4 ? 4 1 2 4 5 ? 3 1 4 5 ? 4 1 2 4 3 ? 3 1 2 3 ? 2 5 3 ! 3 2 5 4 3 3 5
result:
ok correct
Test #16:
score: 0
Accepted
time: 0ms
memory: 5700kb
input:
93 -1 -1 -1 -1 -1 -1 62 81 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 31 28 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 62 24 -1 -1 -1 -1 -1 -1 57 16 81 16 -1 -1 -1 -1 -1 -1 62 2 -1 -1 2 65 -1 -1 -1 -1 -1 -1 -1 -1 40 2 40 34 -1 -1 -1 -1 83 81 -1 -1 -1 -1 84 69 -1 -1 40 69 69 16 -1 -1 7 76 -1 -1 -1 -1 -1 -1 56 81 -...
output:
? 2 31 81 ? 3 31 81 7 ? 4 31 81 7 18 ? 5 31 81 7 18 62 ? 4 31 7 18 62 ? 5 31 81 7 18 1 ? 2 62 1 ? 6 31 81 7 18 1 34 ? 2 62 34 ? 7 31 81 7 18 1 34 28 ? 6 81 7 18 1 34 28 ? 2 62 28 ? 7 31 81 7 18 1 34 57 ? 3 62 28 57 ? 8 31 81 7 18 1 34 57 48 ? 3 62 28 48 ? 9 31 81 7 18 1 34 57 48 24 ? 3 62 28 24 ? 2 ...
result:
ok correct
Test #17:
score: 0
Accepted
time: 8ms
memory: 5656kb
input:
111 -1 -1 -1 -1 -1 -1 50 56 -1 -1 47 5 -1 -1 -1 -1 56 41 -1 -1 -1 -1 5 105 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 6 99 -1 -1 6 50 6 47 -1 -1 -1 -1 -1 -1 -1 -1 38 15 106 15 -1 -1 47 15 -1 -1 -1 -1 107 56 -1 -1 107 50 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 56 18 18 5 -1 -1 -1 -1 -1 -1 110 43 53 110 -1 -1 -1 -1 -1...
output:
? 2 99 56 ? 3 99 56 5 ? 4 99 56 5 53 ? 5 99 56 5 53 50 ? 4 99 5 53 50 ? 5 99 56 5 53 47 ? 4 99 56 53 47 ? 2 50 47 ? 5 99 56 5 53 41 ? 4 99 5 53 41 ? 3 50 47 41 ? 5 99 56 5 53 105 ? 4 99 56 53 105 ? 4 50 47 41 105 ? 5 99 56 5 53 106 ? 5 50 47 41 105 106 ? 6 99 56 5 53 106 43 ? 5 50 47 41 105 43 ? 7 9...
result:
ok correct
Test #18:
score: 0
Accepted
time: 5ms
memory: 5888kb
input:
132 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 10 63 -1 -1 7 75 103 7 -1 -1 -1 -1 113 68 113 69 -1 -1 7 113 -1 -1 28 10 -1 -1 -1 -1 -1 -1 75 13 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 7 2 -1 -1 -1 -1 3 115 -1 -1 -1 -1 -1 -1 69 32 -1 -1 32 13 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ...
output:
? 2 10 69 ? 3 10 69 103 ? 4 10 69 103 36 ? 5 10 69 103 36 75 ? 6 10 69 103 36 75 64 ? 7 10 69 103 36 75 64 3 ? 8 10 69 103 36 75 64 3 68 ? 9 10 69 103 36 75 64 3 68 114 ? 10 10 69 103 36 75 64 3 68 114 63 ? 9 69 103 36 75 64 3 68 114 63 ? 10 10 69 103 36 75 64 3 68 114 7 ? 9 10 69 103 36 64 3 68 114...
result:
ok correct
Test #19:
score: 0
Accepted
time: 0ms
memory: 5724kb
input:
94 -1 -1 24 45 -1 -1 -1 -1 24 93 43 45 -1 -1 -1 -1 -1 -1 -1 -1 93 12 -1 -1 43 12 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 43 88 -1 -1 -1 -1 14 57 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 7 45 -1 -1 24 7 -1 -1 -1 -1 39 14 39 93 -1 -1 24 39 43 39 -1 -1 39 12 -1 -1 6 45 -1 -1 -1 -1 -1 -1 -1 -1 47 93 ...
output:
? 2 84 45 ? 3 84 45 24 ? 2 84 24 ? 3 84 45 93 ? 2 24 93 ? 4 84 45 93 43 ? 3 84 93 43 ? 2 24 43 ? 4 84 45 93 29 ? 3 24 43 29 ? 5 84 45 93 29 12 ? 4 84 45 29 12 ? 3 24 43 12 ? 2 24 12 ? 5 84 45 93 29 14 ? 3 24 43 14 ? 2 12 14 ? 6 84 45 93 29 14 88 ? 3 24 43 88 ? 2 24 88 ? 2 12 88 ? 7 84 45 93 29 14 88...
result:
ok correct
Test #20:
score: 0
Accepted
time: 0ms
memory: 5672kb
input:
73 -1 -1 -1 -1 -1 -1 -1 -1 51 38 -1 -1 59 64 -1 -1 -1 -1 51 72 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 72 66 -1 -1 51 25 25 59 25 18 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 59 26 -1 -1 72 26 25 26 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 13 22 -1 -1 13 25 13 38 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ...
output:
? 2 51 18 ? 3 51 18 69 ? 4 51 18 69 59 ? 5 51 18 69 59 22 ? 6 51 18 69 59 22 38 ? 5 18 69 59 22 38 ? 6 51 18 69 59 22 64 ? 5 51 18 69 22 64 ? 2 38 64 ? 6 51 18 69 59 22 72 ? 5 18 69 59 22 72 ? 3 38 64 72 ? 6 51 18 69 59 22 37 ? 4 38 64 72 37 ? 7 51 18 69 59 22 37 31 ? 4 38 64 72 31 ? 8 51 18 69 59 2...
result:
ok correct
Test #21:
score: 0
Accepted
time: 3ms
memory: 5724kb
input:
77 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 51 5 -1 -1 4 30 30 45 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 37 30 37 5 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 12 45 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 63 4 -1 -1 -1 -1 21 4 21 45 -1 -1 63 21 21 5 -1 -1 50 4 -1 -1 50 63 -1 -1 50 21 40 72 -1 -1 30 72 -1 -1 21 72 -1 -1 11 45 26 1...
output:
? 2 4 9 ? 3 4 9 45 ? 4 4 9 45 43 ? 5 4 9 45 43 38 ? 6 4 9 45 43 38 51 ? 7 4 9 45 43 38 51 5 ? 6 4 9 45 43 38 5 ? 7 4 9 45 43 38 51 30 ? 6 9 45 43 38 51 30 ? 5 9 43 38 51 30 ? 2 5 30 ? 7 4 9 45 43 38 51 59 ? 3 5 30 59 ? 8 4 9 45 43 38 51 59 37 ? 3 5 30 37 ? 2 5 37 ? 9 4 9 45 43 38 51 59 37 71 ? 3 5 3...
result:
ok correct
Test #22:
score: 0
Accepted
time: 0ms
memory: 5716kb
input:
81 -1 -1 33 16 -1 -1 -1 -1 33 23 67 56 -1 -1 -1 -1 -1 -1 67 61 -1 -1 -1 -1 67 4 -1 -1 64 56 64 4 -1 -1 -1 -1 42 4 42 16 -1 -1 42 33 64 42 -1 -1 -1 -1 -1 -1 -1 -1 75 16 -1 -1 67 75 -1 -1 -1 -1 -1 -1 64 68 -1 -1 -1 -1 23 59 -1 -1 -1 -1 -1 -1 10 23 10 4 -1 -1 10 64 10 59 -1 -1 10 42 -1 -1 1 16 -1 -1 64...
output:
? 2 16 56 ? 3 16 56 33 ? 2 56 33 ? 3 16 56 23 ? 2 33 23 ? 4 16 56 23 67 ? 3 16 23 67 ? 2 33 67 ? 4 16 56 23 61 ? 3 33 67 61 ? 2 33 61 ? 5 16 56 23 61 4 ? 3 33 67 4 ? 2 33 4 ? 6 16 56 23 61 4 64 ? 5 16 23 61 4 64 ? 4 16 23 61 64 ? 3 33 67 64 ? 6 16 56 23 61 4 42 ? 5 16 56 23 61 42 ? 4 56 23 61 42 ? 4...
result:
ok correct
Test #23:
score: 0
Accepted
time: 0ms
memory: 5680kb
input:
93 -1 -1 -1 -1 93 1 -1 -1 1 8 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 23 8 -1 -1 38 41 -1 -1 -1 -1 -1 -1 93 90 -1 -1 -1 -1 74 93 74 41 -1 -1 -1 -1 -1 -1 -1 -1 8 62 -1 -1 69 12 -1 -1 -1 -1 -1 -1 -1 -1 62 91 -1 -1 8 91 -1 -1 83 62 83 90 -1 -1 -1 -1 -1 -1 27 64 74 27 27 23 38 27 -1 -1 41 27 -1 -1 -1 -1 74 78 78 ...
output:
? 2 69 64 ? 3 69 64 1 ? 4 69 64 1 93 ? 3 69 64 93 ? 4 69 64 1 8 ? 3 69 64 8 ? 2 93 8 ? 4 69 64 1 38 ? 3 93 8 38 ? 5 69 64 1 38 23 ? 3 93 8 23 ? 2 93 23 ? 6 69 64 1 38 23 41 ? 5 69 64 1 23 41 ? 3 93 8 41 ? 6 69 64 1 38 23 90 ? 4 93 8 41 90 ? 3 8 41 90 ? 7 69 64 1 38 23 90 74 ? 4 93 8 41 74 ? 3 8 41 7...
result:
ok correct
Test #24:
score: 0
Accepted
time: 4ms
memory: 3560kb
input:
37 27 15 -1 -1 14 27 14 5 -1 -1 -1 -1 -1 -1 25 27 -1 -1 -1 -1 -1 -1 25 32 -1 -1 -1 -1 36 25 36 14 -1 -1 36 27 -1 -1 3 25 14 3 -1 -1 3 27 3 32 -1 -1 36 3 22 15 22 25 22 13 -1 -1 22 27 -1 -1 -1 -1 -1 -1 33 14 33 25 -1 -1 33 27 33 32 -1 -1 -1 -1 -1 -1 25 16 13 16 -1 -1 27 16 5 16 -1 -1 33 16 -1 -1 -1 -...
output:
? 2 15 27 ? 2 15 14 ? 2 27 14 ? 3 15 14 5 ? 2 15 5 ? 2 27 5 ? 3 15 14 25 ? 3 27 5 25 ? 2 5 25 ? 4 15 14 25 13 ? 3 27 5 13 ? 5 15 14 25 13 32 ? 4 15 14 13 32 ? 3 27 5 32 ? 5 15 14 25 13 36 ? 4 15 14 13 36 ? 3 15 13 36 ? 4 27 5 32 36 ? 3 5 32 36 ? 5 15 14 25 13 3 ? 4 15 14 13 3 ? 3 15 13 3 ? 4 27 5 32...
result:
ok correct
Test #25:
score: -100
Wrong Answer
time: 4ms
memory: 3936kb
input:
144 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 17 62 -1 -1 62 47 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 91 60 -1 -1 -1 -1 -1 -1 -1 -1 74 72 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 86...
output:
? 2 52 57 ? 3 52 57 61 ? 4 52 57 61 105 ? 5 52 57 61 105 62 ? 6 52 57 61 105 62 111 ? 7 52 57 61 105 62 111 27 ? 8 52 57 61 105 62 111 27 124 ? 9 52 57 61 105 62 111 27 124 131 ? 10 52 57 61 105 62 111 27 124 131 10 ? 11 52 57 61 105 62 111 27 124 131 10 1 ? 12 52 57 61 105 62 111 27 124 131 10 1 17...
result:
wrong answer Query Limit Exceeded (lim = 432)