| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 240695 | aryan12 | Game (IOI13_game) | C++17 | 6 ms | 640 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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;
}
}
}
/*int main() {
int x, y, n;
cin >> x >> y >> n;
init(x, y);
while(n--) {
int com;
cin >> com;
if(com == 1) {
int r, c;
long long val;
cin >> r >> c >> val;
update(r, c, val);
}
else {
int a, b, c, d;
cin >> a >> b >> c >> d;
cout << calculate(a, b, c, d) << endl;
}
}
}*/
컴파일 시 표준 에러 (stderr) 메시지
| # | 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... | ||||
