Submission #1164544

#TimeUsernameProblemLanguageResultExecution timeMemory
1164544tsengangCave (IOI13_cave)C++20
13 / 100
7 ms536 KiB
#include<bits/stdc++.h>
#include "cave.h"
using namespace std;
#define ll long long
#define ff first
#define ss second
#define all(x) (x).begin(), (x).end()
#define pb push_back
#define ertunt return
#define vodka void
void exploreCave(int n){
    int v[n] = {0};
    int d[n] = {0};
    int x = tryCombination(d);
    vector<int>vis(n,0);
    while(x != -1){
        for(ll i = 0; i < n; i++){
            d[i] = 1;
            int c = tryCombination(d);
            if(c > x or c == -1){
                x = c;
                break;
            }
            d[i] = 0;
        }
    }
    for(int i = 0; i < n; i++){
        d[i] = 1-d[i];
        int x = tryCombination(d);
        v[i] = x;
        d[i] = 1-d[i];
    }
    answer(d,v);
}
#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...