Submission #1143227

#TimeUsernameProblemLanguageResultExecution timeMemory
1143227victor_cWalk (POI13_spa)C++20
Compilation error
0 ms0 KiB
#include <iostream> #include <algorithm> #include <vector> using namespace std; int n, m; char x[1<<24], w; void red(int &x) { x=0; for(int i=0; i<n; i++) { cin>>w; x=x*2+w-'0'; } } void df(int v) { x[v]=2; for(int i=0; i<n; i++) { if(x[v^(1<<i)]==0) df(v^(1<<i)); } } int main() { int a, b; cin>>n>>m; red(a); red(b); for(int j=0; j<m; j++) { red(k); x[k]=1; } if(a==b) { cout<<"TAK"; return 0; } df(a); if(x[b]==2) cout<<"TAK"; else cout<<"NIE"; } return 0;

Compilation message (stderr)

spa.cpp: In function 'int main()':
spa.cpp:35:13: error: 'k' was not declared in this scope
   35 |         red(k);
      |             ^
spa.cpp: At global scope:
spa.cpp:48:1: error: expected unqualified-id before 'return'
   48 | return 0;
      | ^~~~~~