QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#117201 | #6668. Trokuti | Irisu | 0 | 27ms | 7996kb | C++17 | 6.2kb | 2023-06-30 16:45:22 | 2023-06-30 16:45:25 |
Judging History
answer
#pragma GCC optimize("Ofast,unroll-loops")
#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=(a),i##end=(b);i<=i##end;++i)
#define per(i,a,b) for(int i=(a),i##end=(b);i>=i##end;--i)
//mt19937 Rnd(19260817);
mt19937 Rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
template<typename T>void chkmax(T&x,const T&y){if(x<y)x=y;}
template<typename T>void chkmin(T&x,const T&y){if(y<x)x=y;}
#define pb push_back
#define ALL(x) (x).begin(),(x).end()
#define mem(x) memset((x),0,sizeof(x))
typedef double db;
typedef long long ll;
typedef vector<int>vi;
typedef pair<int,int>pii;
typedef unsigned u32;
typedef unsigned uint;
typedef unsigned long long u64;
const int n=100;
#ifdef Arraiter
const bool Irisu=1;
#else
const bool Irisu=0;
#endif
bool mp[105][105];int sf[105],fs[105];int use_q=0;
bool ans[105][105];
struct Querys{
int a,b,c,v;
};
vector<Querys>Q;
int ask(int a,int b,int c){
int v;
a=sf[a],b=sf[b],c=sf[c];
if(Irisu){
use_q++;
v=mp[a][b]+mp[b][c]+mp[a][c];
Q.pb({fs[a],fs[b],fs[c],v});
return v;
}
printf("? %d %d %d\n",a,b,c);
fflush(stdout);
scanf("%d",&v);
Q.pb({fs[a],fs[b],fs[c],v});
return v;
}
void answer(){
if(Irisu){
bool asf=1;
rep(i,1,n)rep(j,1,n)asf&=ans[fs[i]][fs[j]]==mp[i][j];
if(asf){
puts("AC");
printf("count : %d\n",use_q);
}else{
puts("WA");
}
return;
}
puts("!");
rep(i,1,n){
rep(j,1,n)putchar(ans[fs[i]][fs[j]]|48);
puts("");
}
}
const int maxn=5000;
const int m=4950;
int tid[105][105];pii dit[maxn];
struct bit{
u64 seq[78];
void reset(){
mem(seq);
}
void set(int pos){
seq[pos>>6]|=1ull<<(pos&63);
}
void flip(int pos){
seq[pos>>6]^=1ull<<(pos&63);
}
bool operator[](int pos)const{
return seq[pos>>6]>>(pos&63)&1;
}
void operator^=(const bit&o){
rep(i,0,77)seq[i]^=o.seq[i];
}
void doit_pre(const bit&o,int pos){
rep(i,0,pos>>6)seq[i]^=o.seq[i];
}
void doit_suf(const bit&o,int pos){
rep(i,pos>>6,77)seq[i]^=o.seq[i];
}
};
//typedef bitset<maxn>bit;
int rk;
bit B[maxn];bool bb[maxn];
bool ins(bit&x){
per(i,m,1)if(x[i]){
if(bb[i]){
// x^=B[i];
x.doit_pre(B[i],i);
continue;
}
rk++;
bb[i]=1;
B[i]=x;
return 1;
}
return 0;
}
void solve(){
rep(i,1,n)sf[i]=i;
shuffle(sf+1,sf+n+1,Rnd);
rep(i,1,n)fs[sf[i]]=i;
if(Irisu){
rep(i,1,n)rep(j,i+1,n)mp[i][j]=mp[j][i]=i==1;
// rep(i,1,n)rep(j,i+1,n)mp[i][j]=mp[j][i]=Rnd()%100<0;
}
{
int c=0;
rep(i,1,n)rep(j,1,i-1)tid[i][j]=tid[j][i]=++c,dit[c]={i,j};
}
static int buk[maxn];
memset(buk,-1,sizeof buk);
bit w;
auto upd=[&](int i,int v){
if(buk[i]==-1){
buk[i]=v;
w.reset(),w.set(i),ins(w);
}
};
int eq=-1;
rep(s,3,n){
vector<pii>lef;
rep(a,1,s-1)rep(b,a+1,s-1){
lef.pb({a,b});
}
shuffle(ALL(lef),Rnd);
for(auto[a,b]:lef){
w.reset();
w.set(tid[a][b]),w.set(tid[a][s]),w.set(tid[b][s]);
if(!ins(w))continue;
int v=ask(a,b,s);
if(eq==-1)eq=v;
else if(eq!=v)eq=-2;
if(v==0||v==3){
upd(tid[a][b],v>0);
upd(tid[a][s],v>0);
upd(tid[s][b],v>0);
}else{
}
if(rk==s*(s-1)/2){
// printf("#%d\n",s);
break;
}
}
if(s==n||s>10||((s>10)&&(eq==-2||eq==1||eq==2))){
static bit a[20000];
int tot=0;
int L=s*(s-1)/2;
for(auto[x,y,z,v]:Q){
int i=tid[x][y],j=tid[x][z],k=tid[y][z];
if(v>0&&v<3){
if(v==1){
if(buk[i]==1||buk[j]==1||buk[k]==1){
if(buk[i]==-1)buk[i]=0;
if(buk[j]==-1)buk[j]=0;
if(buk[k]==-1)buk[k]=0;
}
}
if(v==2){
if(buk[i]==0||buk[j]==0||buk[k]==0){
if(buk[i]==-1)buk[i]=1;
if(buk[j]==-1)buk[j]=1;
if(buk[k]==-1)buk[k]=1;
}
}
if(buk[i]!=-1&&buk[j]!=-1&&buk[k]!=-1)continue;
tot++;
a[tot].set(i);
a[tot].set(j);
a[tot].set(k);
if(v&1)a[tot].set(L+1);
}
}
rep(i,1,L)if(buk[i]!=-1){
tot++;
a[tot].set(i);
if(buk[i])a[tot].set(L+1);
}
rep(i,1,L){
if(!a[i][i]){
rep(j,i+1,tot)if(a[j][i]){
swap(a[i],a[j]);break;
}
}
rep(j,i+1,tot)if(a[j][i]){
a[j].doit_suf(a[i],i);
// a[j]^=a[i];
}
}
per(i,L,1){
assert(a[i][i]);
buk[i]=a[i][L+1];
if(a[i][L+1]){
rep(j,1,i-1)if(a[j][i]){
a[j].flip(L+1);
}
}
}
// printf("!%d, %d\n",rk,use_q);
rep(t,s+1,n){
vector<pii>o;
int lst=-1;
rep(i,1,t-1){
if(lst==-1){
lst=i;continue;
}
int v=ask(lst,i,t);
if(v==0||v==3){
buk[tid[lst][i]]=buk[tid[i][t]]=buk[tid[lst][t]]=v>0;
lst=-1;
}else if(v%2==buk[tid[lst][i]]){
buk[tid[i][t]]=buk[tid[lst][t]]=!(v%2);
lst=-1;
}else{
o.pb({lst,i});
lst=i;
}
}
reverse(ALL(o));
for(auto[a,b]:o)if(buk[tid[b][t]]!=-1)buk[tid[a][t]]=!buk[tid[b][t]];
if(lst!=-1){
rep(i,1,t-1)if(i!=lst){
bool can=1;
for(auto[a,b]:o){
if(lst==a)can&=i!=b;
if(lst==b)can&=i!=a;
}
if(!can)continue;
assert(buk[tid[i][t]]!=-1);
int v=ask(lst,i,t);
buk[tid[lst][t]]=v-buk[tid[lst][i]]-buk[tid[i][t]];
lst=-1;
break;
}
assert(lst==-1);
}
for(auto[a,b]:o)assert(buk[tid[b][t]]!=-1),buk[tid[a][t]]=!buk[tid[b][t]];
}
break;
}
}
rep(i,1,n)rep(j,i+1,n)ans[i][j]=ans[j][i]=buk[tid[i][j]];
answer();
}
signed main(){
// int T;cin>>T;while(T--)solve();
solve();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Dangerous Syscalls
Test #1:
score: 100
Accepted
time: 24ms
memory: 5916kb
input:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
output:
? 71 93 79 ? 71 79 17 ? 71 93 17 ? 79 17 95 ? 93 79 95 ? 71 79 95 ? 71 93 3 ? 71 79 3 ? 17 95 3 ? 93 17 57 ? 93 95 57 ? 79 3 57 ? 71 95 57 ? 71 3 59 ? 71 79 59 ? 95 3 59 ? 71 57 59 ? 79 17 59 ? 93 17 59 ? 3 59 49 ? 93 79 49 ? 93 17 49 ? 57 59 49 ? 71 95 49 ? 79 57 67 ? 3 59 67 ? 71 95 67 ? 93 49 67 ...
result:
points 1.0 points 1.0 correct 2507 queries
Test #2:
score: 100
Accepted
time: 4ms
memory: 5868kb
input:
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 ...
output:
? 60 92 85 ? 92 85 43 ? 60 92 43 ? 92 43 55 ? 60 85 55 ? 92 43 9 ? 60 92 9 ? 60 85 9 ? 92 55 9 ? 92 55 78 ? 60 43 78 ? 85 55 78 ? 85 9 78 ? 43 55 100 ? 60 78 100 ? 43 9 100 ? 85 55 100 ? 92 78 100 ? 85 78 41 ? 60 55 41 ? 92 55 41 ? 9 100 41 ? 43 78 41 ? 43 9 94 ? 92 9 94 ? 92 78 94 ? 60 78 94 ? 78 1...
result:
points 1.0 points 1.0 correct 2508 queries
Test #3:
score: 100
Accepted
time: 1ms
memory: 5936kb
input:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
output:
? 53 56 49 ? 53 56 76 ? 53 49 76 ? 56 76 36 ? 53 56 36 ? 53 49 36 ? 76 36 78 ? 53 76 78 ? 53 49 78 ? 56 49 78 ? 53 76 30 ? 76 78 30 ? 76 36 30 ? 56 76 30 ? 49 76 30 ? 76 30 27 ? 53 49 27 ? 36 78 27 ? 56 30 27 ? 49 78 12 ? 36 78 12 ? 56 49 12 ? 49 76 12 ? 53 36 12 ? 56 27 12 ? 36 30 12 ? 56 30 20 ? 5...
result:
points 1.0 points 1.0 correct 2512 queries
Test #4:
score: 100
Accepted
time: 27ms
memory: 5936kb
input:
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 ...
output:
? 27 90 10 ? 27 10 28 ? 90 10 28 ? 27 90 32 ? 27 28 32 ? 10 28 32 ? 90 32 1 ? 28 32 1 ? 27 28 1 ? 10 28 1 ? 10 32 60 ? 27 1 60 ? 90 10 60 ? 28 1 60 ? 27 60 79 ? 27 32 79 ? 10 60 79 ? 90 60 79 ? 90 28 79 ? 1 60 79 ? 32 79 82 ? 27 60 82 ? 90 32 82 ? 10 28 82 ? 1 60 82 ? 32 60 11 ? 10 1 11 ? 28 60 11 ?...
result:
points 1.0 points 1.0 correct 2509 queries
Test #5:
score: 100
Accepted
time: 14ms
memory: 5880kb
input:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
output:
? 24 62 96 ? 24 62 81 ? 62 96 81 ? 24 96 4 ? 24 62 4 ? 24 81 4 ? 24 62 90 ? 62 81 90 ? 24 4 90 ? 96 81 90 ? 24 90 67 ? 62 4 67 ? 24 96 67 ? 62 81 67 ? 4 90 56 ? 24 67 56 ? 81 67 56 ? 62 67 56 ? 96 81 56 ? 81 4 16 ? 90 67 16 ? 24 96 16 ? 62 81 16 ? 24 56 16 ? 67 16 36 ? 24 81 36 ? 90 56 36 ? 24 4 36 ...
result:
points 1.0 points 1.0 correct 2516 queries
Test #6:
score: 100
Accepted
time: 6ms
memory: 5960kb
input:
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 2 ...
output:
? 13 15 22 ? 13 22 3 ? 15 22 3 ? 15 3 69 ? 13 22 69 ? 15 3 11 ? 13 22 11 ? 3 69 11 ? 15 69 100 ? 15 22 100 ? 13 15 100 ? 15 3 100 ? 69 11 100 ? 15 3 74 ? 13 3 74 ? 69 100 74 ? 13 22 74 ? 69 11 74 ? 69 100 99 ? 15 3 99 ? 15 74 99 ? 15 11 99 ? 22 100 99 ? 13 3 99 ? 15 22 68 ? 100 74 68 ? 3 69 68 ? 13 ...
result:
points 1.0 points 1.0 correct 2513 queries
Test #7:
score: 100
Accepted
time: 6ms
memory: 5800kb
input:
0 1 0 0 1 1 3 1 1 1 2 0 2 1 0 2 1 1 0 0 1 1 0 1 2 2 1 0 1 1 2 0 1 1 1 1 0 2 1 0 0 0 0 1 0 3 0 1 0 1 2 1 1 1 2 1 1 1 0 0 2 2 2 1 1 1 1 0 1 2 1 0 2 1 1 1 1 1 2 0 2 1 0 1 0 0 0 0 1 1 2 1 1 0 0 0 1 1 1 1 0 2 0 2 1 0 0 1 2 1 0 0 1 0 1 0 1 1 0 0 0 2 1 1 1 1 1 0 1 1 1 1 0 2 0 2 1 0 2 1 1 0 1 0 0 1 1 3 1 1 ...
output:
? 43 61 20 ? 61 20 45 ? 43 61 45 ? 61 45 75 ? 20 45 75 ? 43 61 75 ? 20 45 34 ? 45 75 34 ? 61 75 34 ? 43 20 34 ? 45 34 58 ? 75 34 58 ? 61 34 58 ? 43 45 58 ? 20 75 58 ? 61 58 77 ? 43 45 77 ? 45 34 77 ? 61 45 77 ? 45 75 77 ? 61 20 77 ? 61 77 88 ? 75 77 88 ? 61 20 88 ? 45 58 88 ? 58 77 88 ? 20 34 88 ? 4...
result:
points 1.0 points 1.0 correct 3127 queries
Test #8:
score: 100
Accepted
time: 4ms
memory: 5920kb
input:
1 0 1 2 2 2 1 1 1 2 1 3 2 2 2 0 3 1 2 1 0 0 1 1 1 1 0 1 1 1 1 2 0 0 1 1 1 0 3 2 0 1 1 0 0 1 2 1 1 2 3 1 2 2 1 2 1 0 1 0 1 1 0 1 3 1 1 1 0 1 0 1 2 1 0 1 1 2 0 2 0 0 1 2 1 0 1 1 1 1 2 1 2 1 0 1 0 2 2 1 1 1 1 1 1 1 2 0 1 1 0 1 1 3 0 1 1 1 2 1 1 1 0 1 3 1 0 2 1 0 0 1 0 0 1 2 0 2 2 2 2 2 2 1 2 0 0 1 1 0 ...
output:
? 54 70 77 ? 70 77 69 ? 54 77 69 ? 70 77 84 ? 70 69 84 ? 54 70 84 ? 69 84 33 ? 54 70 33 ? 77 69 33 ? 54 77 33 ? 70 77 5 ? 70 33 5 ? 54 77 5 ? 69 33 5 ? 69 84 5 ? 69 33 19 ? 54 77 19 ? 70 33 19 ? 54 5 19 ? 70 84 19 ? 84 33 73 ? 33 19 73 ? 54 5 73 ? 54 69 73 ? 77 69 73 ? 70 33 73 ? 5 19 73 ? 70 19 20 ...
result:
points 1.0 points 1.0 correct 3250 queries
Test #9:
score: 100
Accepted
time: 7ms
memory: 5876kb
input:
0 0 0 0 0 0 2 2 1 2 1 2 0 2 0 2 0 3 0 0 0 2 0 0 0 0 0 3 3 1 2 1 2 1 2 0 0 2 2 0 2 0 0 0 1 0 1 0 0 0 2 2 0 2 2 0 0 0 2 2 0 2 2 0 0 0 0 2 2 0 2 2 0 0 1 2 2 3 2 3 2 2 0 0 1 0 1 0 0 2 1 1 2 2 3 2 3 1 2 3 0 1 2 2 3 2 3 2 2 3 1 1 2 2 3 2 3 1 2 3 1 3 0 0 2 2 0 2 2 0 0 2 2 1 3 1 0 0 2 2 0 2 2 0 0 2 2 1 3 2 ...
output:
? 4 41 93 ? 4 41 71 ? 41 93 71 ? 4 41 88 ? 4 71 88 ? 93 71 88 ? 93 88 28 ? 71 88 28 ? 4 93 28 ? 41 71 28 ? 4 28 63 ? 41 28 63 ? 4 71 63 ? 88 28 63 ? 93 88 63 ? 28 63 100 ? 4 63 100 ? 93 28 100 ? 71 63 100 ? 4 88 100 ? 41 63 100 ? 28 63 30 ? 71 63 30 ? 41 71 30 ? 88 100 30 ? 4 88 30 ? 93 71 30 ? 41 2...
result:
points 1.0 points 1.0 correct 3088 queries
Test #10:
score: 84.6
Acceptable Answer
time: 6ms
memory: 7996kb
input:
2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 0 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 0 2 2 2 2 2 0 2 2 2 2 2 2 2 0 2 0 2 2 2 2 0 2 2 2 ...
output:
? 42 54 49 ? 42 54 52 ? 42 49 52 ? 54 52 24 ? 42 52 24 ? 42 49 24 ? 54 52 32 ? 42 52 32 ? 49 52 32 ? 54 24 32 ? 42 52 71 ? 42 32 71 ? 52 24 71 ? 49 24 71 ? 42 54 71 ? 52 71 8 ? 54 32 8 ? 54 71 8 ? 54 24 8 ? 49 32 8 ? 42 71 8 ? 42 49 56 ? 32 8 56 ? 52 32 56 ? 54 49 56 ? 54 32 56 ? 42 24 56 ? 49 71 56...
result:
points 0.8460 points 0.8460 correct 3741 queries
Test #11:
score: 100
Accepted
time: 6ms
memory: 5856kb
input:
2 2 1 2 1 0 2 0 1 2 2 1 3 3 2 2 0 0 0 1 0 1 3 2 3 2 1 1 0 1 0 1 3 0 2 2 2 2 1 1 3 2 3 0 3 1 2 1 3 1 1 3 1 3 3 1 3 2 2 0 1 3 3 0 2 3 3 2 1 1 2 1 0 0 1 2 1 2 2 1 2 1 0 1 2 2 3 1 2 0 0 2 1 1 1 2 1 3 1 3 3 1 2 1 1 2 1 1 3 2 1 2 1 2 1 1 0 1 0 1 3 1 2 1 3 1 1 1 2 0 2 1 2 1 2 1 1 1 2 0 2 2 3 1 2 0 0 1 1 1 ...
output:
? 53 40 2 ? 53 2 24 ? 53 40 24 ? 53 2 55 ? 2 24 55 ? 40 24 55 ? 53 2 33 ? 53 24 33 ? 24 55 33 ? 40 2 33 ? 2 33 9 ? 53 24 9 ? 53 2 9 ? 53 40 9 ? 53 55 9 ? 40 9 72 ? 40 55 72 ? 2 55 72 ? 24 55 72 ? 53 55 72 ? 24 33 72 ? 2 72 57 ? 2 9 57 ? 2 24 57 ? 55 33 57 ? 53 40 57 ? 40 24 57 ? 33 9 19 ? 40 72 19 ?...
result:
points 1.0 points 1.0 correct 3367 queries
Test #12:
score: 100
Accepted
time: 4ms
memory: 5900kb
input:
1 1 1 3 2 1 2 3 1 2 1 1 1 0 1 1 3 1 1 1 3 2 1 1 3 1 1 1 0 1 3 1 1 1 2 2 1 1 3 2 2 2 1 3 2 2 3 2 2 2 3 1 2 2 1 2 3 3 1 3 2 1 1 3 3 2 2 3 1 3 2 1 2 3 2 3 1 1 1 2 2 2 0 2 2 3 2 3 1 2 2 2 1 2 3 1 1 3 2 2 0 1 1 1 1 3 2 2 0 3 1 3 2 2 2 3 2 1 2 3 2 3 1 1 2 3 2 2 3 2 1 2 1 2 3 2 2 0 2 2 0 1 3 0 2 0 3 2 2 1 ...
output:
? 21 66 93 ? 21 66 6 ? 21 93 6 ? 66 6 34 ? 93 6 34 ? 21 6 34 ? 66 6 1 ? 66 93 1 ? 93 34 1 ? 21 93 1 ? 93 6 27 ? 6 1 27 ? 6 34 27 ? 21 6 27 ? 66 93 27 ? 66 34 5 ? 93 1 5 ? 21 6 5 ? 21 93 5 ? 93 34 5 ? 1 27 5 ? 66 5 67 ? 6 1 67 ? 34 5 67 ? 66 1 67 ? 21 6 67 ? 93 6 67 ? 34 27 67 ? 21 93 57 ? 21 6 57 ? ...
result:
points 1.0 points 1.0 correct 3306 queries
Test #13:
score: 100
Accepted
time: 9ms
memory: 5968kb
input:
2 2 0 3 0 1 3 1 1 1 2 2 2 1 2 2 1 2 1 0 1 1 1 1 2 2 3 2 1 2 2 1 1 1 0 3 2 1 1 2 1 1 2 3 1 2 2 1 2 3 2 2 1 1 3 1 2 3 3 2 1 1 2 2 1 1 1 2 1 2 2 1 1 0 1 2 3 1 3 3 1 2 3 2 2 1 1 3 2 2 3 0 2 0 3 2 2 2 2 2 3 1 0 3 1 1 1 2 1 2 2 3 2 0 2 1 3 1 2 3 2 1 3 2 1 1 1 2 2 0 2 3 2 2 3 0 2 2 2 3 2 2 2 3 0 1 1 3 3 0 ...
output:
? 79 68 70 ? 68 70 66 ? 79 68 66 ? 68 70 1 ? 79 66 1 ? 79 66 37 ? 79 70 37 ? 66 1 37 ? 79 68 37 ? 79 70 97 ? 70 66 97 ? 70 37 97 ? 68 37 97 ? 79 1 97 ? 68 1 56 ? 1 37 56 ? 68 70 56 ? 66 97 56 ? 68 97 56 ? 79 97 56 ? 70 56 9 ? 79 66 9 ? 68 56 9 ? 79 56 9 ? 68 97 9 ? 70 37 9 ? 1 97 9 ? 79 56 78 ? 68 9...
result:
points 1.0 points 1.0 correct 3355 queries
Test #14:
score: 100
Accepted
time: 4ms
memory: 5920kb
input:
2 2 2 1 2 2 2 1 2 2 2 2 2 0 1 1 1 3 3 1 1 2 1 2 1 0 3 3 1 3 0 2 1 3 2 1 1 2 0 2 1 2 3 2 0 2 3 1 1 2 2 1 2 0 3 1 2 1 1 0 1 1 3 1 0 2 0 1 0 1 1 1 1 1 1 2 0 0 1 1 3 1 1 1 1 0 1 0 1 2 2 2 2 1 2 2 0 1 1 1 2 1 2 1 2 1 1 2 2 1 2 1 1 2 1 1 1 1 1 2 2 1 1 2 2 0 0 1 1 2 0 0 2 1 1 2 1 3 1 2 1 2 1 0 1 1 1 3 1 0 ...
output:
? 86 28 8 ? 28 8 25 ? 86 8 25 ? 86 25 34 ? 28 25 34 ? 86 8 34 ? 8 34 50 ? 8 25 50 ? 86 25 50 ? 28 8 50 ? 28 25 35 ? 25 34 35 ? 8 34 35 ? 8 50 35 ? 86 50 35 ? 86 28 36 ? 34 35 36 ? 25 50 36 ? 86 25 36 ? 25 34 36 ? 8 34 36 ? 34 35 88 ? 8 35 88 ? 50 35 88 ? 86 28 88 ? 28 36 88 ? 86 35 88 ? 25 35 88 ? 8...
result:
points 1.0 points 1.0 correct 3337 queries
Test #15:
score: 100
Accepted
time: 24ms
memory: 5940kb
input:
2 3 3 1 3 2 2 1 2 2 2 1 1 2 2 3 1 2 2 2 3 2 0 2 1 1 2 2 2 3 1 3 2 2 1 1 2 1 3 2 2 0 3 1 2 2 3 1 3 3 1 0 3 1 0 1 2 2 0 1 2 2 2 1 1 3 1 1 2 1 1 3 1 2 1 3 2 1 1 1 2 1 0 1 1 0 3 2 2 1 1 1 3 1 1 1 2 0 3 2 2 3 1 2 2 3 1 1 1 2 2 2 1 0 2 2 2 2 2 2 3 3 0 2 2 0 2 1 2 2 0 2 2 1 3 0 3 2 2 2 1 1 3 2 2 1 1 2 2 1 ...
output:
? 26 70 68 ? 70 68 55 ? 26 68 55 ? 70 68 76 ? 26 55 76 ? 70 55 76 ? 26 76 41 ? 68 55 41 ? 26 68 41 ? 70 68 41 ? 70 41 56 ? 26 68 56 ? 76 41 56 ? 26 76 56 ? 70 55 56 ? 76 56 92 ? 26 56 92 ? 55 56 92 ? 68 56 92 ? 68 41 92 ? 70 55 92 ? 70 55 9 ? 26 70 9 ? 76 41 9 ? 55 56 9 ? 68 92 9 ? 55 92 9 ? 70 41 9...
result:
points 1.0 points 1.0 correct 3302 queries
Test #16:
score: 0
Dangerous Syscalls
input:
1 2 1 2 3 1 3 2 2 1 2 2 0 2 2 1 1 0 2 3 2 0 1 1 2 1 2 2 2 1 3 1 3 0 3 2 2 2 1 2 1 1 1 2 2
output:
? 87 3 20 ? 87 3 60 ? 87 20 60 ? 87 60 100 ? 3 20 100 ? 87 3 100 ? 60 100 41 ? 3 60 41 ? 3 20 41 ? 87 3 41 ? 3 60 96 ? 3 20 96 ? 87 3 96 ? 3 100 96 ? 100 41 96 ? 20 41 92 ? 3 60 92 ? 20 60 92 ? 100 41 92 ? 100 96 92 ? 87 41 92 ? 20 92 49 ? 3 41 49 ? 20 96 49 ? 3 100 49 ? 60 92 49 ? 60 100 49 ? 87 60...