# |
제출 시각 |
아이디 |
문제 |
언어 |
결과 |
실행 시간 |
메모리 |
29890 |
2017-07-21T10:09:45 Z |
kavun |
게임 (IOI13_game) |
C++14 |
|
13000 ms |
197332 KB |
#include "game.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int r,c;
ll table[5000][5000];
long long gcd2(long long X, long long Y) {
long long tmp;
while (X != Y && Y != 0) {
tmp = X;
X = Y;
Y = tmp % Y;
}
return X;
}
void init(int R, int C) {
r = R;
c = C;
}
void update(int P, int Q, long long K) {
table[P][Q] = K;
}
long long calculate(int P, int Q, int U, int V) {
ll gcd = 0;
for(int i = P; i <= U; i++)
for(int j = Q; j <= V; j++)
gcd = gcd2(gcd,table[i][j]);
return 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 |
0 ms |
197332 KB |
Output is correct |
2 |
Correct |
0 ms |
197332 KB |
Output is correct |
3 |
Correct |
0 ms |
197332 KB |
Output is correct |
4 |
Correct |
0 ms |
197332 KB |
Output is correct |
5 |
Correct |
0 ms |
197332 KB |
Output is correct |
6 |
Correct |
0 ms |
197332 KB |
Output is correct |
7 |
Correct |
0 ms |
197332 KB |
Output is correct |
8 |
Correct |
0 ms |
197332 KB |
Output is correct |
9 |
Correct |
0 ms |
197332 KB |
Output is correct |
10 |
Correct |
0 ms |
197332 KB |
Output is correct |
11 |
Correct |
0 ms |
197332 KB |
Output is correct |
12 |
Correct |
0 ms |
197332 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
197332 KB |
Output is correct |
2 |
Correct |
0 ms |
197332 KB |
Output is correct |
3 |
Correct |
0 ms |
197332 KB |
Output is correct |
4 |
Execution timed out |
13000 ms |
197332 KB |
Execution timed out |
5 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
197332 KB |
Output is correct |
2 |
Correct |
0 ms |
197332 KB |
Output is correct |
3 |
Correct |
0 ms |
197332 KB |
Output is correct |
4 |
Correct |
0 ms |
197332 KB |
Output is correct |
5 |
Correct |
0 ms |
197332 KB |
Output is correct |
6 |
Correct |
0 ms |
197332 KB |
Output is correct |
7 |
Correct |
0 ms |
197332 KB |
Output is correct |
8 |
Correct |
0 ms |
197332 KB |
Output is correct |
9 |
Correct |
0 ms |
197332 KB |
Output is correct |
10 |
Correct |
0 ms |
197332 KB |
Output is correct |
11 |
Correct |
0 ms |
197332 KB |
Output is correct |
12 |
Execution timed out |
13000 ms |
197332 KB |
Execution timed out |
13 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
197332 KB |
Output is correct |
2 |
Correct |
0 ms |
197332 KB |
Output is correct |
3 |
Correct |
0 ms |
197332 KB |
Output is correct |
4 |
Correct |
0 ms |
197332 KB |
Output is correct |
5 |
Correct |
0 ms |
197332 KB |
Output is correct |
6 |
Correct |
0 ms |
197332 KB |
Output is correct |
7 |
Correct |
0 ms |
197332 KB |
Output is correct |
8 |
Correct |
0 ms |
197332 KB |
Output is correct |
9 |
Correct |
0 ms |
197332 KB |
Output is correct |
10 |
Correct |
0 ms |
197332 KB |
Output is correct |
11 |
Correct |
0 ms |
197332 KB |
Output is correct |
12 |
Execution timed out |
13000 ms |
197332 KB |
Execution timed out |
13 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
197332 KB |
Output is correct |
2 |
Correct |
0 ms |
197332 KB |
Output is correct |
3 |
Correct |
0 ms |
197332 KB |
Output is correct |
4 |
Correct |
0 ms |
197332 KB |
Output is correct |
5 |
Correct |
0 ms |
197332 KB |
Output is correct |
6 |
Correct |
0 ms |
197332 KB |
Output is correct |
7 |
Correct |
0 ms |
197332 KB |
Output is correct |
8 |
Correct |
0 ms |
197332 KB |
Output is correct |
9 |
Correct |
0 ms |
197332 KB |
Output is correct |
10 |
Correct |
0 ms |
197332 KB |
Output is correct |
11 |
Correct |
0 ms |
197332 KB |
Output is correct |
12 |
Execution timed out |
13000 ms |
197332 KB |
Execution timed out |
13 |
Halted |
0 ms |
0 KB |
- |