이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "game.h"
#include<bits/stdc++.h>
using namespace std;
const int maxn=100+10;
long long all[maxn][maxn];
long long gcd(long long a,long long b){
if(a==0){
return b;
}
if(b==0){
return a;
}
return gcd(b,a%b);
}
void init(int R, int C) {
//hehe
}
void update(int P, int Q, long long K) {
all[P][Q]=K;
}
long long calculate(int P, int Q, int U, int V) {
long long now=0;
for(int i=P;i<=U;i++){
for(int j=Q;j<=V;j++){
now=gcd(now,all[i][j]);
}
}
return now;
}
# | 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... |