QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#117198#6668. TrokutiIrisu0 111ms11260kbC++176.3kb2023-06-30 16:40:222023-06-30 16:40:26

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-06-30 16:40:26]
  • 评测
  • 测评结果:0
  • 用时:111ms
  • 内存:11260kb
  • [2023-06-30 16:40:22]
  • 提交

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<50;
  }
  
  {
    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||rk==s*(s-1)/2)&&(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)buk[tid[a][t]]=!buk[tid[b][t]];
      }
      break;
    }
  }
  
  if(eq==0){
    rep(i,1,m)buk[i]=0;
  }else if(eq==3){
    rep(i,1,m)buk[i]=1;
  }
  
  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: 86.8581
Acceptable Answer
time: 99ms
memory: 10780kb

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:

? 27 39 24
? 27 39 94
? 27 24 94
? 24 94 6
? 27 39 6
? 27 24 93
? 39 24 93
? 24 6 93
? 24 94 93
? 27 94 20
? 27 24 20
? 27 39 20
? 6 93 20
? 24 20 30
? 27 6 30
? 39 24 30
? 93 20 30
? 94 6 30
? 24 94 70
? 27 93 70
? 93 30 70
? 94 20 70
? 6 93 70
? 39 24 70
? 24 94 65
? 39 6 65
? 27 6 65
? 93 70 65
?...

result:

points 0.86858064520 points  0.86858064520 correct 3691 queries

Test #2:

score: 86.1355
Acceptable Answer
time: 111ms
memory: 11260kb

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:

? 40 37 7
? 40 7 98
? 40 37 98
? 37 7 46
? 40 7 46
? 37 98 46
? 37 98 44
? 40 46 44
? 37 7 44
? 40 98 16
? 40 44 16
? 37 98 16
? 7 98 16
? 46 44 16
? 98 44 86
? 40 16 86
? 40 37 86
? 7 16 86
? 7 46 86
? 40 16 89
? 98 16 89
? 98 86 89
? 7 44 89
? 37 7 89
? 98 46 89
? 40 37 41
? 98 44 41
? 16 89 41
? ...

result:

points 0.86135483870 points  0.86135483870 correct 3707 queries

Test #3:

score: 100
Accepted
time: 45ms
memory: 10620kb

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:

? 25 42 18
? 42 18 55
? 25 42 55
? 25 55 16
? 25 42 16
? 42 18 16
? 25 55 62
? 18 16 62
? 25 42 62
? 16 62 87
? 55 16 87
? 18 55 87
? 25 62 87
? 42 16 87
? 25 62 36
? 18 55 36
? 42 16 36
? 16 87 36
? 18 55 53
? 25 42 53
? 16 62 53
? 18 87 53
? 25 36 53
? 18 16 13
? 55 62 13
? 62 36 13
? 36 53 13
? 2...

result:

points 1.0 points  1.0 correct 3153 queries

Test #4:

score: 100
Accepted
time: 60ms
memory: 8576kb

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:

? 81 5 31
? 81 5 54
? 5 31 54
? 81 5 64
? 81 31 64
? 81 54 64
? 54 64 61
? 81 54 61
? 81 5 61
? 31 64 61
? 54 61 3
? 5 61 3
? 5 31 3
? 81 54 3
? 81 64 3
? 64 61 18
? 31 54 18
? 5 61 18
? 81 31 18
? 61 3 18
? 5 54 84
? 64 18 84
? 31 54 84
? 81 54 84
? 3 18 84
? 64 61 84
? 81 61 62
? 54 18 62
? 5 18 6...

result:

points 1.0 points  1.0 correct 3128 queries

Test #5:

score: 100
Accepted
time: 7ms
memory: 5868kb

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
1
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
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
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:

? 95 37 100
? 95 37 69
? 95 100 69
? 100 69 55
? 95 37 55
? 95 69 43
? 95 55 43
? 37 100 43
? 37 43 74
? 95 69 74
? 100 69 74
? 95 55 74
? 100 55 38
? 43 74 38
? 95 43 38
? 100 69 38
? 37 100 38
? 43 74 98
? 74 38 98
? 55 74 98
? 69 43 98
? 100 69 98
? 95 38 98
? 37 69 98
? 69 43 18
? 100 55 18
? 55...

result:

points 1.0 points  1.0 correct 2512 queries

Test #6:

score: 100
Accepted
time: 5ms
memory: 6124kb

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:

? 31 13 2
? 31 13 47
? 31 2 47
? 2 47 86
? 31 47 86
? 13 2 86
? 31 86 32
? 31 47 32
? 13 47 32
? 2 47 32
? 31 2 73
? 13 86 73
? 47 86 73
? 13 32 73
? 32 73 35
? 2 86 35
? 2 47 35
? 13 32 35
? 31 47 35
? 2 86 68
? 31 35 68
? 73 35 68
? 13 73 68
? 31 32 68
? 47 73 68
? 13 35 17
? 2 73 17
? 31 2 17
? 3...

result:

points 1.0 points  1.0 correct 2617 queries

Test #7:

score: 100
Accepted
time: 11ms
memory: 5924kb

input:

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

output:

? 29 34 3
? 29 34 58
? 34 3 58
? 3 58 65
? 29 58 65
? 29 34 65
? 34 58 47
? 34 65 47
? 29 58 47
? 34 3 47
? 29 34 81
? 3 58 81
? 58 65 81
? 65 47 81
? 29 34 30
? 3 58 30
? 65 47 30
? 47 81 30
? 29 34 39
? 3 58 39
? 58 65 39
? 47 81 39
? 30 29 39
? 29 34 38
? 34 3 38
? 3 58 38
? 65 47 38
? 47 81 38
?...

result:

points 1.0 points  1.0 correct 3132 queries

Test #8:

score: 100
Accepted
time: 12ms
memory: 5916kb

input:

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

output:

? 80 32 44
? 32 44 1
? 80 44 1
? 80 32 92
? 44 1 92
? 80 32 54
? 32 44 54
? 44 1 54
? 92 80 54
? 80 32 48
? 44 1 48
? 92 54 48
? 54 80 48
? 80 32 58
? 44 1 58
? 92 54 58
? 54 48 58
? 80 32 8
? 44 1 8
? 92 54 8
? 48 58 8
? 58 80 8
? 80 32 18
? 44 1 18
? 1 92 18
? 54 48 18
? 58 8 18
? 8 80 18
? 80 32 ...

result:

points 1.0 points  1.0 correct 3256 queries

Test #9:

score: 100
Accepted
time: 8ms
memory: 5888kb

input:

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

output:

? 95 46 99
? 46 99 15
? 95 99 15
? 46 99 40
? 46 15 40
? 95 15 40
? 95 46 76
? 46 99 76
? 99 15 76
? 15 40 76
? 95 46 96
? 46 99 96
? 15 40 96
? 76 95 96
? 95 46 84
? 99 15 84
? 40 76 84
? 76 96 84
? 96 95 84
? 95 46 82
? 46 99 82
? 99 15 82
? 15 40 82
? 76 96 82
? 84 95 82
? 95 46 12
? 99 15 12
? 4...

result:

points 1.0 points  1.0 correct 3020 queries

Test #10:

score: 100
Accepted
time: 10ms
memory: 5968kb

input:

0
2
2
2
2
2
2
2
2
2
2
2
2
2
0
2
0
2
2
2
2
2
2
0
2
2
2
0
2
0
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
0
2
2
2
2
0
0
2
2
2
2
0
0
0
2
2
2
2
0
0
2
2
0
0
0
2
2
2
2
2
0
0
0
2
2
2
2
0
2
2
2
2
0
0
2
2
0
2
2
2
2
0
0
2
2
0
2
2
0
0
0
2
2
2
0
2
0
2
2
2
2
0
0
2
2
0
2
0
2
2
2
2
0
0
2
2
0
2
0
2
2
0
0
0
2
2
2
0
2
2
2
2
2
0
0
...

output:

? 96 82 70
? 96 82 20
? 82 70 20
? 82 70 33
? 96 20 33
? 70 20 33
? 82 33 10
? 96 82 10
? 82 70 10
? 70 20 10
? 82 70 16
? 96 70 16
? 82 20 16
? 82 10 16
? 20 33 16
? 70 33 11
? 20 33 11
? 96 33 11
? 82 20 11
? 70 10 11
? 96 16 11
? 96 70 28
? 70 10 28
? 33 10 28
? 70 11 28
? 82 33 28
? 70 20 28
? 1...

result:

points 1.0 points  1.0 correct 3031 queries

Test #11:

score: 100
Accepted
time: 1ms
memory: 5856kb

input:

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

output:

? 79 41 35
? 41 35 95
? 79 41 95
? 79 35 20
? 35 95 20
? 79 41 20
? 79 95 3
? 41 95 3
? 35 95 3
? 79 20 3
? 41 3 18
? 79 35 18
? 95 3 18
? 41 35 18
? 20 3 18
? 79 41 37
? 41 35 37
? 35 95 37
? 95 20 37
? 3 18 37
? 18 79 37
? 79 41 91
? 41 35 91
? 95 20 91
? 20 3 91
? 3 18 91
? 18 37 91
? 37 79 91
? ...

result:

points 1.0 points  1.0 correct 3331 queries

Test #12:

score: 100
Accepted
time: 11ms
memory: 5932kb

input:

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

output:

? 100 57 6
? 100 57 59
? 100 6 59
? 100 57 79
? 57 59 79
? 100 6 79
? 100 57 76
? 100 59 76
? 6 79 76
? 59 79 76
? 59 79 58
? 100 76 58
? 100 6 58
? 57 79 58
? 79 76 58
? 6 59 49
? 59 79 49
? 100 76 49
? 100 6 49
? 57 6 49
? 6 58 49
? 79 49 27
? 100 79 27
? 100 59 27
? 79 58 27
? 57 76 27
? 59 76 27...

result:

points 1.0 points  1.0 correct 3313 queries

Test #13:

score: 100
Accepted
time: 6ms
memory: 5856kb

input:

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

output:

? 43 11 90
? 11 90 55
? 43 11 55
? 43 55 12
? 43 90 12
? 43 11 12
? 43 11 97
? 90 55 97
? 55 12 97
? 12 43 97
? 43 11 33
? 90 55 33
? 12 97 33
? 97 43 33
? 43 11 59
? 90 55 59
? 12 97 59
? 33 43 59
? 43 11 84
? 90 55 84
? 55 12 84
? 97 33 84
? 33 59 84
? 43 11 49
? 90 55 49
? 55 12 49
? 12 97 49
? 9...

result:

points 1.0 points  1.0 correct 3331 queries

Test #14:

score: 0
Dangerous Syscalls

input:

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

output:

? 97 24 16
? 97 16 60
? 97 24 60
? 97 60 36
? 24 60 36
? 16 60 36
? 16 36 40
? 24 16 40
? 97 24 40
? 24 60 40
? 97 24 18
? 24 16 18
? 16 60 18
? 60 36 18
? 36 40 18

result: