Submission #125494

# Submission time Handle Problem Language Result Execution time Memory
125494 2019-07-05T13:32:58 Z MoNsTeR_CuBe Wombats (IOI13_wombats) C++17
0 / 100
17 ms 15992 KB
#include "wombats.h"
#include <bits/stdc++.h>
using namespace std;

int row, col;

int sum = 0;

int h[5000][200];
int v[5000][200];

void init(int R, int C, int H[5000][200], int V[5000][200]) {
    row = R;
    col = C;
    
	for(int i = 0; i < 5000; i++){
		for(int j = 0; j < 200; j++){
			h[i][j] = H[i][j];
			v[i][j] = V[i][j];
		}
	}
    
    if(C == 1){
		for(int i = 0; i < row-1; i++){
			col += V[i][0];
		}
		return;
	}    
    
}

void changeH(int P, int Q, int W) {
    if(col == 1){
		sum += W - h[P][Q];
		h[P][Q] = W;
		return;
	}
}

void changeV(int P, int Q, int W) {
    if(col == 1){
		sum += W - v[P][Q];
		v[P][Q] = W;
		return;
	}
}

int escape(int V1, int V2) {
    if(col == 1){
		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]
  int res;
      ^~~
wombats.cpp: In function 'int escape(int, int)':
wombats.cpp:52:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
# Verdict Execution time Memory Grader output
1 Correct 14 ms 12024 KB Output is correct
2 Incorrect 14 ms 12024 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 12 ms 8184 KB Output is correct
2 Incorrect 12 ms 8184 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 14 ms 8312 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 17 ms 15992 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 14 ms 8312 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 14 ms 8312 KB Output isn't correct
2 Halted 0 ms 0 KB -