Submission #133851

# Submission time Handle Problem Language Result Execution time Memory
133851 2019-07-21T14:31:58 Z arthurconmy Wombats (IOI13_wombats) C++14
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>

#ifndef ARTHUR_LOCAL
	#include "wombats.h"
#endif

using namespace std;

int r=-1;
int c=-1;
int H[5000][200];
int V[5000][200];
int ans=0;

void init(int r_raw, int c_raw, int H_raw[5000][200], int V_raw[5000][200])
{
	r=r_raw;
	c=c_raw;

	H=H_raw;
	C=C_raw;

	for(int i=0; i<5000; i++)
	{
		ans += V[i][0];
	}
}

void changeH(int p, int q, int w)
{
	return;
}

void changeV(int p, int q, int w)
{
	ans += w - H[p][q];
	H[p][q]=w;
}

int escape(int v1, int v2)
{
	return ans;
}

Compilation message

grader.c: In function 'int main()':
grader.c:15:6: warning: variable 'res' set but not used [-Wunused-but-set-variable]
  int res;
      ^~~
wombats.cpp: In function 'void init(int, int, int (*)[200], int (*)[200])':
wombats.cpp:20:4: error: incompatible types in assignment of 'int (*)[200]' to 'int [5000][200]'
  H=H_raw;
    ^~~~~
wombats.cpp:21:2: error: 'C' was not declared in this scope
  C=C_raw;
  ^
wombats.cpp:21:4: error: 'C_raw' was not declared in this scope
  C=C_raw;
    ^~~~~
wombats.cpp:21:4: note: suggested alternative: 'r_raw'
  C=C_raw;
    ^~~~~
    r_raw