답안 #29613

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
29613 2017-07-20T08:42:44 Z aybala 웜뱃 (IOI13_wombats) C++11
9 / 100
83 ms 17644 KB
#include "wombats.h"
#include<bits/stdc++.h>
#define fori(a,b,c) for(int a=b; a<c; a++)
#define ford(a,b,c) for(int a=b; a>=c; a++)
#define pb push_back
#define pq priority_queue
#define fi first
#define se second
#define pii pair<int,int>
#define mp make_pair
using namespace std;
int r,c,h[5000][200],v[5000][200];
int wom=0;

void init(int R, int C, int H[5000][200], int V[5000][200]) {
	r=R;
	c=C;
	fori(i,0,r){
		fori(j,0,c-1){
			h[i][j]=H[i][j];
			wom+=h[i][j];
		}
	}    
	
	fori(i,0,r-1){
		fori(j,0,c){
			v[i][j]=V[i][j];
			wom+=v[i][j];
		}
	}
}

void changeH(int P, int Q, int W) {
	wom-=h[P][Q];
	h[P][Q]=W;
	wom+=h[P][Q];
	
}

void changeV(int P, int Q, int W) {
    wom-=v[P][Q];
	v[P][Q]=W;
	wom+=v[P][Q];
}

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

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;
      ^
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 17644 KB Output is correct
2 Correct 3 ms 17644 KB Output is correct
3 Correct 83 ms 17644 KB Output is correct
4 Correct 0 ms 17644 KB Output is correct
5 Correct 0 ms 17644 KB Output is correct
6 Correct 0 ms 17644 KB Output is correct
7 Correct 0 ms 17644 KB Output is correct
8 Correct 0 ms 17644 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 17644 KB Output is correct
2 Correct 0 ms 17644 KB Output is correct
3 Correct 0 ms 17644 KB Output is correct
4 Incorrect 0 ms 17644 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 17644 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 17644 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 17644 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 17644 KB Output isn't correct
2 Halted 0 ms 0 KB -