QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#137668 | #4218. Hidden Graph | XY_Eleven | RE | 69ms | 3960kb | C++23 | 3.8kb | 2023-08-10 16:16:44 | 2023-08-10 16:16:45 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define DB double
#define LL long long
#define ULL unsigned long long
#define pii pair<int,int>
#define pil pair<int,LL>
#define mii map<int,int>
#define miig map<int,int,greater<int> >
#define mil map<int,LL>
#define in128 __int128
#define cint const int
#define cLL const LL
#define cDB const DB
#define cchar const char
#define invoid inline void
#define inLL inline LL
#define inlint inline int
#define inbool inline bool
#define inl128 inline __int128
#define inDB inline double
#define For(z,e1,e2) for(int z=(e1);z<=(e2);z++)
#define Rof(z,e1,e2) for(int z=(e2);z>=(e1);z--)
#define For_(z,e1,e2) for(int z=(e1);z<(e2);z++)
#define Rof_(z,e1,e2) for(int z=(e2);z>(e1);z--)
#define inint(e) scanf("%d",&e)
#define inll(e) scanf("%lld",&e)
#define inpr(e1,e2) scanf("%d%d",&e1,&e2)
#define in3(e1,e2,e3) scanf("%d%d%d",&e1,&e2,&e3)
#define outint(e) printf("%d\n",e)
#define outint_(e) printf("%d%c",e," \n"[i==n])
#define outll(e) printf("%lld\n",e)
#define outll_(e) printf("%lld%c",e," \n"[i==n])
#define exc(e) if(e) continue
#define stop(e) if(e) break
#define ret(e) if(e) return
#define ll(e) ((LL)(e))
#define pb push_back
#define ft first
#define sc second
#define clean(e) while(!e.empty()) e.pop()
#define all(ev) ev.begin(),ev.end()
#define x0 x00
#define y1 y11
#define debug(x) cerr<<#x<<'='<<x<<'\n'
#define fout fflush(stdout)
invoid input(int &N_,int A_[],bool F_)
{
if(F_) inint(N_);
For(i,1,N_) inint(A_[i]);
}
template <typename Type>
inline Type md(Type w1,const Type w2)
{
w1%=w2; if(w1<0) w1+=w2;
return w1;
}
template <typename Type>
invoid add(Type &w1,const Type w2,const Type M_)
{ w1=md(w1+w2,M_); }
invoid mul(LL &w1,cLL w2,cLL M_)
{ w1=md(w1*w2,M_); }
inLL gcd(LL X_,LL Y_)
{
LL R_=X_%Y_;
while(R_)
{ X_=Y_; Y_=R_; R_=X_%Y_; }
return Y_;
}
invoid ex_gcd(LL &X_,LL &Y_,LL A_,LL B_)
{
if(!B_)
{
X_=1ll; Y_=0ll;
return ;
}
ex_gcd(Y_,X_,B_,A_%B_);
X_=md(X_,B_); Y_=(1ll-X_*A_)/B_;
}
inLL inv(LL A_,LL B_)
{
LL X_=0ll,Y_=0ll;
ex_gcd(X_,Y_,A_,B_);
return X_;
}
inLL pw(LL X_,LL Y_,LL M_)
{
LL S_=1ll;
while(Y_)
{
if(Y_&1) mul(S_,X_,M_);
Y_>>=1;
mul(X_,X_,M_);
}
return S_;
}
template <typename Type>
invoid get_min(Type &w1,const Type w2)
{ if(w2<w1) w1=w2; }
template <typename Type>
invoid get_max(Type &w1,const Type w2)
{ if(w2>w1) w1=w2; }
//inLL A(cint N_,cint M_)
//{ return (N_>=M_?md(d1[N_]*d2[N_-M_],mod):0ll); }
//inLL C(cint N_,cint M_)
//{ return (N_>=M_?md(d1[N_]*md(d2[M_]*d2[N_-M_],mod),mod):0ll); }
//mt19937 gen(time(NULL));
//mt19937_64 gen(time(NULL));
//cLL base[]={166686661,188868881},mod[]={1686688681,1666868881};
//cLL mod[]={1e9+7,1e9+9,1e9+21,1e9+33};
cint N=2100;
int n;
vector <pii> edge;
vector <vector <int> > v;
vector <int> t,c;
int cnt=0;
inbool work(int x)
{
if(t.empty()) return false;
cnt++;
printf("? %d ",(int)t.size()+1);
for(auto i:t)
printf("%d ",i);
outint(x);
fout;
int a,b;
inpr(a,b);
if(!~a) return false;
edge.pb({a,b});
if(a==x) swap(a,b);
t.erase(find(all(t),a));
return true;
}
int main()
{
srand(time(NULL));
inint(n);
For_(i,0,n)
{
c.pb(i+1);
swap(c[i],c[rand()%(i+1)]);
}
for(auto x:c)
{
bool f=false;
for(auto &S:v)
{
bool ok=true;
t=S;
while(work(x)) ok=false;
if(ok&&(!f))
{
f=true;
S.pb(x);
}
}
if(!f) v.pb({x});
}
printf("! %d\n",(int)edge.size());
for(auto [x,y]:edge)
printf("%d %d\n",x,y);
fout;
//debug(cnt);
return 0;
}
/*
*/
詳細信息
Test #1:
score: 100
Accepted
time: 2ms
memory: 3760kb
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: 3ms
memory: 3848kb
input:
10 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 3 10 3 8 3 9 1 3 -1 -1 -1 -1 3 7 2 5 1 2 2 6 -1 -1 -1 -1 1 4 4 10 4 8 4 5 -1 -1 -1 -1
output:
? 2 5 6 ? 3 5 6 9 ? 4 5 6 9 1 ? 5 5 6 9 1 8 ? 6 5 6 9 1 8 10 ? 7 5 6 9 1 8 10 3 ? 6 5 6 9 1 8 3 ? 5 5 6 9 1 3 ? 4 5 6 1 3 ? 3 5 6 3 ? 7 5 6 9 1 8 10 7 ? 2 3 7 ? 8 5 6 9 1 8 10 7 2 ? 7 6 9 1 8 10 7 2 ? 6 6 9 8 10 7 2 ? 5 9 8 10 7 2 ? 2 3 2 ? 8 5 6 9 1 8 10 7 4 ? 7 5 6 9 8 10 7 4 ? 6 5 6 9 8 7 4 ? 5 5...
result:
ok correct
Test #3:
score: 0
Accepted
time: 0ms
memory: 3764kb
input:
5 -1 -1 5 2 4 2 4 1 5 1 2 1 -1 -1 3 2 3 1
output:
? 2 5 4 ? 3 5 4 2 ? 2 4 2 ? 3 5 4 1 ? 2 5 1 ? 2 2 1 ? 3 5 4 3 ? 2 2 3 ? 2 1 3 ! 7 5 2 4 2 4 1 5 1 2 1 3 2 3 1
result:
ok correct
Test #4:
score: 0
Accepted
time: 1ms
memory: 3776kb
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: 3768kb
input:
6 -1 -1 2 5 -1 -1 -1 -1 1 2 3 5 3 1 3 6 3 2 4 5 -1 -1 4 2 3 4
output:
? 2 5 6 ? 3 5 6 2 ? 2 6 2 ? 3 5 6 1 ? 2 2 1 ? 4 5 6 1 3 ? 3 6 1 3 ? 2 6 3 ? 2 2 3 ? 4 5 6 1 4 ? 3 6 1 4 ? 2 2 4 ? 2 3 4 ! 9 2 5 1 2 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: 3836kb
input:
27 6 11 -1 -1 -1 -1 1 11 -1 -1 6 1 12 11 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 3 1 3 17 -1 -1 -1 -1 -1 -1 -1 -1 6 16 17 16 -1 -1 -1 -1 4 11 -1 -1 -1 -1 -1 -1 -1 -1 17 26 -1 -1 -1 -1 26 13 -1 -1 6 13 -1 -1 -1 -1 22 20 22 16 22 26 22 11 -1 -1 -1 -1 22 13 1 22 10 16 -1 -1 -1 -1 10 13 -1 -1 -1...
output:
? 2 11 6 ? 2 11 23 ? 2 6 23 ? 3 11 23 1 ? 2 23 1 ? 2 6 1 ? 3 11 23 12 ? 2 23 12 ? 2 6 12 ? 2 1 12 ? 3 11 23 20 ? 3 6 12 20 ? 2 1 20 ? 4 11 23 20 3 ? 3 6 12 3 ? 2 1 3 ? 5 11 23 20 3 17 ? 4 11 23 20 17 ? 3 6 12 17 ? 2 1 17 ? 5 11 23 20 3 16 ? 4 6 12 17 16 ? 3 12 17 16 ? 2 12 16 ? 2 1 16 ? 6 11 23 20 3...
result:
ok correct
Test #7:
score: 0
Accepted
time: 3ms
memory: 3772kb
input:
47 -1 -1 -1 -1 -1 -1 -1 -1 44 1 -1 -1 23 3 12 3 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 23 4 -1 -1 -1 -1 -1 -1 26 3 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 10 29 23 10 -1 -1 -1 -1 46 6 -1 -1 46 3 -1 -1 23 37 41 37 6 37 31 37 -1 -1 -1 -1 -1 -1 31 24 26 24 23 24 -1 -1 -1 -1 -1 -1 26 39 -1 -1 3 39 -1 -1 -1 -1 23 18 ...
output:
? 2 31 6 ? 3 31 6 23 ? 4 31 6 23 1 ? 5 31 6 23 1 12 ? 6 31 6 23 1 12 44 ? 5 31 6 23 12 44 ? 6 31 6 23 1 12 3 ? 5 31 6 1 12 3 ? 4 31 6 1 3 ? 2 44 3 ? 6 31 6 23 1 12 29 ? 3 44 3 29 ? 7 31 6 23 1 12 29 38 ? 3 44 3 38 ? 8 31 6 23 1 12 29 38 4 ? 7 31 6 1 12 29 38 4 ? 3 44 3 4 ? 8 31 6 23 1 12 29 38 26 ? ...
result:
ok correct
Test #8:
score: 0
Accepted
time: 10ms
memory: 3768kb
input:
38 31 6 -1 -1 6 23 31 1 1 23 -1 -1 31 12 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 29 3 31 29 -1 -1 -1 -1 38 31 -1 -1 38 12 -1 -1 4 31 -1 -1 4 6 4 1 -1 -1 38 4 31 26 -1 -1 -1 -1 -1 -1 -1 -1 31 13 -1 -1 13 1 13 12 -1 -1 38 13 4 13 -1 -1 29 22 12 22 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 4 10 -1 -1 28 22...
output:
? 2 31 6 ? 2 31 23 ? 2 6 23 ? 3 31 23 1 ? 2 23 1 ? 2 6 1 ? 3 31 23 12 ? 2 23 12 ? 3 6 1 12 ? 3 31 23 36 ? 4 6 1 12 36 ? 4 31 23 36 3 ? 4 6 1 12 3 ? 5 31 23 36 3 29 ? 4 31 23 36 29 ? 3 23 36 29 ? 4 6 1 12 29 ? 5 31 23 36 3 38 ? 4 23 36 3 38 ? 5 6 1 12 29 38 ? 4 6 1 29 38 ? 5 31 23 36 3 4 ? 4 23 36 3 ...
result:
ok correct
Test #9:
score: 0
Accepted
time: 6ms
memory: 3764kb
input:
25 -1 -1 -1 -1 -1 -1 6 12 -1 -1 20 6 20 23 -1 -1 -1 -1 -1 -1 20 3 -1 -1 -1 -1 -1 -1 16 3 -1 -1 16 20 16 12 6 4 4 17 -1 -1 12 4 -1 -1 -1 -1 -1 -1 -1 -1 5 4 -1 -1 6 13 5 13 -1 -1 20 13 -1 -1 16 13 -1 -1 6 22 22 3 -1 -1 20 22 -1 -1 4 22 -1 -1 13 22 10 3 10 11 10 17 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 8 23 5 ...
output:
? 2 11 6 ? 3 11 6 23 ? 4 11 6 23 1 ? 5 11 6 23 1 12 ? 4 11 23 1 12 ? 5 11 6 23 1 20 ? 4 11 23 1 20 ? 3 11 1 20 ? 2 12 20 ? 5 11 6 23 1 3 ? 3 12 20 3 ? 2 12 3 ? 6 11 6 23 1 3 17 ? 3 12 20 17 ? 7 11 6 23 1 3 17 16 ? 6 11 6 23 1 17 16 ? 3 12 20 16 ? 2 12 16 ? 7 11 6 23 1 3 17 4 ? 6 11 23 1 3 17 4 ? 5 1...
result:
ok correct
Test #10:
score: 0
Accepted
time: 2ms
memory: 3884kb
input:
6 5 6 2 5 -1 -1 -1 -1 -1 -1 -1 -1 2 3 -1 -1 -1 -1 -1 -1
output:
? 2 5 6 ? 2 5 2 ? 2 6 2 ? 2 5 1 ? 3 6 2 1 ? 3 5 1 3 ? 3 6 2 3 ? 2 6 3 ? 4 5 1 3 4 ? 3 6 2 4 ! 3 5 6 2 5 2 3
result:
ok correct
Test #11:
score: 0
Accepted
time: 1ms
memory: 3712kb
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: 3816kb
input:
3 3 1 -1 -1 2 1
output:
? 2 3 1 ? 2 3 2 ? 2 1 2 ! 2 3 1 2 1
result:
ok correct
Test #13:
score: 0
Accepted
time: 1ms
memory: 3828kb
input:
5 -1 -1 2 5 -1 -1 5 1 -1 -1 2 1 -1 -1 2 3 3 1
output:
? 2 5 4 ? 3 5 4 2 ? 2 4 2 ? 3 5 4 1 ? 2 4 1 ? 2 2 1 ? 3 5 4 3 ? 2 2 3 ? 2 1 3 ! 5 2 5 5 1 2 1 2 3 3 1
result:
ok correct
Test #14:
score: 0
Accepted
time: 1ms
memory: 3772kb
input:
3 -1 -1 2 1 -1 -1
output:
? 2 3 1 ? 3 3 1 2 ? 2 3 2 ! 1 2 1
result:
ok correct
Test #15:
score: 0
Accepted
time: 2ms
memory: 3844kb
input:
5 -1 -1 2 5 -1 -1 -1 -1 -1 -1 3 5 4 3 -1 -1 -1 -1
output:
? 2 5 4 ? 3 5 4 2 ? 2 4 2 ? 3 5 4 1 ? 2 2 1 ? 4 5 4 1 3 ? 3 4 1 3 ? 2 1 3 ? 2 2 3 ! 3 2 5 3 5 4 3
result:
ok correct
Test #16:
score: 0
Accepted
time: 6ms
memory: 3840kb
input:
93 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 56 44 -1 -1 13 48 -1 -1 56 13 -1 -1 -1 -1 13 60 10 93 10 86 -1 -1 -1 -1 -1 -1 91 46 -1 -1 -1 -1 -1 -1 37 86 -1 -1 -1 -1 -1 -1 84 29 -1 -1 37 84 -1 -1 -1 -1 64 93 64 31 -1 -1 56 64 64 37 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 34 50 -1 -1 -1 -1 -1 -1 91 ...
output:
? 2 31 6 ? 3 31 6 91 ? 4 31 6 91 48 ? 5 31 6 91 48 12 ? 6 31 6 91 48 12 44 ? 7 31 6 91 48 12 44 86 ? 8 31 6 91 48 12 44 86 29 ? 9 31 6 91 48 12 44 86 29 93 ? 10 31 6 91 48 12 44 86 29 93 50 ? 11 31 6 91 48 12 44 86 29 93 50 56 ? 10 31 6 91 48 12 86 29 93 50 56 ? 11 31 6 91 48 12 44 86 29 93 50 13 ? ...
result:
ok correct
Test #17:
score: 0
Accepted
time: 13ms
memory: 3796kb
input:
111 -1 -1 -1 -1 -1 -1 6 12 12 91 -1 -1 44 6 -1 -1 44 12 -1 -1 -1 -1 -1 -1 -1 -1 12 101 -1 -1 -1 -1 -1 -1 -1 -1 6 50 -1 -1 -1 -1 -1 -1 -1 -1 50 56 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 86 60 -1 -1 50 60 -1 -1 -1 -1 13 10 -1 -1 -1 -1 -1 -1 6 46 46 101 -1 -1 50 46 12 46 -1 -1 -1 -1 37 93 6 37 -1 -1 37 50 37 12...
output:
? 2 31 6 ? 3 31 6 91 ? 4 31 6 91 48 ? 5 31 6 91 48 12 ? 4 31 91 48 12 ? 3 31 48 12 ? 5 31 6 91 48 44 ? 4 31 91 48 44 ? 2 12 44 ? 5 31 6 91 48 86 ? 2 12 86 ? 2 44 86 ? 6 31 6 91 48 86 101 ? 2 12 101 ? 2 44 101 ? 7 31 6 91 48 86 101 93 ? 2 12 93 ? 2 44 93 ? 8 31 6 91 48 86 101 93 50 ? 7 31 91 48 86 10...
result:
ok correct
Test #18:
score: 0
Accepted
time: 6ms
memory: 3784kb
input:
132 31 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 31 50 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 48 10 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 91 107 -1 -1 -1 -1 118 64 64 46 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 126 34 -1 -1 13 112 -1 -1 -1 -1 -1 -1 -1 -1 116...
output:
? 2 31 126 ? 2 31 91 ? 2 126 91 ? 3 31 91 48 ? 2 126 48 ? 4 31 91 48 12 ? 2 126 12 ? 5 31 91 48 12 44 ? 2 126 44 ? 6 31 91 48 12 44 86 ? 2 126 86 ? 7 31 91 48 12 44 86 101 ? 2 126 101 ? 8 31 91 48 12 44 86 101 118 ? 2 126 118 ? 9 31 91 48 12 44 86 101 118 50 ? 8 91 48 12 44 86 101 118 50 ? 2 126 50 ...
result:
ok correct
Test #19:
score: 0
Accepted
time: 5ms
memory: 3892kb
input:
94 -1 -1 -1 -1 49 75 -1 -1 -1 -1 -1 -1 -1 -1 31 49 67 75 -1 -1 -1 -1 75 30 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 38 26 -1 -1 -1 -1 17 64 -1 -1 17 49 -1 -1 92 41 31 41 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 72 75 -1 -1 72 41 67 72 -1 -1 17 72 58 1 58 75 58 92 -1 -1 58 49 -1 -1 -1 -1 -1 -1 -1 -1 44 26 49 4...
output:
? 2 92 62 ? 3 92 62 75 ? 4 92 62 75 49 ? 3 92 62 49 ? 4 92 62 75 38 ? 2 49 38 ? 5 92 62 75 38 31 ? 2 49 31 ? 6 92 62 75 38 31 67 ? 5 92 62 38 31 67 ? 2 49 67 ? 6 92 62 75 38 31 30 ? 5 92 62 38 31 30 ? 3 49 67 30 ? 6 92 62 75 38 31 7 ? 4 49 67 30 7 ? 7 92 62 75 38 31 7 64 ? 4 49 67 30 64 ? 8 92 62 75...
result:
ok correct
Test #20:
score: 0
Accepted
time: 6ms
memory: 3856kb
input:
73 -1 -1 46 43 -1 -1 49 43 -1 -1 -1 -1 -1 -1 49 38 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 30 38 -1 -1 -1 -1 62 7 -1 -1 30 7 -1 -1 -1 -1 30 64 -1 -1 -1 -1 -1 -1 30 26 -1 -1 26 7 17 64 -1 -1 17 30 -1 -1 -1 -1 38 41 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 72 26 1 72 -1 -1 -1 -1 17 72 -1 -1 1 58 -1 -1 -1 -1 -1 -1 44...
output:
? 2 43 62 ? 3 43 62 46 ? 2 62 46 ? 3 43 62 49 ? 2 62 49 ? 2 46 49 ? 3 43 62 38 ? 3 46 49 38 ? 2 46 38 ? 4 43 62 38 31 ? 3 46 49 31 ? 5 43 62 38 31 67 ? 3 46 49 67 ? 6 43 62 38 31 67 30 ? 5 43 62 31 67 30 ? 3 46 49 30 ? 6 43 62 38 31 67 7 ? 5 43 38 31 67 7 ? 4 46 49 30 7 ? 3 46 49 7 ? 6 43 62 38 31 6...
result:
ok correct
Test #21:
score: 0
Accepted
time: 6ms
memory: 3776kb
input:
77 -1 -1 75 62 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 7 17 -1 -1 -1 -1 -1 -1 75 41 -1 -1 -1 -1 -1 -1 30 72 -1 -1 -1 -1 58 41 -1 -1 -1 -1 44 43 -1 -1 44 17 -1 -1 30 45 -1 -1 -1 -1 -1 -1 68 38 68 62 68 26 68 43 -1 -1 75 68 -1 -1 -1 -1 73 4...
output:
? 2 43 62 ? 3 43 62 75 ? 2 43 75 ? 3 43 62 49 ? 2 75 49 ? 4 43 62 49 38 ? 2 75 38 ? 5 43 62 49 38 31 ? 2 75 31 ? 6 43 62 49 38 31 67 ? 2 75 67 ? 7 43 62 49 38 31 67 30 ? 2 75 30 ? 8 43 62 49 38 31 67 30 7 ? 2 75 7 ? 9 43 62 49 38 31 67 30 7 64 ? 2 75 64 ? 10 43 62 49 38 31 67 30 7 64 26 ? 2 75 26 ? ...
result:
ok correct
Test #22:
score: 0
Accepted
time: 2ms
memory: 3796kb
input:
81 -1 -1 75 43 -1 -1 -1 -1 49 75 -1 -1 -1 -1 49 31 -1 -1 -1 -1 67 62 -1 -1 67 75 -1 -1 30 43 -1 -1 30 75 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 64 43 -1 -1 -1 -1 -1 -1 -1 -1 75 26 -1 -1 -1 -1 62 17 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 64 1 -1 -1 -1 -1 72 43 49 72 -1 -1 72 75 -1 -1 30 72 67 72 58 41 -1 -...
output:
? 2 43 62 ? 3 43 62 75 ? 2 62 75 ? 3 43 62 49 ? 2 75 49 ? 4 43 62 49 38 ? 2 75 38 ? 5 43 62 49 38 31 ? 4 43 62 38 31 ? 2 75 31 ? 5 43 62 49 38 67 ? 4 43 49 38 67 ? 3 75 31 67 ? 2 31 67 ? 5 43 62 49 38 30 ? 4 62 49 38 30 ? 3 75 31 30 ? 2 31 30 ? 2 67 30 ? 5 43 62 49 38 7 ? 3 75 31 7 ? 3 67 30 7 ? 6 4...
result:
ok correct
Test #23:
score: 0
Accepted
time: 4ms
memory: 3844kb
input:
93 -1 -1 -1 -1 -1 -1 38 92 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 7 49 -1 -1 -1 -1 -1 -1 -1 -1 26 92 -1 -1 26 7 -1 -1 -1 -1 38 17 -1 -1 -1 -1 41 75 -1 -1 41 7 38 41 -1 -1 17 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 44 49 -1 -1 38 44 -1 -1 -1 -1 45 58 45 17 -1 -1 45 38 -1 -1 45 44 -...
output:
? 2 92 62 ? 3 92 62 75 ? 4 92 62 75 49 ? 5 92 62 75 49 38 ? 4 62 75 49 38 ? 5 92 62 75 49 31 ? 2 38 31 ? 6 92 62 75 49 31 67 ? 2 38 67 ? 7 92 62 75 49 31 67 30 ? 2 38 30 ? 8 92 62 75 49 31 67 30 7 ? 7 92 62 75 31 67 30 7 ? 2 38 7 ? 8 92 62 75 49 31 67 30 64 ? 3 38 7 64 ? 9 92 62 75 49 31 67 30 64 26...
result:
ok correct
Test #24:
score: 0
Accepted
time: 10ms
memory: 3780kb
input:
37 12 18 -1 -1 -1 -1 32 19 19 18 -1 -1 32 8 -1 -1 12 8 -1 -1 31 18 32 31 -1 -1 31 8 24 18 24 32 12 24 -1 -1 -1 -1 30 18 -1 -1 -1 -1 30 8 30 24 7 32 7 18 12 7 7 19 -1 -1 7 8 -1 -1 9 18 9 32 -1 -1 9 8 -1 -1 -1 -1 18 26 -1 -1 9 26 19 26 12 26 30 26 31 26 26 8 -1 -1 7 26 17 18 -1 -1 30 17 -1 -1 17 8 -1 ...
output:
? 2 18 12 ? 2 18 32 ? 2 12 32 ? 3 18 32 19 ? 2 18 19 ? 2 12 19 ? 3 18 32 8 ? 2 18 8 ? 3 12 19 8 ? 2 19 8 ? 3 18 32 31 ? 2 32 31 ? 3 12 19 31 ? 2 8 31 ? 3 18 32 24 ? 2 32 24 ? 4 12 19 31 24 ? 3 19 31 24 ? 2 8 24 ? 3 18 32 30 ? 2 32 30 ? 4 12 19 31 30 ? 3 8 24 30 ? 2 24 30 ? 3 18 32 7 ? 2 18 7 ? 5 12 ...
result:
ok correct
Test #25:
score: 0
Accepted
time: 4ms
memory: 3772kb
input:
144 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 14 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 19 104 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 86 19 -1 -1 -1 -1 144 135 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 118 87 -1 -1 -1 ...
output:
? 2 19 106 ? 3 19 106 125 ? 4 19 106 125 120 ? 5 19 106 125 120 49 ? 6 19 106 125 120 49 129 ? 7 19 106 125 120 49 129 144 ? 8 19 106 125 120 49 129 144 132 ? 9 19 106 125 120 49 129 144 132 131 ? 10 19 106 125 120 49 129 144 132 131 12 ? 11 19 106 125 120 49 129 144 132 131 12 14 ? 10 19 106 125 12...
result:
ok correct
Test #26:
score: 0
Accepted
time: 23ms
memory: 3960kb
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 71 345 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 195 439 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -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 19 509 ? 3 19 509 176 ? 4 19 509 176 317 ? 5 19 509 176 317 255 ? 6 19 509 176 317 255 156 ? 7 19 509 176 317 255 156 144 ? 8 19 509 176 317 255 156 144 503 ? 9 19 509 176 317 255 156 144 503 294 ? 10 19 509 176 317 255 156 144 503 294 150 ? 11 19 509 176 317 255 156 144 503 294 150 14 ? 12 19 5...
result:
ok correct
Test #27:
score: 0
Accepted
time: 24ms
memory: 3844kb
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 483 14 -1 -1 -1 -1 -1 -1 -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 19 633 ? 3 19 633 176 ? 4 19 633 176 317 ? 5 19 633 176 317 255 ? 6 19 633 176 317 255 156 ? 7 19 633 176 317 255 156 144 ? 8 19 633 176 317 255 156 144 654 ? 9 19 633 176 317 255 156 144 654 629 ? 10 19 633 176 317 255 156 144 654 629 604 ? 11 19 633 176 317 255 156 144 654 629 604 14 ? 12 19 6...
result:
ok correct
Test #28:
score: 0
Accepted
time: 69ms
memory: 3920kb
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 -1 -1 -1 -1 -1 -1 880 328 -1 -1 -1 -1 -1 -1 789 858 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ...
output:
? 2 450 728 ? 3 450 728 824 ? 4 450 728 824 618 ? 5 450 728 824 618 943 ? 6 450 728 824 618 943 691 ? 7 450 728 824 618 943 691 554 ? 8 450 728 824 618 943 691 554 432 ? 9 450 728 824 618 943 691 554 432 574 ? 10 450 728 824 618 943 691 554 432 574 833 ? 11 450 728 824 618 943 691 554 432 574 833 26...
result:
ok correct
Test #29:
score: 0
Accepted
time: 43ms
memory: 3876kb
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 -1 -1 -1 -1 -1 -1 -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 450 728 ? 3 450 728 824 ? 4 450 728 824 618 ? 5 450 728 824 618 943 ? 6 450 728 824 618 943 691 ? 7 450 728 824 618 943 691 554 ? 8 450 728 824 618 943 691 554 432 ? 9 450 728 824 618 943 691 554 432 574 ? 10 450 728 824 618 943 691 554 432 574 833 ? 11 450 728 824 618 943 691 554 432 574 833 26...
result:
ok correct
Test #30:
score: -100
Runtime Error
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 204 22 ? 3 204 22 300 ? 4 204 22 300 1043 ? 5 204 22 300 1043 1692 ? 6 204 22 300 1043 1692 1476 ? 7 204 22 300 1043 1692 1476 744 ? 8 204 22 300 1043 1692 1476 744 1015 ? 9 204 22 300 1043 1692 1476 744 1015 1542 ? 10 204 22 300 1043 1692 1476 744 1015 1542 1010 ? 11 204 22 300 1043 1692 1476 7...