# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
815252 | acatmeowmeow | 사다리꼴 (balkan11_trapezoid) | C++11 | 73 ms | 4528 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |