# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1165760 | fryingduc | Election (BOI18_election) | C++20 | 366 ms | 35820 KiB |
#include "bits/stdc++.h"
using namespace std;
#ifdef duc_debug
#include "bits/debug.h"
#else
#define debug(...)
#endif
const int maxn = 5e5 + 5;
const int LG = 20;
int n, q;
string s;
int pfx[maxn], res[maxn];
vector<pair<int, int>> que[maxn];
pair<int, int> tree[maxn << 2];
pair<int, int> operator + (const pair<int, int> &a, const pair<int, int> &b) {
if (b.first == 1e9) return a;
if (a.first == 1e9) return b;
return make_pair(min(a.first, a.second + b.first), a.second + b.second);
}
void update(int pos, int val, int ind = 1, int l = 1, int r = n) {
if (l == r) {
tree[ind] = make_pair(val, val);
return;
}
int mid = (l + r) >> 1;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |