Submission #733312

#TimeUsernameProblemLanguageResultExecution timeMemory
733312MauveCave (IOI13_cave)C++14
34 / 100
37 ms392 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; for(int i=0;i<=N;i++){ a[i]=0; } while(true){ k=tryCombination(a); if(k==-1) break; for(i=0;i<N;i++){ a[i]=1-a[i]; j=tryCombination(a); if(j==-1) break; if(j<=k) a[i]=1-a[i]; else break; } } 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:27: warning: unused variable 'l' [-Wunused-variable]
    5 |     int pos[N],a[N],i,j,k,l,r;
      |                           ^
cave.cpp:5:29: warning: unused variable 'r' [-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...