Submission #291382

#TimeUsernameProblemLanguageResultExecution timeMemory
291382BadrangiikhCave (IOI13_cave)C++14
100 / 100
248 ms808 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...