Submission #917038

#TimeUsernameProblemLanguageResultExecution timeMemory
917038manishjha91Cave (IOI13_cave)C++17
Compilation error
0 ms0 KiB
#include "cave.h"
#include <bits/stdc++.h>

void exploreCave(int N) {
    /* ... */
    int a[N];
    memset(a,0,sizeof a);
    int d[N]
    for(int i=0; i<N; i++) d[i] = i;
    
    int i=tryComnination(a);
    while(i!=-1)
    {
    	a[i] ^=1;
    	i = tryCombination(a);
    }
    answer(a,d);
}

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:9:5: error: expected initializer before 'for'
    9 |     for(int i=0; i<N; i++) d[i] = i;
      |     ^~~
cave.cpp:9:18: error: 'i' was not declared in this scope
    9 |     for(int i=0; i<N; i++) d[i] = i;
      |                  ^
cave.cpp:11:11: error: 'tryComnination' was not declared in this scope; did you mean 'tryCombination'?
   11 |     int i=tryComnination(a);
      |           ^~~~~~~~~~~~~~
      |           tryCombination
cave.cpp:17:14: error: 'd' was not declared in this scope
   17 |     answer(a,d);
      |              ^