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;
int x , y , z ;
int w [ 14 ] [ 5000 ] ;
int F [ 5000 ] ;
void exploreCave(int N) {
for ( int i = 0 ; i < 14 ; i ++ ) {
for ( int j = 0 ; j < N ; j ++ ) {
if ( ( 1 << i ) & j ) w [ i ] [ j ] = 1 ;
}
}
for ( int i = 0 ; i < N ; i ++ ) {
x = 0 ;
y = tryCombination ( w [ 13 ] ) ;
if ( y == i ) z = 1 ;
else z = 0 ;
for ( int j = 0 ; j < 13 ; j ++ ) {
y = tryCombination ( w [ j ] ) ;
if ( y == i && z == 0 ) x += 1 << j ;
if ( y != i && z != 0 ) x += 1 << j ;
}
for ( int j = 0 ; j < 14 ; j ++ ) {
w [ j ] [ x ] = z ;
}
F [ x ] = i ;
}
answer ( w [ 0 ] , F ) ;
}
# | 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... |