# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
96466 | KLPP | DEL13 (info1cup18_del13) | C++14 | 1082 ms | 2428 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<bits/stdc++.h>
using namespace std;
int n;
bool done;
bool possible[1000000];
void DFS(int mask){
if(possible[mask])return;
possible[mask]=true;
int arr[n];
for(int i=0;i<n;i++){
arr[i]=((mask&(1<<i))>0);
}
int prev[n];
int next[n];
prev[0]=-1;
for(int i=1;i<n;i++){
if(arr[i-1]==1)prev[i]=prev[i-1];
else prev[i]=i-1;
}
next[n-1]=n;
for(int i=n-2;i>-1;i--){
if(arr[i+1]==1)next[i]=next[i+1];
else next[i]=i+1;
}
/*for(int i=0;i<n;i++){
cout<<prev[i]<<" "<<next[i]<<endl;
}*/
for(int i=0;i<n;i++){
if(arr[i]==0 && prev[i]!=-1 && next[i]!=n){
# | 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... |