# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
24077 | Mamnoon_Siam | 게임 (IOI13_game) | C++14 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <stdio.h>
#include <stdlib.h>
#include "game.h"
#define MAX_SIZE 1000000000
#define MAX_N 272000
int main() {
int R, C, N;
int P, Q, U, V;
long long K;
int i, type;
cin>>R>>C>>N;
init(R, C);
for (i = 0; i < N; i++) {
cin>>type;
if (type == 1) {
cin>>P>>Q>>K;
update(P, Q, K);
} else if (type == 2) {
cin>>P>>Q>>U>>V;
printf("%lld\n", calculate(P, Q, U, V));
}
}
return 0;
}