제출 #1212211

#제출 시각아이디문제언어결과실행 시간메모리
1212211LIAGondola (IOI14_gondola)C++17
컴파일 에러
0 ms0 KiB
int replacement(int n, int gondolaSeq[], int replacementSeq[]){ vb vis(250001); ll mx =0 ; ll cnt = 0; loop(i,0,n) { vis[gondolaSeq[i]] = 1; mx = max(mx, (ll)gondolaSeq[i]); } vll rep; loop(i,1, mx+1) { if (!vis[i]) { rep.push_back(i); cnt++; } } sort(all(rep)); loop(i,0,rep.size()) replacementSeq[i] = rep[i]; return cnt; } //----------------------

컴파일 시 표준 에러 (stderr) 메시지

gondola.cpp: In function 'int replacement(int, int*, int*)':
gondola.cpp:3:3: error: 'vb' was not declared in this scope
    3 |   vb vis(250001);
      |   ^~
gondola.cpp:4:3: error: 'll' was not declared in this scope
    4 |   ll mx =0 ;
      |   ^~
gondola.cpp:5:5: error: expected ';' before 'cnt'
    5 |   ll cnt = 0;
      |     ^~~~
      |     ;
gondola.cpp:6:8: error: 'i' was not declared in this scope
    6 |   loop(i,0,n) {
      |        ^
gondola.cpp:6:3: error: 'loop' was not declared in this scope
    6 |   loop(i,0,n) {
      |   ^~~~
gondola.cpp:10:3: error: 'vll' was not declared in this scope
   10 |   vll rep;
      |   ^~~
gondola.cpp:11:13: error: 'mx' was not declared in this scope
   11 |   loop(i,1, mx+1) {
      |             ^~
gondola.cpp:17:12: error: 'rep' was not declared in this scope
   17 |   sort(all(rep));
      |            ^~~
gondola.cpp:17:8: error: 'all' was not declared in this scope
   17 |   sort(all(rep));
      |        ^~~
gondola.cpp:17:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   17 |   sort(all(rep));
      |   ^~~~
      |   short
gondola.cpp:19:10: error: 'cnt' was not declared in this scope; did you mean 'int'?
   19 |   return cnt;
      |          ^~~
      |          int