Submission #733310

#TimeUsernameProblemLanguageResultExecution timeMemory
733310MauveCave (IOI13_cave)C++14
13 / 100
97 ms468 KiB
#include "cave.h" #include<bits/stdc++.h> using namespace std; void exploreCave(int N) { int pos[N],a[N],i,j,k,l,r; bool known[N]; for(int i=0;i<=N;i++){ a[i]=0; known[i]=false; } while(true){ k=tryCombination(a); if(k==-1) break; for(i=0;i<N;i++) if(!known[i]){ a[i]=1; r=tryCombination(a); if(r==-1) break; if(r<k){ pos[i]=r; a[i]=0; known[i]=1; } if(r>k){ pos[i]=k; a[i]=1; known[i]=1; } if(r==k) a[i]=0; } } for(i=0;i<N;i++){ a[i]=1-a[i]; pos[i]=tryCombination(a); a[i]=1-a[i]; } answer(a,pos); }

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:5:23: warning: unused variable 'j' [-Wunused-variable]
    5 |     int pos[N],a[N],i,j,k,l,r;
      |                       ^
cave.cpp:5:27: warning: unused variable 'l' [-Wunused-variable]
    5 |     int pos[N],a[N],i,j,k,l,r;
      |                           ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...