답안 #134402

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
134402 2019-07-22T16:12:11 Z arthurconmy 게임 (IOI13_game) C++14
0 / 100
2 ms 376 KB
#include <bits/stdc++.h>
#ifndef ARTHUR_LOCAL
	#include "game.h"
#endif
using namespace std;
using ll=long long;

ll grid[100][100];
int r,c;

void init(int r_r, int c_r)
{
	r=r_r;
	c=c_r;
}

void update(int p, int q, ll k)
{
	grid[p][q]=k;
}

ll calculate(int p, int q, int u, int v)
{
	ll cur_gcd = 0;

	for(int i=p; i<=q; i++)
	{
		for(int j=u; j<=v; j++)
		{
			cur_gcd = __gcd(cur_gcd,grid[i][j]);
		}
	}

	return cur_gcd;
}

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;
      ^~~
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Incorrect 2 ms 376 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Incorrect 2 ms 252 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Incorrect 2 ms 376 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Incorrect 2 ms 376 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Incorrect 2 ms 376 KB Output isn't correct
3 Halted 0 ms 0 KB -