Submission #1216648

#TimeUsernameProblemLanguageResultExecution timeMemory
1216648nataliaaCave (IOI13_cave)C++20
Compilation error
0 ms0 KiB
#include "cave.h" #include<bits/stdc++.h> using namespace std; void exploreCave(int N) { int v[N]; int a[N] ={}; for(int i = 0; i < N; i++) v[i]= i; for(int i = 0; i < N; i++) { int k = tryCombination( a[N]) if(k>i) {i = k-1;} else { if(a[i]==0) a[i]=1; else a[i]=0; } } answer( a[N],v[N]); }

Compilation message (stderr)

cave.cpp:16:23: warning: `\U0000037e' is not in NFC [-Wnormalized=]
   16 |     answer( a[N],v[N]);
      |                       ^
cave.cpp: In function 'void exploreCave(int)':
cave.cpp:9:36: error: invalid conversion from 'int' to 'int*' [-fpermissive]
    9 |         int k = tryCombination( a[N])
      |                                 ~~~^
      |                                    |
      |                                    int
In file included from cave.cpp:1:
cave.h:8:24: note:   initializing argument 1 of 'int tryCombination(int*)'
    8 | int tryCombination(int S[]);
      |                    ~~~~^~~
cave.cpp:10:9: error: expected ',' or ';' before 'if'
   10 |         if(k>i) {i = k-1;}
      |         ^~
cave.cpp:11:9: error: 'else' without a previous 'if'
   11 |         else {
      |         ^~~~
cave.cpp:16:16: error: invalid conversion from 'int' to 'int*' [-fpermissive]
   16 |     answer( a[N],v[N]);
      |             ~~~^
      |                |
      |                int
In file included from cave.cpp:1:
cave.h:9:17: note:   initializing argument 1 of 'void answer(int*, int*)'
    9 | void answer(int S[], int D[]);
      |             ~~~~^~~
cave.cpp:16:21: error: invalid conversion from 'int' to 'int*' [-fpermissive]
   16 |     answer( a[N],v[N]);
      |                  ~~~^
      |                     |
      |                     int
In file included from cave.cpp:1:
cave.h:9:26: note:   initializing argument 2 of 'void answer(int*, int*)'
    9 | void answer(int S[], int D[]);
      |                      ~~~~^~~
cave.cpp:16:23: error: expected ';' before '\U0000037e'
   16 |     answer( a[N],v[N]);
      |                       ^
      |                       ;