# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1172084 | jakubmz2 | Cave (IOI13_cave) | C++20 | 0 ms | 0 KiB |
#include <bits/stdc++.h>
#include "cave.h"
using namespace std;
typedef long long ll;
const int MAXN = 5e3 + 5;
int ktory[MAXN];
int good[MAXN];
int query(int a, int b, int kt, int n){
bool q[n];
for(int i = 0; i < n; ++i){
if(good[i] != -1){
q[i] = good[i];
}
else{
if(i >= a and i <= b){
q[i] = kt;
}
else{
q[i] = (kt ^ 1);
}
}
}
return tryCombination(q);
}
void obl(int i, int n){
bool q[n];