Submission #988725

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9887252024-05-25 18:13:54lalig777Cave (IOI13_cave)C++14
0 / 100
85 ms352 KiB
#include"cave.h"
#include <iostream>
#include <vector>
using namespace std;
void exploreCave(int N){
bool confirmat[N]={false};
int comb[N]={0};
int porta[N]={-1};
bool funcionaba, funciona;
int act;
for (int i=0; i<N; i++){
int doorsleft=N-i, left=0, right=N-1;
for (int i=0; i<N; i++){
if (confirmat[i]!=true){
left=i;
break;
}
}for (int i=N-1; i>=0; i--){
if (confirmat[i]!=true){
right=i;
break;
}
}act=tryCombination(comb);
if (act!=i) funcionaba=true;
else funcionaba=false;
int r=N-1;
while (left!=right){
int sobra=doorsleft%2;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:58:10: warning: 'funciona' may be used uninitialized in this function [-Wmaybe-uninitialized]
   58 |         }if (funciona==false) comb[left]=1-comb[left];
      |          ^~
#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...