# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1167769 | Dedibeat | Cave (IOI13_cave) | C++20 | 1 ms | 576 KiB |
#include "cave.h"
#include<bits/stdc++.h>
#define pb push_back
#define eb emplace_back
#define F first
#define S second
#define endl '\n'
#define all(x) (x).begin(), (x).end()
#define put(x) cout << (x) << '\n'
using namespace std;
using ll = long long;
void solve(int l, int r, vector<int> pos, int S[], int D[], int N){
if(l > r) return;
if(l == r){
if(tryCombination(S) == l) S[pos[0]] ^= 1;
return;
}
for(int i : pos){
S[i] = rand() % 2;
}
int pivot = tryCombination(S);
if(pivot == -1){
return;
}
vector<int> lo, hi;
int s_pivot = -1;
for(int i : pos){
S[i] ^= 1;
int res = tryCombination(S);
if(res < pivot) lo.push_back(i);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |