# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1090288 |
2024-09-18T07:30:59 Z |
vjudge1 |
Game (IOI13_game) |
C++17 |
|
1 ms |
348 KB |
#include "game.h"
#include <vector>
using namespace std;
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;
}
vector <vector <int>> matrix;
void init(int R, int C) {
matrix.assign(R, vector<int>(C, 0));
}
void update(int P, int Q, long long K) {
matrix[P][Q] = K;
}
long long calculate(int P, int Q, int U, int V) {
int r = 0;
for (int i = P; i <= U; i++) for (int j = Q; j <= V; j++) r = gcd2(r, matrix[i][j]);
return r;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |