# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
222969 | dolphingarlic | 사다리꼴 (balkan11_trapezoid) | C++14 | 154 ms | 10104 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define FOR(i, x, y) for (int i = x; i < y; i++)
typedef long long ll;
using namespace std;
const int MOD = 30013;
struct Trapezoid {
int x1, x2, y1, y2;
} traps[100001];
int n, top[200001], bottom[200001];
int g_len[200001], g_num[200001];
int l_len[200001], l_num[200001];
pair<int, int> events[200001];
void update(int pos, int len, int num) {
for (; pos < 2 * n; pos += (pos & (-pos))) {
if (g_len[pos] == len) {
g_num[pos] = (g_num[pos] + num) % MOD;
} else if (g_len[pos] < len) {
g_len[pos] = len;
g_num[pos] = num;
}
}
}
pair<int, int> query(int pos) {
pair<int, int> ans;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |