# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
348952 | parsabahrami | trapezoid (balkan11_trapezoid) | C++17 | 168 ms | 24152 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
// Call my Name and Save me from The Dark
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int, int> pii;
#define SZ(x) (int) x.size()
#define F first
#define S second
const int N = 2e5 + 10, MOD = 30013;
int dp[N], pd[N], A[N], B[N], C[N], D[N], n; pii fen[N];
vector<int> vec[2][N], cl, cr;
pii operator+(pii x, pii y) {
if (x.F > y.F) return x;
if (x.F < y.F) return y;
return {x.F, (x.S + y.S) % MOD};
}
void upd(int pos, pii x) {
for (pos++; pos < N; pos += pos & -pos) fen[pos] = fen[pos] + x;
}
pii get(int pos) {
pii ret = {0, 0};
for (pos++; pos; pos -= pos & -pos) ret = ret + fen[pos];
return ret;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |