Submission #291381

#TimeUsernameProblemLanguageResultExecution timeMemory
291381BadrangiikhCave (IOI13_cave)C++14
Compilation error
0 ms0 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 ) ; }

Compilation message (stderr)

cave.cpp:7:1: error: expected initializer before 'int'
    7 | int F [ 5000 ] ;
      | ^~~
cave.cpp: In function 'void exploreCave(int)':
cave.cpp:12:35: error: 'w' was not declared in this scope
   12 |             if ( ( 1 << i ) & j ) w [ i ] [ j ] = 1 ;
      |                                   ^
cave.cpp:17:30: error: 'w' was not declared in this scope
   17 |         y = tryCombination ( w [ 13 ] ) ;
      |                              ^
cave.cpp:28:9: error: 'F' was not declared in this scope
   28 |         F [ x ] = i ;
      |         ^
cave.cpp:30:14: error: 'w' was not declared in this scope
   30 |     answer ( w [ 0 ] , F ) ;
      |              ^
cave.cpp:30:24: error: 'F' was not declared in this scope
   30 |     answer ( w [ 0 ] , F ) ;
      |                        ^