# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
344731 | _ani | UFO (IZhO14_ufo) | C++17 | 441 ms | 177136 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
using ll = long long;
const int inf = 1'000'000'000;
vector<vector<ll>> a;
vector<vector<ll>> tr, tc;
void Buildr(int v, int vl, int vr, int i) {//checked
if (vl == vr) {
tr[i][v] = a[i][vl];
return;
}
int m = (vl + vr) / 2;
Buildr(v * 2, vl, m, i);
Buildr(v * 2 + 1, m + 1, vr, i);
tr[i][v] = max(tr[i][v * 2], tr[i][v * 2 + 1]);
}
void Buildc(int v, int vl, int vr, int j) {//checked
if (vl == vr) {
tc[j][v] = a[vl][j];
return;
}
int m = (vl + vr) / 2;
Buildc(v * 2, vl, m, j);
Buildc(v * 2 + 1, m + 1, vr, j);
tc[j][v] = max(tc[j][v * 2], tc[j][v * 2 + 1]);
}
int RFirstGreater(int v, int vl, int vr, int l, int r, int i, ll k) {//checked
if (vl == vr) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |