답안 #125495

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
125495 2019-07-05T13:34:02 Z MoNsTeR_CuBe 웜뱃 (IOI13_wombats) C++17
9 / 100
86 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++){
			sum += 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]
 }
 ^
# 결과 실행 시간 메모리 Grader output
1 Correct 18 ms 12024 KB Output is correct
2 Correct 18 ms 12024 KB Output is correct
3 Correct 86 ms 14928 KB Output is correct
4 Correct 15 ms 12152 KB Output is correct
5 Correct 14 ms 12152 KB Output is correct
6 Correct 12 ms 8184 KB Output is correct
7 Correct 12 ms 8184 KB Output is correct
8 Correct 13 ms 8184 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 8184 KB Output is correct
2 Correct 11 ms 8184 KB Output is correct
3 Correct 12 ms 8184 KB Output is correct
4 Incorrect 12 ms 8184 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 14 ms 8312 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 17 ms 15992 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 14 ms 8312 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 14 ms 8312 KB Output isn't correct
2 Halted 0 ms 0 KB -