이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "game.h"
#include <bits/stdc++.h>
using namespace std;
long long nzd(long long a, long long b) {
if (b==0) return a;
return nzd(b, a%b);
}
vector<vector<long long> > mat;
void init(int r, int c) {
mat.resize(r, vector<long long> (c, 0));
}
void update(int r, int c, long long br) {
mat[r][c]=br;
}
long long calculate(int x1, int y1, int x2, int y2) {
long long rez=mat[x1][y1];
for (int i=x1;i<=x2;i++)
for (int j=y1;j<=y2;j++)
rez=nzd(rez, mat[i][j]);
return rez;
}
# | 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... |