Submission #1216655

#TimeUsernameProblemLanguageResultExecution timeMemory
1216655lizi14Cave (IOI13_cave)C++20
Compilation error
0 ms0 KiB
#include "cave.h" using namespace std; void exploreCave(int N) { int x[N]; int s[N]; fill(s,s+N,0); fill(x,x+N,0); int an=0; while(true){ int a=tryCombination(x[N]); if(a==-1){ break; } if(a>an){ for(int i=0; i<an; i++){ if(s[i]!=x[i]){ s[i]=x[i]; } } a=an-1; } else x[a]=1-x[a]; } return 0; }

Compilation message (stderr)

cave.cpp:11:35: warning: `\U0000037e' is not in NFC [-Wnormalized=]
   11 |         int a=tryCombination(x[N]);
      |                                   ^
cave.cpp: In function 'void exploreCave(int)':
cave.cpp:7:5: error: 'fill' was not declared in this scope
    7 |     fill(s,s+N,0);
      |     ^~~~
cave.cpp:11:33: error: invalid conversion from 'int' to 'int*' [-fpermissive]
   11 |         int a=tryCombination(x[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:11:35: error: expected ',' or ';' before '\U0000037e'
   11 |         int a=tryCombination(x[N]);
      |                                   ^
cave.cpp:26:12: error: return-statement with a value, in function returning 'void' [-fpermissive]
   26 |     return 0;
      |            ^