# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
815252 | acatmeowmeow | trapezoid (balkan11_trapezoid) | C++11 | 73 ms | 4528 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.
#include <bits/stdc++.h>
using namespace std;
//#define int long long
const int N = 1e5, modulo = 30013;
int n, a[N + 5], b[N + 5], c[N + 5], d[N + 5];
pair<int, int> indx[N + 5], tree[2*N + 5], dp[N + 5];
vector<int> mp;
pair<int, int> combine(pair<int, int>&f, pair<int, int>&se) {
if (f.first == se.first) return {f.first, (f.second + se.second) % modulo};
else return f > se ? f : se;
}
void update(int k, pair<int, int> x) {
for (; k <= 2*n; k += k&-k) tree[k] = combine(tree[k], x);
}
pair<int, int> query(int k) {
pair<int, int> ans = {0, 0};
for (; k; k -= k&-k) ans = combine(ans, tree[k]);
return ans;
}
signed main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> n;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |