Submission #24077

# Submission time Handle Problem Language Result Execution time Memory
24077 2017-05-30T11:17:16 Z Mamnoon_Siam Game (IOI13_game) C++14
Compilation error
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;
     ^