QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#122242 | #4218. Hidden Graph | Kostlin | AC ✓ | 127ms | 7544kb | C++14 | 1.9kb | 2023-07-09 21:17:20 | 2023-07-09 21:17:21 |
Judging History
answer
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <vector>
using namespace std;
#define fi first
#define sc second
#define mkp make_pair
#define pii pair<int,int>
typedef long long ll;
const int N=2005,oo=1e9;
inline int read() {
int x=0,flag=0;char ch=getchar();
while(ch<'0'||ch>'9') {flag|=(ch=='-');ch=getchar();}
while('0'<=ch&&ch<='9') {x=(x<<3)+(x<<1)+ch-'0';ch=getchar();}
return flag?-x:x;
}
int n,m; bool vis[N],Vis[N],f[N][N];
inline pii query(vector<int>S) {
printf("? %d ",S.size());
for(int&V:S) printf("%d ",V);
printf("\n");
fflush(stdout);
return mkp(read(),read());
}
int main() {
n=read(); pii qwq;
for(int i=1;i<=n;++i) {
if(vis[i]) continue;
vis[i]=1; vector<int>now={i},Now;
for(int j=1;j<=n;++j) {
if(vis[j]) continue;
Now=now; Now.push_back(j);
qwq=query(Now);
if(qwq.fi==-1&&qwq.sc==-1) {
vis[j]=1;
now.push_back(j);
} else f[qwq.fi][qwq.sc]=f[qwq.sc][qwq.fi]=1,++m;
}
bool flag=1;
while(flag) {
flag=0;
for(int j=1;j<=n;++j) {
if(vis[j]||Vis[j]) continue;
Now.clear();
for(int&V:now) if(!f[j][V]) Now.push_back(V);
if(Now.empty()) {Vis[j]=1;continue;}
Now.push_back(j);
qwq=query(Now);
if(qwq.fi==-1&&qwq.sc==-1) Vis[j]=1;
else {
flag=1;
f[qwq.fi][qwq.sc]=f[qwq.sc][qwq.fi]=1,++m;
}
}
}
for(int j=1;j<=n;++j) Vis[j]=0;
}
printf("! %d\n",m);
for(int i=1;i<=n;++i)
for(int j=i+1;j<=n;++j)
if(f[i][j]) printf("%d %d\n",i,j);
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3572kb
input:
3 1 2 1 3 2 3
output:
? 2 1 2 ? 2 1 3 ? 2 2 3 ! 3 1 2 1 3 2 3
result:
ok correct
Test #2:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
10 1 2 1 3 1 4 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 2 5 3 7 4 5 2 6 3 10 4 8 -1 -1 3 8 4 10 3 9 -1 -1 -1 -1 -1 -1 -1 -1
output:
? 2 1 2 ? 2 1 3 ? 2 1 4 ? 2 1 5 ? 3 1 5 6 ? 4 1 5 6 7 ? 5 1 5 6 7 8 ? 6 1 5 6 7 8 9 ? 7 1 5 6 7 8 9 10 ? 7 5 6 7 8 9 10 2 ? 7 5 6 7 8 9 10 3 ? 7 5 6 7 8 9 10 4 ? 6 6 7 8 9 10 2 ? 6 5 6 8 9 10 3 ? 6 6 7 8 9 10 4 ? 5 7 8 9 10 2 ? 5 5 6 8 9 3 ? 5 6 7 9 10 4 ? 4 5 6 9 3 ? 4 6 7 9 4 ?...
result:
ok correct
Test #3:
score: 0
Accepted
time: 1ms
memory: 3596kb
input:
5 2 1 3 1 4 1 5 1 3 2 4 2 5 2 -1 -1 -1 -1
output:
? 2 1 2 ? 2 1 3 ? 2 1 4 ? 2 1 5 ? 2 2 3 ? 2 2 4 ? 2 2 5 ? 2 3 4 ? 3 3 4 5 ! 7 1 2 1 3 1 4 1 5 2 3 2 4 2 5
result:
ok correct
Test #4:
score: 0
Accepted
time: 2ms
memory: 3516kb
input:
3 2 1 1 3 -1 -1
output:
? 2 1 2 ? 2 1 3 ? 2 2 3 ! 2 1 2 1 3
result:
ok correct
Test #5:
score: 0
Accepted
time: 2ms
memory: 3648kb
input:
6 1 2 3 1 -1 -1 4 5 -1 -1 4 2 3 6 -1 -1 -1 -1 3 4 3 2 2 5 3 5
output:
? 2 1 2 ? 2 1 3 ? 2 1 4 ? 3 1 4 5 ? 3 1 4 6 ? 3 4 6 2 ? 3 4 6 3 ? 3 1 6 5 ? 2 6 2 ? 2 4 3 ? 2 2 3 ? 2 2 5 ? 2 3 5 ! 9 1 2 1 3 2 3 2 4 2 5 3 4 3 5 3 6 4 5
result:
ok correct
Test #6:
score: 0
Accepted
time: 3ms
memory: 3700kb
input:
27 -1 -1 3 1 -1 -1 1 5 6 1 -1 -1 1 8 1 9 -1 -1 4 11 -1 -1 10 13 14 1 10 15 10 16 -1 -1 12 18 2 19 -1 -1 21 17 1 22 -1 -1 24 10 17 25 17 26 23 27 3 2 5 12 -1 -1 10 8 9 20 1 11 -1 -1 14 12 -1 -1 17 16 20 18 1 19 21 2 22 20 -1 -1 -1 -1 2 26 2 27 3 17 2 5 -1 -1 -1 -1 12 11 -1 -1 -1 -1 17 18 -1 -1 21 1 7...
output:
? 2 1 2 ? 3 1 2 3 ? 3 1 2 4 ? 4 1 2 4 5 ? 4 1 2 4 6 ? 4 1 2 4 7 ? 5 1 2 4 7 8 ? 5 1 2 4 7 9 ? 5 1 2 4 7 10 ? 6 1 2 4 7 10 11 ? 6 1 2 4 7 10 12 ? 7 1 2 4 7 10 12 13 ? 7 1 2 4 7 10 12 14 ? 7 1 2 4 7 10 12 15 ? 7 1 2 4 7 10 12 16 ? 7 1 2 4 7 10 12 17 ? 8 1 2 4 7 10 12 17 18 ? 8 1 2 4 7...
result:
ok correct
Test #7:
score: 0
Accepted
time: 4ms
memory: 3728kb
input:
47 -1 -1 -1 -1 -1 -1 5 4 -1 -1 7 6 -1 -1 9 4 -1 -1 11 1 2 12 -1 -1 -1 -1 13 15 16 1 17 1 18 3 19 2 20 6 10 21 22 10 23 4 -1 -1 25 8 26 24 -1 -1 27 28 10 29 -1 -1 31 24 6 32 2 33 27 34 35 1 27 36 6 37 38 30 3 39 27 40 -1 -1 13 42 27 43 44 1 -1 -1 46 3 45 47 5 8 13 7 27 9 13 11 12 3 27 15 -1 -1 17 3 1...
output:
? 2 1 2 ? 3 1 2 3 ? 4 1 2 3 4 ? 5 1 2 3 4 5 ? 5 1 2 3 4 6 ? 6 1 2 3 4 6 7 ? 6 1 2 3 4 6 8 ? 7 1 2 3 4 6 8 9 ? 7 1 2 3 4 6 8 10 ? 8 1 2 3 4 6 8 10 11 ? 8 1 2 3 4 6 8 10 12 ? 8 1 2 3 4 6 8 10 13 ? 9 1 2 3 4 6 8 10 13 14 ? 10 1 2 3 4 6 8 10 13 14 15 ? 10 1 2 3 4 6 8 10 13 14 16 ? 10 1 2 ...
result:
ok correct
Test #8:
score: 0
Accepted
time: 7ms
memory: 3760kb
input:
38 -1 -1 -1 -1 4 1 1 5 -1 -1 2 7 -1 -1 -1 -1 -1 -1 11 1 12 8 13 1 6 14 -1 -1 16 6 2 17 3 18 -1 -1 15 20 8 21 15 22 19 23 24 1 2 25 26 19 15 27 28 8 29 3 -1 -1 31 19 15 32 33 9 30 34 8 35 -1 -1 37 6 38 2 4 19 36 5 6 7 -1 -1 -1 -1 13 8 3 14 16 19 30 17 -1 -1 6 20 -1 -1 -1 -1 6 23 24 6 -1 -1 -1 -1 30 2...
output:
? 2 1 2 ? 3 1 2 3 ? 4 1 2 3 4 ? 4 1 2 3 5 ? 4 1 2 3 6 ? 5 1 2 3 6 7 ? 5 1 2 3 6 8 ? 6 1 2 3 6 8 9 ? 7 1 2 3 6 8 9 10 ? 8 1 2 3 6 8 9 10 11 ? 8 1 2 3 6 8 9 10 12 ? 8 1 2 3 6 8 9 10 13 ? 8 1 2 3 6 8 9 10 14 ? 8 1 2 3 6 8 9 10 15 ? 9 1 2 3 6 8 9 10 15 16 ? 9 1 2 3 6 8 9 10 15 17 ? 9 1 2...
result:
ok correct
Test #9:
score: 0
Accepted
time: 4ms
memory: 3696kb
input:
25 -1 -1 -1 -1 -1 -1 5 4 6 4 7 3 2 8 9 4 10 3 2 11 12 4 -1 -1 14 13 -1 -1 16 3 4 17 18 4 13 19 20 13 13 21 4 22 -1 -1 24 15 25 3 5 2 6 13 7 13 13 8 2 9 10 15 -1 -1 -1 -1 14 3 16 13 -1 -1 18 2 -1 -1 20 23 -1 -1 22 3 -1 -1 2 25 5 13 -1 -1 -1 -1 8 23 -1 -1 -1 -1 14 4 -1 -1 18 13 20 3 13 22 4 25 -1 -1 4...
output:
? 2 1 2 ? 3 1 2 3 ? 4 1 2 3 4 ? 5 1 2 3 4 5 ? 5 1 2 3 4 6 ? 5 1 2 3 4 7 ? 5 1 2 3 4 8 ? 5 1 2 3 4 9 ? 5 1 2 3 4 10 ? 5 1 2 3 4 11 ? 5 1 2 3 4 12 ? 5 1 2 3 4 13 ? 6 1 2 3 4 13 14 ? 6 1 2 3 4 13 15 ? 7 1 2 3 4 13 15 16 ? 7 1 2 3 4 13 15 17 ? 7 1 2 3 4 13 15 18 ? 7 1 2 3 4 13 15 19 ? ...
result:
ok correct
Test #10:
score: 0
Accepted
time: 2ms
memory: 3628kb
input:
6 -1 -1 2 3 -1 -1 2 5 -1 -1 -1 -1 5 6 -1 -1 -1 -1
output:
? 2 1 2 ? 3 1 2 3 ? 3 1 2 4 ? 4 1 2 4 5 ? 4 1 2 4 6 ? 4 1 4 6 3 ? 4 1 4 6 5 ? 3 1 4 5 ? 2 3 5 ! 3 2 3 2 5 5 6
result:
ok correct
Test #11:
score: 0
Accepted
time: 2ms
memory: 3576kb
input:
3 2 1 3 1 2 3
output:
? 2 1 2 ? 2 1 3 ? 2 2 3 ! 3 1 2 1 3 2 3
result:
ok correct
Test #12:
score: 0
Accepted
time: 1ms
memory: 3588kb
input:
3 2 1 3 1 -1 -1
output:
? 2 1 2 ? 2 1 3 ? 2 2 3 ! 2 1 2 1 3
result:
ok correct
Test #13:
score: 0
Accepted
time: 1ms
memory: 3584kb
input:
5 2 1 3 1 -1 -1 5 1 -1 -1 -1 -1 -1 -1 2 3 2 5 -1 -1
output:
? 2 1 2 ? 2 1 3 ? 2 1 4 ? 3 1 4 5 ? 2 4 2 ? 2 4 3 ? 2 4 5 ? 2 2 3 ? 2 2 5 ? 2 3 5 ! 5 1 2 1 3 1 5 2 3 2 5
result:
ok correct
Test #14:
score: 0
Accepted
time: 2ms
memory: 3576kb
input:
3 2 1 -1 -1 -1 -1
output:
? 2 1 2 ? 2 1 3 ? 2 3 2 ! 1 1 2
result:
ok correct
Test #15:
score: 0
Accepted
time: 1ms
memory: 3652kb
input:
5 -1 -1 -1 -1 4 3 3 5 -1 -1 2 5 -1 -1 -1 -1
output:
? 2 1 2 ? 3 1 2 3 ? 4 1 2 3 4 ? 4 1 2 3 5 ? 3 1 2 4 ? 3 1 2 5 ? 2 1 5 ? 2 4 5 ! 3 2 5 3 4 3 5
result:
ok correct
Test #16:
score: 0
Accepted
time: 16ms
memory: 3828kb
input:
93 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 10 9 7 11 2 12 5 13 -1 -1 -1 -1 6 16 -1 -1 -1 -1 19 18 -1 -1 -1 -1 -1 -1 8 23 -1 -1 1 25 20 26 -1 -1 -1 -1 1 29 4 30 31 9 32 27 28 33 34 9 -1 -1 36 2 35 37 27 38 2 39 40 35 1 41 21 42 5 43 44 4 -1 -1 -1 -1 5 47 -1 -1 49 45 14 50 51 9 5 52 53 15 -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 ? 10 1 2 3 4 5 6 7 8 9 11 ? 10 1 2 3 4 5 6 7 8 9 12 ? 10 1 2 3 4 5 6 7 8 9 13 ? 10 1 2 3 4 5 6 7 8 9 14 ? 11 1 2 3 4 5 6 7 8 9 14 15 ? 12 1 ...
result:
ok correct
Test #17:
score: 0
Accepted
time: 21ms
memory: 3904kb
input:
111 -1 -1 -1 -1 -1 -1 -1 -1 2 6 7 4 3 8 -1 -1 -1 -1 2 11 12 4 13 10 -1 -1 -1 -1 -1 -1 17 10 18 5 16 19 -1 -1 4 21 -1 -1 -1 -1 -1 -1 -1 -1 26 10 -1 -1 2 28 16 29 25 30 27 31 -1 -1 -1 -1 10 34 -1 -1 27 36 37 4 38 15 39 1 -1 -1 27 41 42 4 25 43 44 27 27 45 2 46 47 16 48 35 49 15 -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 ? 6 1 2 3 4 5 7 ? 6 1 2 3 4 5 8 ? 6 1 2 3 4 5 9 ? 7 1 2 3 4 5 9 10 ? 8 1 2 3 4 5 9 10 11 ? 8 1 2 3 4 5 9 10 12 ? 8 1 2 3 4 5 9 10 13 ? 8 1 2 3 4 5 9 10 14 ? 9 1 2 3 4 5 9 10 14 15 ? 10 1 2 3 4 5 9 10 14 15 16 ? 11 1 2 3 4 5 9...
result:
ok correct
Test #18:
score: 0
Accepted
time: 8ms
memory: 3880kb
input:
132 -1 -1 3 1 -1 -1 5 1 -1 -1 7 2 -1 -1 -1 -1 10 8 -1 -1 12 8 9 13 2 14 -1 -1 -1 -1 17 15 -1 -1 19 6 -1 -1 21 20 22 8 -1 -1 24 9 -1 -1 -1 -1 -1 -1 28 15 -1 -1 4 30 6 31 4 32 -1 -1 -1 -1 26 35 36 9 -1 -1 38 29 6 39 29 40 -1 -1 42 15 43 9 26 44 45 20 -1 -1 47 29 4 48 49 1 -1 -1 51 50 -1 -1 53 9 54 1 5...
output:
? 2 1 2 ? 3 1 2 3 ? 3 1 2 4 ? 4 1 2 4 5 ? 4 1 2 4 6 ? 5 1 2 4 6 7 ? 5 1 2 4 6 8 ? 6 1 2 4 6 8 9 ? 7 1 2 4 6 8 9 10 ? 7 1 2 4 6 8 9 11 ? 8 1 2 4 6 8 9 11 12 ? 8 1 2 4 6 8 9 11 13 ? 8 1 2 4 6 8 9 11 14 ? 8 1 2 4 6 8 9 11 15 ? 9 1 2 4 6 8 9 11 15 16 ? 10 1 2 4 6 8 9 11 15 16 17 ? 10 1 2...
result:
ok correct
Test #19:
score: 0
Accepted
time: 9ms
memory: 3852kb
input:
94 -1 -1 3 2 -1 -1 -1 -1 -1 -1 2 7 -1 -1 2 9 -1 -1 11 6 -1 -1 6 13 14 10 -1 -1 15 16 17 8 -1 -1 19 12 6 20 15 21 5 22 -1 -1 24 5 -1 -1 -1 -1 27 25 2 28 -1 -1 -1 -1 31 23 25 32 33 12 25 34 35 26 -1 -1 2 37 38 26 39 12 -1 -1 41 12 15 42 43 40 44 12 18 45 -1 -1 47 5 -1 -1 25 49 50 12 51 26 52 5 53 40 5...
output:
? 2 1 2 ? 3 1 2 3 ? 3 1 2 4 ? 4 1 2 4 5 ? 5 1 2 4 5 6 ? 6 1 2 4 5 6 7 ? 6 1 2 4 5 6 8 ? 7 1 2 4 5 6 8 9 ? 7 1 2 4 5 6 8 10 ? 8 1 2 4 5 6 8 10 11 ? 8 1 2 4 5 6 8 10 12 ? 9 1 2 4 5 6 8 10 12 13 ? 9 1 2 4 5 6 8 10 12 14 ? 9 1 2 4 5 6 8 10 12 15 ? 10 1 2 4 5 6 8 10 12 15 16 ? 10 1 2 4 5 6...
result:
ok correct
Test #20:
score: 0
Accepted
time: 2ms
memory: 3728kb
input:
73 -1 -1 1 3 -1 -1 -1 -1 -1 -1 5 7 -1 -1 1 9 1 10 4 11 -1 -1 13 6 -1 -1 15 8 1 16 17 4 -1 -1 1 19 20 14 4 21 12 22 23 5 -1 -1 1 25 -1 -1 -1 -1 28 2 1 29 30 26 31 8 -1 -1 33 32 1 34 12 35 12 36 -1 -1 38 14 12 39 1 40 -1 -1 4 42 6 43 44 5 14 45 -1 -1 -1 -1 12 48 12 49 50 18 51 4 52 26 1 53 -1 -1 1 55 ...
output:
? 2 1 2 ? 3 1 2 3 ? 3 1 2 4 ? 4 1 2 4 5 ? 5 1 2 4 5 6 ? 6 1 2 4 5 6 7 ? 6 1 2 4 5 6 8 ? 7 1 2 4 5 6 8 9 ? 7 1 2 4 5 6 8 10 ? 7 1 2 4 5 6 8 11 ? 7 1 2 4 5 6 8 12 ? 8 1 2 4 5 6 8 12 13 ? 8 1 2 4 5 6 8 12 14 ? 9 1 2 4 5 6 8 12 14 15 ? 9 1 2 4 5 6 8 12 14 16 ? 9 1 2 4 5 6 8 12 14 17 ? 9 ...
result:
ok correct
Test #21:
score: 0
Accepted
time: 0ms
memory: 3772kb
input:
77 -1 -1 3 2 2 4 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 11 -1 -1 8 13 14 7 2 15 16 1 7 17 -1 -1 -1 -1 2 20 8 21 22 19 7 23 18 24 -1 -1 -1 -1 -1 -1 2 28 -1 -1 18 30 6 31 32 6 18 33 34 25 2 35 7 36 37 5 -1 -1 7 39 40 25 41 27 -1 -1 -1 -1 44 43 8 45 18 46 47 5 -1 -1 -1 -1 50 10 2 51 52 7 -1 -1 6 54 -1 -...
output:
? 2 1 2 ? 3 1 2 3 ? 3 1 2 4 ? 3 1 2 5 ? 4 1 2 5 6 ? 5 1 2 5 6 7 ? 6 1 2 5 6 7 8 ? 7 1 2 5 6 7 8 9 ? 8 1 2 5 6 7 8 9 10 ? 9 1 2 5 6 7 8 9 10 11 ? 9 1 2 5 6 7 8 9 10 12 ? 10 1 2 5 6 7 8 9 10 12 13 ? 10 1 2 5 6 7 8 9 10 12 14 ? 10 1 2 5 6 7 8 9 10 12 15 ? 10 1 2 5 6 7 8 9 10 12 16 ? 10 1...
result:
ok correct
Test #22:
score: 0
Accepted
time: 9ms
memory: 3744kb
input:
81 -1 -1 2 3 2 4 1 5 -1 -1 -1 -1 1 8 -1 -1 10 6 -1 -1 6 12 -1 -1 1 14 13 15 11 16 6 17 18 6 19 7 20 11 6 21 2 22 11 23 1 24 -1 -1 25 26 25 27 28 6 6 29 -1 -1 -1 -1 -1 -1 -1 -1 25 34 30 35 36 6 1 37 -1 -1 -1 -1 -1 -1 2 41 42 33 30 43 2 44 25 45 46 40 2 47 48 6 49 31 50 6 6 51 52 25 6 53 2 54 40 55 11...
output:
? 2 1 2 ? 3 1 2 3 ? 3 1 2 4 ? 3 1 2 5 ? 3 1 2 6 ? 4 1 2 6 7 ? 5 1 2 6 7 8 ? 5 1 2 6 7 9 ? 6 1 2 6 7 9 10 ? 6 1 2 6 7 9 11 ? 7 1 2 6 7 9 11 12 ? 7 1 2 6 7 9 11 13 ? 8 1 2 6 7 9 11 13 14 ? 8 1 2 6 7 9 11 13 15 ? 8 1 2 6 7 9 11 13 16 ? 8 1 2 6 7 9 11 13 17 ? 8 1 2 6 7 9 11 13 18 ? 8 1 ...
result:
ok correct
Test #23:
score: 0
Accepted
time: 4ms
memory: 3764kb
input:
93 -1 -1 -1 -1 4 1 -1 -1 -1 -1 2 7 1 8 9 1 -1 -1 -1 -1 -1 -1 -1 -1 1 14 -1 -1 13 16 17 1 6 18 -1 -1 2 20 11 21 2 22 3 23 24 15 25 3 26 6 27 10 28 10 29 5 5 30 -1 -1 -1 -1 -1 -1 -1 -1 10 35 36 32 1 37 2 38 3 39 40 34 41 19 42 6 43 12 2 44 45 3 3 46 -1 -1 -1 -1 13 49 -1 -1 51 3 -1 -1 53 10 2 54 -1 -1 ...
output:
? 2 1 2 ? 3 1 2 3 ? 4 1 2 3 4 ? 4 1 2 3 5 ? 5 1 2 3 5 6 ? 6 1 2 3 5 6 7 ? 6 1 2 3 5 6 8 ? 6 1 2 3 5 6 9 ? 6 1 2 3 5 6 10 ? 7 1 2 3 5 6 10 11 ? 8 1 2 3 5 6 10 11 12 ? 9 1 2 3 5 6 10 11 12 13 ? 10 1 2 3 5 6 10 11 12 13 14 ? 10 1 2 3 5 6 10 11 12 13 15 ? 11 1 2 3 5 6 10 11 12 13 15 16 ? ...
result:
ok correct
Test #24:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
37 -1 -1 3 1 -1 -1 2 5 -1 -1 2 7 4 8 2 9 1 10 2 11 12 1 6 13 6 14 1 15 4 16 1 17 1 18 -1 -1 6 20 6 21 -1 -1 19 23 2 24 2 25 2 26 6 27 6 28 4 29 30 1 1 31 32 1 -1 -1 22 34 35 1 36 19 19 37 3 19 -1 -1 7 1 1 8 9 1 33 10 33 11 -1 -1 22 13 14 19 15 19 33 16 33 17 6 18 33 20 19 21 22 23 22 24 22 25 19 26 ...
output:
? 2 1 2 ? 3 1 2 3 ? 3 1 2 4 ? 4 1 2 4 5 ? 4 1 2 4 6 ? 5 1 2 4 6 7 ? 5 1 2 4 6 8 ? 5 1 2 4 6 9 ? 5 1 2 4 6 10 ? 5 1 2 4 6 11 ? 5 1 2 4 6 12 ? 5 1 2 4 6 13 ? 5 1 2 4 6 14 ? 5 1 2 4 6 15 ? 5 1 2 4 6 16 ? 5 1 2 4 6 17 ? 5 1 2 4 6 18 ? 5 1 2 4 6 19 ? 6 1 2 4 6 19 20 ? 6 1 2 4 6 19 21 ...
result:
ok correct
Test #25:
score: 0
Accepted
time: 7ms
memory: 3828kb
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 9 15 -1 -1 -1 -1 14 18 -1 -1 -1 -1 -1 -1 5 22 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 35 33 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 43 5 -1 -1 32 45 -1 -1 -1 -1 -1 -1 -1 -1 3 50 -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 ...
result:
ok correct
Test #26:
score: 0
Accepted
time: 20ms
memory: 4772kb
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 26 22 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 46 31 37 47 39 48 -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 ...
result:
ok correct
Test #27:
score: 0
Accepted
time: 42ms
memory: 6552kb
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 -1 -1 -1 -1 39 40 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 46 14 -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 ...
result:
ok correct
Test #28:
score: 0
Accepted
time: 60ms
memory: 7544kb
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 17 27 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 18 45 -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 ...
result:
ok correct
Test #29:
score: 0
Accepted
time: 61ms
memory: 7004kb
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 13 14 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 6 22 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 43 24 -1 -1 -1 -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 ? 14 1 ...
result:
ok correct
Test #30:
score: 0
Accepted
time: 127ms
memory: 7368kb
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 ...
result:
ok correct