# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
99803 | MohamedAhmed0 | Cave (IOI13_cave) | C++14 | 440 ms | 640 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "cave.h"
#include <bits/stdc++.h>
using namespace std ;
const int MAX = 5005 ;
int s[MAX] , d[MAX] , arr[MAX] , last , done[MAX];
int now ;
bool check(int l , int mid)
{
for(int i = l ; i <= mid ; ++i)
{
if(done[i])
continue ;
s[i] = !s[i] ;
}
int x = tryCombination(s) ;
for(int i = l ; i <= mid ; ++i)
{
if(done[i])
continue;
s[i] = !s[i] ;
}
if(x > now || x == -1)
return 1 ;
return 0 ;
}
void exploreCave(int N)
Compilation message (stderr)
# | 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... |