답안 #24077

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
24077 2017-05-30T11:17:16 Z Mamnoon_Siam 게임 (IOI13_game) C++14
컴파일 오류
0 ms 0 KB
#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;
}

Compilation message

grader.c: In function 'int main()':
grader.c:18:6: warning: variable 'res' set but not used [-Wunused-but-set-variable]
  int res;
      ^
game.cpp: In function 'int main()':
game.cpp:13:5: error: 'cin' was not declared in this scope
     cin>>R>>C>>N;
     ^