QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#117016#6668. TrokutiIrisu#50.458065 1000ms12248kbC++174.9kb2023-06-30 12:13:002024-05-31 18:37:32

Judging History

你现在查看的是最新测评结果

  • [2024-05-31 18:37:32]
  • 评测
  • 测评结果:50.458065
  • 用时:1000ms
  • 内存:12248kb
  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-06-30 12:13:00]
  • 提交

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);
  }
  bool any()const{
    rep(i,0,77)if(seq[i])return 1;
    return 0;
  }
  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<50;
  }
  
  {
    int c=0;
    rep(i,1,n)rep(j,i+1,n)tid[i][j]=tid[j][i]=++c,dit[c]={i,j};
  }
  
  static int buk[maxn];
  memset(buk,-1,sizeof buk);
  
  rep(s,3,n){
    vector<pii>orz;
    rep(a,1,s-1)rep(b,a+1,s-1){
      orz.pb({a,b});
    }
    shuffle(ALL(orz),Rnd);
    bit w;
    for(auto[a,b]:orz){
      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(v==0||v==3){
        buk[tid[a][b]]=buk[tid[a][s]]=buk[tid[b][s]]=v>0;
        w.reset(),w.set(tid[a][b]),ins(w);
        w.reset(),w.set(tid[a][s]),ins(w);
        w.reset(),w.set(tid[b][s]),ins(w);
      }else{
        
      }
      if(rk==s*(s-1)/2){
//        printf("#%d\n",s);
        break;
      }
    }
  }
  
  static bit a[50000];
  int tot=0;
  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(m+1);
    }
  }
  rep(i,1,m)if(buk[i]!=-1){
    tot++;
    a[tot].set(i);
    if(buk[i])a[tot].set(m+1);
  }
//  rep(i,1,m){
//    bool hav=0;
//    rep(j,1,tot)hav|=a[j][i];
//    if(!hav)cout<<i<<endl;
//    assert(hav);
//  }
  rep(i,1,m){
    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,m,1){
    assert(a[i][i]);
    buk[i]=a[i][m+1];
    if(a[i][m+1]){
      rep(j,1,i-1)if(a[j][i]){
        a[j].flip(m+1);
      }
    }
  }
  
//  printf("!%d, %d\n",rk,use_q);
  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: 50.4581
Acceptable Answer

Test #1:

score: 85.8194
Acceptable Answer
time: 117ms
memory: 10888kb

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:

? 70 31 79
? 31 79 35
? 70 79 35
? 70 31 37
? 70 79 37
? 31 35 37
? 31 79 81
? 79 35 81
? 70 37 81
? 70 31 76
? 31 35 76
? 31 79 76
? 35 81 76
? 79 37 76
? 37 76 90
? 31 79 90
? 31 35 90
? 37 81 90
? 70 37 90
? 70 81 30
? 35 81 30
? 81 76 30
? 79 90 30
? 37 90 30
? 31 37 30
? 76 30 49
? 70 31 49
? 7...

result:

points 0.85819354840 points  0.85819354840 correct 3714 queries

Test #2:

score: 85.8194
Acceptable Answer
time: 108ms
memory: 11320kb

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:

? 70 31 79
? 31 79 35
? 70 79 35
? 70 31 37
? 70 79 37
? 31 35 37
? 31 79 81
? 79 35 81
? 70 37 81
? 70 31 76
? 31 35 76
? 31 79 76
? 35 81 76
? 79 37 76
? 37 76 90
? 31 79 90
? 31 35 90
? 37 81 90
? 70 37 90
? 70 81 30
? 35 81 30
? 81 76 30
? 79 90 30
? 37 90 30
? 31 37 30
? 76 30 49
? 70 31 49
? 7...

result:

points 0.85819354840 points  0.85819354840 correct 3714 queries

Test #3:

score: 85.7742
Acceptable Answer
time: 115ms
memory: 10716kb

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:

? 70 31 79
? 31 79 35
? 70 79 35
? 70 31 37
? 70 79 37
? 31 35 37
? 31 79 81
? 79 35 81
? 70 37 81
? 70 31 76
? 31 35 76
? 31 79 76
? 35 81 76
? 79 37 76
? 37 76 90
? 31 79 90
? 31 35 90
? 37 81 90
? 70 37 90
? 70 81 30
? 35 81 30
? 81 76 30
? 79 90 30
? 37 90 30
? 31 37 30
? 76 30 49
? 70 31 49
? 7...

result:

points 0.85774193550 points  0.85774193550 correct 3715 queries

Test #4:

score: 85.8194
Acceptable Answer
time: 106ms
memory: 11308kb

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:

? 70 31 79
? 31 79 35
? 70 79 35
? 70 31 37
? 70 79 37
? 31 35 37
? 31 79 81
? 79 35 81
? 70 37 81
? 70 31 76
? 31 35 76
? 31 79 76
? 35 81 76
? 79 37 76
? 37 76 90
? 31 79 90
? 31 35 90
? 37 81 90
? 70 37 90
? 70 81 30
? 35 81 30
? 81 76 30
? 79 90 30
? 37 90 30
? 31 37 30
? 76 30 49
? 70 31 49
? 7...

result:

points 0.85819354840 points  0.85819354840 correct 3714 queries

Test #5:

score: 85.729
Acceptable Answer
time: 110ms
memory: 10244kb

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:

? 70 31 79
? 31 79 35
? 70 79 35
? 70 31 37
? 70 79 37
? 31 35 37
? 31 79 81
? 79 35 81
? 70 37 81
? 70 31 76
? 31 35 76
? 31 79 76
? 35 81 76
? 79 37 76
? 37 76 90
? 31 79 90
? 31 35 90
? 37 81 90
? 70 37 90
? 70 81 30
? 35 81 30
? 81 76 30
? 79 90 30
? 37 90 30
? 31 37 30
? 76 30 49
? 70 31 49
? 7...

result:

points 0.85729032260 points  0.85729032260 correct 3716 queries

Test #6:

score: 85.5032
Acceptable Answer
time: 109ms
memory: 10424kb

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
2
3
3
3
3
3
3
3
3
3
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
3
3
3
3
...

output:

? 70 31 79
? 31 79 35
? 70 79 35
? 70 31 37
? 70 79 37
? 31 35 37
? 31 79 81
? 79 35 81
? 70 37 81
? 70 31 76
? 31 35 76
? 31 79 76
? 35 81 76
? 79 37 76
? 37 76 90
? 31 79 90
? 31 35 90
? 37 81 90
? 70 37 90
? 70 81 30
? 35 81 30
? 81 76 30
? 79 90 30
? 37 90 30
? 31 37 30
? 76 30 49
? 70 31 49
? 7...

result:

points 0.85503225810 points  0.85503225810 correct 3721 queries

Test #7:

score: 63.7806
Acceptable Answer
time: 97ms
memory: 12100kb

input:

2
3
3
1
1
2
1
1
1
1
0
1
1
0
1
1
2
1
1
1
0
0
1
1
1
0
1
1
0
2
0
1
2
1
1
1
1
1
1
0
0
1
1
2
3
1
1
1
1
2
1
2
1
1
0
0
1
1
1
0
2
0
0
0
0
0
0
2
1
0
0
0
1
1
0
0
0
0
1
1
0
1
0
0
2
0
1
0
1
0
1
0
2
0
0
1
1
0
0
2
0
1
0
0
1
0
1
1
0
0
2
1
0
1
1
2
2
2
1
0
2
2
0
2
1
0
0
1
0
0
0
1
1
1
1
1
0
1
0
0
0
0
1
1
0
1
2
2
1
0
...

output:

? 70 31 79
? 31 79 35
? 70 79 35
? 70 31 37
? 70 79 37
? 31 35 37
? 31 79 81
? 79 35 81
? 70 37 81
? 79 37 81
? 70 31 76
? 31 35 76
? 31 79 76
? 35 81 76
? 79 37 76
? 37 76 90
? 31 79 90
? 31 35 90
? 79 76 90
? 37 81 90
? 70 37 90
? 70 81 30
? 35 81 30
? 81 76 30
? 79 90 30
? 37 90 30
? 31 37 30
? 7...

result:

points 0.63780645160 points  0.63780645160 correct 4202 queries

Test #8:

score: 57.3677
Acceptable Answer
time: 88ms
memory: 11064kb

input:

0
1
1
2
1
1
1
2
2
1
1
0
0
0
0
0
0
0
0
2
2
2
1
2
1
3
1
0
1
0
1
1
0
2
2
2
1
1
1
0
1
2
2
2
1
0
1
1
1
1
1
1
1
0
2
2
0
0
1
1
0
3
1
1
2
1
1
1
0
1
1
0
1
2
2
1
2
1
0
0
2
0
0
2
1
1
1
1
0
0
0
0
2
2
0
1
1
1
2
0
3
3
1
1
1
2
1
2
2
0
1
0
1
2
3
2
1
1
1
1
2
0
0
0
1
2
2
2
1
0
0
0
1
0
1
0
1
0
1
1
1
2
1
0
0
0
2
1
0
2
...

output:

? 70 31 79
? 31 79 35
? 70 79 35
? 70 31 37
? 70 79 37
? 31 35 37
? 31 79 81
? 79 35 81
? 70 37 81
? 79 37 81
? 70 31 76
? 31 35 76
? 31 79 76
? 35 81 76
? 79 37 76
? 37 76 90
? 31 79 90
? 31 35 90
? 37 81 90
? 70 37 90
? 70 81 30
? 35 81 30
? 81 76 30
? 79 90 30
? 37 90 30
? 79 81 30
? 31 37 30
? 7...

result:

points 0.57367741940 points  0.57367741940 correct 4344 queries

Test #9:

score: 65.9032
Acceptable Answer
time: 95ms
memory: 12172kb

input:

0
1
2
0
0
1
1
3
0
0
1
1
3
1
1
1
1
3
0
0
0
1
1
1
0
0
0
0
2
0
2
1
0
2
2
2
2
3
3
2
2
1
2
1
1
3
3
1
3
2
0
0
0
2
0
0
0
2
1
3
3
0
0
2
1
1
1
0
3
0
1
2
2
1
1
3
3
3
0
3
1
1
1
1
2
1
2
1
0
2
3
0
1
0
3
0
0
0
1
0
0
1
2
1
2
2
2
0
1
0
2
0
0
1
1
2
2
0
1
0
1
2
2
3
3
0
0
1
2
3
0
1
1
0
0
0
0
2
2
0
3
1
3
1
1
1
1
1
2
1
...

output:

? 70 31 79
? 31 79 35
? 70 79 35
? 70 31 37
? 70 79 37
? 31 35 37
? 31 79 81
? 79 35 81
? 70 37 81
? 70 31 76
? 31 35 76
? 31 79 76
? 35 81 76
? 79 37 76
? 37 76 90
? 31 79 90
? 31 35 90
? 79 76 90
? 37 81 90
? 70 37 90
? 70 81 30
? 35 81 30
? 81 76 30
? 79 90 30
? 37 90 30
? 31 37 30
? 76 30 49
? 7...

result:

points 0.65903225810 points  0.65903225810 correct 4155 queries

Test #10:

score: 50.4581
Acceptable Answer
time: 1000ms
memory: 10596kb

input:

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
2
0
2
2
2
2
2
2
2
0
2
2
2
2
0
2
2
2
0
2
0
2
2
0
2
2
2
2
0
2
2
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
0
2
2
0
2
2
2
2
0
2
2
2
2
2
0
0
2
2
2
2
0
2
2
2
0
0
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
0
2
2
2
2
2
0
0
0
2
2
2
2
0
0
0
2
2
2
0
2
2
2
2
2
...

output:

? 70 31 79
? 31 79 35
? 70 79 35
? 70 31 37
? 70 79 37
? 31 35 37
? 31 79 81
? 79 35 81
? 70 37 81
? 79 37 81
? 70 31 76
? 31 35 76
? 31 79 76
? 35 81 76
? 79 37 76
? 37 76 90
? 31 79 90
? 31 35 90
? 79 76 90
? 37 81 90
? 70 37 90
? 70 81 30
? 35 81 30
? 81 76 30
? 79 90 30
? 37 90 30
? 79 81 30
? 3...

result:

points 0.50458064520 points  0.50458064520 correct 4497 queries

Test #11:

score: 53.2129
Acceptable Answer
time: 74ms
memory: 11228kb

input:

3
1
2
1
1
0
3
2
1
1
2
0
1
2
0
0
1
0
0
0
3
2
3
2
1
3
1
3
2
2
2
3
1
2
2
3
2
3
1
2
1
2
2
1
2
1
0
2
0
1
1
2
3
2
2
2
1
1
3
1
1
1
2
3
2
1
0
2
1
0
2
2
2
0
2
2
2
2
1
2
1
1
3
1
3
3
2
2
2
3
2
2
3
1
1
2
2
1
3
2
2
3
1
2
3
1
0
2
1
2
2
3
2
2
1
2
2
2
2
2
0
1
1
1
1
1
0
1
1
1
1
2
2
2
2
1
2
1
2
3
2
3
2
1
3
2
2
0
0
2
...

output:

? 70 31 79
? 31 79 35
? 70 79 35
? 70 31 37
? 70 79 37
? 31 35 37
? 31 79 81
? 79 35 81
? 70 37 81
? 79 37 81
? 70 31 76
? 31 35 76
? 31 79 76
? 35 81 76
? 79 37 76
? 37 76 90
? 31 79 90
? 31 35 90
? 37 81 90
? 70 37 90
? 70 81 30
? 35 81 30
? 81 76 30
? 79 90 30
? 37 90 30
? 79 81 30
? 31 37 30
? 7...

result:

points 0.53212903230 points  0.53212903230 correct 4436 queries

Test #12:

score: 52.8968
Acceptable Answer
time: 97ms
memory: 11960kb

input:

1
0
1
1
0
1
1
1
1
0
2
1
0
3
1
3
2
2
2
1
2
3
3
3
3
3
1
2
2
2
2
1
3
0
2
2
2
2
0
0
0
0
2
1
2
1
1
0
1
1
2
1
0
2
0
1
0
1
1
1
1
1
0
0
1
1
1
2
2
3
0
0
0
2
0
3
1
3
2
2
1
2
0
1
3
1
1
1
3
1
1
2
1
0
1
3
2
0
1
2
1
1
1
1
1
2
1
1
2
2
2
1
1
1
0
1
1
2
1
1
2
1
0
1
2
2
2
3
1
2
1
2
0
0
0
2
1
1
1
1
3
3
1
0
2
2
1
1
0
1
...

output:

? 70 31 79
? 31 79 35
? 70 79 35
? 70 31 37
? 70 79 37
? 31 35 37
? 31 79 81
? 79 35 81
? 70 37 81
? 79 37 81
? 70 31 76
? 31 35 76
? 31 79 76
? 35 81 76
? 79 37 76
? 37 76 90
? 31 79 90
? 31 35 90
? 79 76 90
? 37 81 90
? 70 37 90
? 70 81 30
? 35 81 30
? 81 76 30
? 79 90 30
? 37 90 30
? 31 37 30
? 7...

result:

points 0.52896774190 points  0.52896774190 correct 4443 queries

Test #13:

score: 54.4323
Acceptable Answer
time: 92ms
memory: 10636kb

input:

1
1
3
1
3
0
1
2
1
1
1
1
1
1
1
1
0
1
0
1
2
2
3
1
0
1
1
1
2
3
1
2
2
1
2
1
2
1
2
2
2
2
3
0
1
3
0
0
2
2
3
1
1
2
2
2
1
2
0
2
1
2
1
1
1
2
3
2
0
0
1
2
2
2
1
1
0
1
1
0
1
1
1
1
1
2
0
1
0
2
2
0
2
0
1
1
0
3
2
1
2
0
3
3
0
2
3
1
3
3
2
1
1
2
2
2
1
1
2
2
1
1
1
1
2
1
2
1
2
1
0
2
2
2
2
1
1
1
1
3
2
1
0
1
0
3
2
1
1
1
...

output:

? 70 31 79
? 31 79 35
? 70 79 35
? 70 31 37
? 70 79 37
? 31 35 37
? 31 79 81
? 79 35 81
? 70 37 81
? 79 37 81
? 70 31 76
? 31 35 76
? 31 79 76
? 35 81 76
? 79 37 76
? 37 76 90
? 31 79 90
? 31 35 90
? 79 76 90
? 37 81 90
? 70 37 90
? 70 81 30
? 35 81 30
? 81 76 30
? 79 90 30
? 37 90 30
? 31 37 30
? 7...

result:

points 0.54432258060 points  0.54432258060 correct 4409 queries

Test #14:

score: 53.8903
Acceptable Answer
time: 73ms
memory: 11636kb

input:

3
2
1
1
1
1
3
1
1
2
1
2
1
2
1
1
2
1
1
2
0
1
0
2
1
1
1
1
3
1
1
2
2
2
3
1
1
2
3
3
2
2
2
1
2
3
2
1
2
3
3
0
0
1
2
2
1
1
1
2
3
1
1
2
2
1
2
2
2
2
2
2
1
2
2
1
2
2
2
2
3
2
0
1
1
2
1
3
1
2
2
3
2
2
2
3
2
1
3
2
1
1
3
2
0
2
2
1
2
1
0
1
2
2
3
3
3
2
3
1
3
2
3
2
2
2
2
2
2
3
2
3
1
2
2
1
2
3
2
1
1
1
2
2
3
3
1
1
2
2
...

output:

? 70 31 79
? 31 79 35
? 70 79 35
? 70 31 37
? 70 79 37
? 31 35 37
? 31 79 81
? 79 35 81
? 70 37 81
? 79 37 81
? 70 31 76
? 31 35 76
? 31 79 76
? 35 81 76
? 79 37 76
? 37 76 90
? 31 79 90
? 31 35 90
? 79 76 90
? 37 81 90
? 70 37 90
? 70 81 30
? 35 81 30
? 81 76 30
? 79 90 30
? 37 90 30
? 79 81 30
? 3...

result:

points 0.53890322580 points  0.53890322580 correct 4421 queries

Test #15:

score: 52.9419
Acceptable Answer
time: 70ms
memory: 11344kb

input:

3
2
3
2
3
0
2
2
1
1
1
0
2
1
3
3
3
1
1
2
1
2
2
3
3
2
1
2
2
3
3
3
3
1
1
2
1
2
3
1
0
1
1
3
0
2
2
2
2
3
2
1
0
3
3
1
2
2
2
3
1
1
1
2
2
1
0
0
1
0
1
0
2
1
3
3
2
1
2
0
1
2
2
1
1
3
1
1
2
3
1
2
1
3
2
2
1
1
2
1
1
1
2
2
1
1
2
1
1
1
2
2
2
2
0
0
0
1
0
1
1
1
1
0
2
1
0
2
2
2
2
2
3
2
3
1
2
2
2
1
3
1
3
1
1
1
1
0
1
1
...

output:

? 70 31 79
? 31 79 35
? 70 79 35
? 70 31 37
? 70 79 37
? 31 35 37
? 31 79 81
? 79 35 81
? 70 37 81
? 79 37 81
? 70 31 76
? 31 35 76
? 31 79 76
? 35 81 76
? 79 37 76
? 37 76 90
? 31 79 90
? 31 35 90
? 37 81 90
? 70 37 90
? 70 81 30
? 35 81 30
? 81 76 30
? 79 90 30
? 37 90 30
? 79 81 30
? 31 37 30
? 7...

result:

points 0.52941935480 points  0.52941935480 correct 4442 queries

Test #16:

score: 52.9419
Acceptable Answer
time: 84ms
memory: 10496kb

input:

2
1
2
2
3
1
2
2
1
2
2
2
2
2
3
2
2
3
3
0
2
1
1
2
2
2
1
1
2
3
2
3
1
3
1
3
1
3
2
2
2
2
3
1
0
1
2
2
1
1
1
1
1
1
1
2
1
1
0
1
1
2
1
1
1
1
2
3
2
3
2
1
2
2
1
3
1
1
1
2
2
1
3
1
3
1
2
1
2
1
2
1
1
2
1
2
1
1
1
2
1
2
1
1
2
2
2
2
3
1
2
2
2
1
0
2
1
2
2
1
2
2
1
1
2
2
2
1
2
0
1
1
2
3
2
2
0
1
2
1
1
0
0
2
0
3
1
2
0
1
...

output:

? 70 31 79
? 31 79 35
? 70 79 35
? 70 31 37
? 70 79 37
? 31 35 37
? 31 79 81
? 79 35 81
? 70 37 81
? 79 37 81
? 70 31 76
? 31 35 76
? 31 79 76
? 35 81 76
? 79 37 76
? 37 76 90
? 31 79 90
? 31 35 90
? 79 76 90
? 37 81 90
? 70 37 90
? 70 81 30
? 35 81 30
? 81 76 30
? 79 90 30
? 37 90 30
? 79 81 30
? 3...

result:

points 0.52941935480 points  0.52941935480 correct 4442 queries

Test #17:

score: 54.2065
Acceptable Answer
time: 80ms
memory: 11904kb

input:

2
0
2
3
2
2
1
1
2
2
1
1
0
2
0
2
0
0
1
2
2
1
1
3
0
2
2
2
2
3
2
1
2
1
2
1
0
2
2
2
0
1
0
3
1
3
1
1
1
2
1
1
2
2
2
2
1
2
1
0
2
2
1
0
0
2
1
1
2
1
3
2
2
1
1
1
2
2
1
3
0
2
2
1
0
2
2
1
2
1
2
2
1
2
2
2
1
2
3
2
0
0
0
1
2
2
1
2
3
2
1
0
1
1
1
1
1
1
2
1
1
0
1
2
1
2
2
2
2
1
3
1
3
1
2
3
3
1
1
1
1
2
3
3
1
3
1
3
2
2
...

output:

? 70 31 79
? 31 79 35
? 70 79 35
? 70 31 37
? 70 79 37
? 31 35 37
? 31 79 81
? 79 35 81
? 70 37 81
? 79 37 81
? 70 31 76
? 31 35 76
? 31 79 76
? 35 81 76
? 79 37 76
? 37 76 90
? 31 79 90
? 31 35 90
? 79 76 90
? 37 81 90
? 70 37 90
? 70 81 30
? 35 81 30
? 81 76 30
? 79 90 30
? 37 90 30
? 31 37 30
? 7...

result:

points 0.54206451610 points  0.54206451610 correct 4414 queries

Test #18:

score: 53.1677
Acceptable Answer
time: 82ms
memory: 12248kb

input:

1
1
1
2
2
3
0
0
3
1
1
1
1
1
2
1
2
3
2
2
1
1
1
2
1
1
1
1
1
0
1
0
2
1
1
2
1
1
1
1
1
1
3
2
2
2
3
2
1
2
2
1
0
2
1
1
1
1
2
1
0
2
2
1
2
3
3
1
2
2
3
1
2
0
2
2
1
2
2
1
3
3
1
2
3
1
2
0
1
2
1
2
0
3
0
2
1
3
1
2
1
0
2
1
1
1
1
1
2
2
1
0
2
2
1
0
0
0
3
3
3
1
2
0
3
2
1
2
0
2
1
3
0
1
2
3
1
1
0
1
2
3
1
2
2
1
2
2
3
3
...

output:

? 70 31 79
? 31 79 35
? 70 79 35
? 70 31 37
? 70 79 37
? 31 35 37
? 31 79 81
? 79 35 81
? 70 37 81
? 70 31 76
? 31 35 76
? 31 79 76
? 35 81 76
? 79 37 76
? 37 76 90
? 31 79 90
? 31 35 90
? 79 76 90
? 37 81 90
? 70 37 90
? 70 81 30
? 35 81 30
? 81 76 30
? 79 90 30
? 37 90 30
? 79 81 30
? 31 37 30
? 7...

result:

points 0.53167741940 points  0.53167741940 correct 4437 queries

Test #19:

score: 53.7097
Acceptable Answer
time: 81ms
memory: 11096kb

input:

0
1
1
1
1
2
0
2
1
2
1
0
1
1
2
0
1
2
1
2
1
1
1
0
1
0
1
0
1
0
1
1
2
2
1
2
0
1
1
2
1
1
2
1
1
1
2
1
1
1
1
1
2
1
2
1
2
2
1
0
1
0
2
1
2
1
1
0
1
2
1
1
0
0
1
1
2
1
2
2
1
2
0
2
3
0
0
2
1
1
2
1
1
1
1
2
3
2
0
0
1
2
0
2
2
1
0
1
3
1
3
0
3
3
1
1
2
0
2
2
2
1
2
1
2
1
1
1
0
1
0
2
2
1
1
1
3
1
1
1
1
1
2
0
3
1
2
0
2
1
...

output:

? 70 31 79
? 31 79 35
? 70 79 35
? 70 31 37
? 70 79 37
? 31 35 37
? 31 79 81
? 79 35 81
? 70 37 81
? 79 37 81
? 70 31 76
? 31 35 76
? 31 79 76
? 35 81 76
? 79 37 76
? 37 76 90
? 31 79 90
? 31 35 90
? 79 76 90
? 37 81 90
? 70 37 90
? 70 81 30
? 35 81 30
? 81 76 30
? 79 90 30
? 37 90 30
? 31 37 30
? 7...

result:

points 0.53709677420 points  0.53709677420 correct 4425 queries

Test #20:

score: 53.6645
Acceptable Answer
time: 87ms
memory: 10704kb

input:

0
1
1
1
0
2
2
3
2
2
1
1
1
1
1
2
0
1
1
2
0
1
1
1
1
1
2
2
1
1
1
1
2
1
1
1
1
2
1
1
3
2
2
3
2
1
2
2
1
1
3
1
1
2
2
2
1
2
1
3
2
1
2
1
2
2
2
3
1
1
2
1
1
2
1
0
3
3
3
2
2
2
3
2
1
1
2
1
2
1
3
1
1
2
3
2
2
1
3
1
2
1
1
2
3
1
3
1
2
2
3
3
1
1
2
1
0
1
2
2
3
2
1
2
2
1
2
2
2
1
2
3
0
2
1
3
2
1
2
1
3
1
2
2
1
2
3
2
2
2
...

output:

? 70 31 79
? 31 79 35
? 70 79 35
? 70 31 37
? 70 79 37
? 31 35 37
? 31 79 81
? 79 35 81
? 70 37 81
? 79 37 81
? 70 31 76
? 31 35 76
? 31 79 76
? 35 81 76
? 79 37 76
? 37 76 90
? 31 79 90
? 31 35 90
? 79 76 90
? 37 81 90
? 70 37 90
? 70 81 30
? 35 81 30
? 81 76 30
? 79 90 30
? 37 90 30
? 79 81 30
? 3...

result:

points 0.53664516130 points  0.53664516130 correct 4426 queries