# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
375707 | vot808 | 게임 (IOI13_game) | C++17 | 13095 ms | 3552 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "bits/stdc++.h"
#include "game.h"
#ifdef mlocal
#include "grader.c"
#endif
using namespace std;
#define for_(i, s, e) for (int i = s; i < (int) e; i++)
#define for__(i, s, e) for (ll i = s; i < e; i++)
typedef long long ll;
typedef vector<int> vi;
typedef array<int, 2> ii;
#define endl '\n'
const int MXU = 22000;
ll updates[MXU][3];
int cu = 0;
map<ii, ll> mp;
void init(int R, int C) {
/* ... */
}
void update(int P, int Q, long long K) {
updates[cu][0] = P, updates[cu][1] = Q, updates[cu][2] = K;
cu++;
}
long long calculate(int P, int Q, int U, int V) {
mp.clear();
ll g = 0;
for_(i, 0, cu) if (updates[i][0] >= P and updates[i][1] >= Q and updates[i][0] <= U and updates[i][1] <= V) mp[{updates[i][0], updates[i][1]}] = updates[i][2];
for (auto &v: mp) {
if (g == 0) g = v.second;
else g = __gcd(g, v.second);
}
return g;
}
컴파일 시 표준 에러 (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... |