이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "game.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
typedef vector<pi> vpi;
typedef long double ld;
#define f first
#define s second
#define mp make_pair
#define bk back()
#define pb push_back
const ld PI = acos((ld)-1);
int MAXX = 1000000000;
int MAXY = 1000000000;
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;
}
ll val[105][105];
void init(int R, int C) {
}
void update(int P, int Q, long long K) {
//cout << "UPDATE " << P << " " << Q << " " << K << "\n";
val[P][Q] = K;
}
ll calculate(int lox, int loy, int hix, int hiy) {
ll res = 0;
for(int i = lox; i <= hix; i++){
for(int j = loy; j <= hiy; j++){
res = gcd2(res, val[i][j]);
}
}
//cout << "QUERY " << lox << " " << hix << " " << loy << " " << hiy << "\n";
return res;
}
컴파일 시 표준 에러 (stderr) 메시지
grader.c: In function 'int main()':
grader.c:18:6: warning: variable 'res' set but not used [-Wunused-but-set-variable]
18 | 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... |