제출 #970006

#제출 시각아이디문제언어결과실행 시간메모리
970006tamir1동굴 (IOI13_cave)C++17
13 / 100
9 ms528 KiB
#include "cave.h" #include<iostream> using namespace std; int S[5000],D[5000]; void exploreCave(int N) { int i,j,n; if(N<=100){ while(tryCombination(S)!=-1){ int x=tryCombination(S); for(i=0;i<N;i++){ S[j]=1; int y=tryCombination(S); if(y==-1) break; if(y<=x) S[j]=0; } } } if(tryCombination(S)==-1){ for(i=0;i<N;i++){ S[i]=1-S[i]; int x=tryCombination(S); S[i]=1-S[i]; D[i]=x; } answer(S,D); } for(i=0;i<N;i++) D[i]=i; for(i=0;i<N;i++){ int x=tryCombination(S); if(x==-1) break; S[x]=1; } answer(S,D); }

컴파일 시 표준 에러 (stderr) 메시지

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:6:10: warning: unused variable 'n' [-Wunused-variable]
    6 |  int i,j,n;
      |          ^
cave.cpp:11:9: warning: 'j' may be used uninitialized in this function [-Wmaybe-uninitialized]
   11 |     S[j]=1;
      |     ~~~~^~
#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...