답안 #1067773

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1067773 2024-08-21T03:03:46 Z sleepntsheep 웜뱃 (IOI13_wombats) C++17
컴파일 오류
0 ms 0 KB
#include "wombats.h"
#include <vector>
using namespace std;

template <typename T>
using ve = vector<T>;


int r, c, at[9999];
int sum = 0;


void changeH(int P, int Q, int W) {
	/* ... */
}

void changeV(int P, int Q, int W) {
	if (c == 1) {
		sum += W - at[P];
		at[P] = W;
	}
	/* ... */
}

void init(int R, int C, int H[5000][200], int V[5000][200]) {
	r = R, c = C;
	for (int i = 0; i < r; ++i) changeV(V[i][0]);
}

int escape(int V1, int V2) {
	return sum;
}

Compilation message

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: In function 'void init(int, int, int (*)[200], int (*)[200])':
wombats.cpp:27:45: error: too few arguments to function 'void changeV(int, int, int)'
   27 |  for (int i = 0; i < r; ++i) changeV(V[i][0]);
      |                                             ^
wombats.cpp:17:6: note: declared here
   17 | void changeV(int P, int Q, int W) {
      |      ^~~~~~~