This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <game.h>
#include <bits/stdc++.h>
using namespace std;
long long gcd(long long X, long long Y) {
long long tmp;
while (X != Y && Y != 0) {
tmp = X;
X = Y;
Y = tmp % Y;
}
return X;
}
long long a[102][102];
void update(int row, int col, long long val) {
a[row][col] = val;
}
long long calculate(int r1, int c1, int r2, int c2) {
long long ans = 0;
for(long long i = r1; i <= r2; i++) {
for(long long j = c1; j <= c2; j++) {
ans = gcd(ans, a[i][j]);
}
}
return ans;
}
void init(int R, int C) {
for(int i = 0; i <= R; i++) {
for(int j = 0; j <= C; j++) {
a[i][j] = 0;
}
}
}
Compilation message (stderr)
grader.c: In function 'int main()':
grader.c:18:6: warning: variable 'res' set but not used [-Wunused-but-set-variable]
int res;
^~~
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |