Submission #962091

#TimeUsernameProblemLanguageResultExecution timeMemory
962091NValchanovWombats (IOI13_wombats)C++17
Compilation error
0 ms0 KiB
#include "wombats.h" const long long int MAXN = 5e3 + 10; const long long int MAXM = 2e2 + 10; long long int n,m; long long int hor[MAXN][MAXM]; long long int ver[MAXN][MAXM] long long int pref[MAXN]; long long int ans_m1; void init_m1() { for(int i = 1; i < n; i++) { ans_m1 += ver[i][1]; } } void init(int R, int C, int H[5000][200], int V[5000][200]) { n = R; m = C; for(int i = 0; i < n - 1; i++) { for(int j = 0; j < m - 1; j++) { ver[i + 1][j + 1] = V[i][j]; hor[i + 1][j + 1] = H[i][j]; } } if(m == 1) init_m1(); } void changeH(int x, int y, int w) /// change path from x;y to x;y + 1 { assert(false); } void changeV(int x, int y, int w) /// change path from x;y to x + 1;y { long long int new_change = w - ver[x][y]; ans_m1 += new_change; ver[x][y] = w; } int escape(int V1, int V2) { if(m == 1) return ans_m1; }

Compilation message (stderr)

grader.c: In function 'int main()':
grader.c:15:6: warning: variable 'res' set but not used [-Wunused-but-set-variable]
   15 |  int res;
      |      ^~~
wombats.cpp:9:1: error: expected initializer before 'long'
    9 | long long int pref[MAXN];
      | ^~~~
wombats.cpp: In function 'void init_m1()':
wombats.cpp:17:19: error: 'ver' was not declared in this scope
   17 |         ans_m1 += ver[i][1];
      |                   ^~~
wombats.cpp: In function 'void init(int, int, int (*)[200], int (*)[200])':
wombats.cpp:30:13: error: 'ver' was not declared in this scope
   30 |             ver[i + 1][j + 1] = V[i][j];
      |             ^~~
wombats.cpp: In function 'void changeH(int, int, int)':
wombats.cpp:41:5: error: 'assert' was not declared in this scope
   41 |     assert(false);
      |     ^~~~~~
wombats.cpp:2:1: note: 'assert' is defined in header '<cassert>'; did you forget to '#include <cassert>'?
    1 | #include "wombats.h"
  +++ |+#include <cassert>
    2 | 
wombats.cpp: In function 'void changeV(int, int, int)':
wombats.cpp:46:36: error: 'ver' was not declared in this scope
   46 |     long long int new_change = w - ver[x][y];
      |                                    ^~~
wombats.cpp: In function 'int escape(int, int)':
wombats.cpp:55:1: warning: control reaches end of non-void function [-Wreturn-type]
   55 | }
      | ^