Submission #1243680

#TimeUsernameProblemLanguageResultExecution timeMemory
1243680mathias_abadieCave (IOI13_cave)C++20
0 / 100
1 ms328 KiB
#include "cave.h"
#include <bits/stdc++.h>
using namespace std;



void exploreCave(int n) {
    int s[n], d[n];
    for (int i = 0; i < n; i++) {
        s[i] = 0;
    }

    for (int i = 0; i < n; i++) {
    int posicion = 0;
        for (int j = 0; j < n; j++) {
        int closed = tryCombination(s);
            if (closed == posicion){
                s[j]= 1;
                int open = tryCombination(s);
                if (open != posicion){
                d[i]= j;
                }
                break;
            }
        int open = tryCombination(s);
            if (open != posicion){
                s[j]= 1;
                int closed = tryCombination(s);
                if (closed == posicion){
                d[i]= j;
                }
                break;
            }
    }
    posicion++;
    }
    answer(s, d);
}
#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...