# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
997382 | Ghetto | Hiring (IOI09_hiring) | C++17 | 581 ms | 65536 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define int long long
using ldouble = long double;
using pli = pair<ldouble, int>;
const int MAX_N = 5e5 + 5, MAX_S = 2e4 + 5;
int n, m;
int p[MAX_N], s[MAX_N];
pli a[MAX_N];
struct Node {
int count, sum;
Node operator+(Node other) { return {count + other.count, sum + other.sum}; };
};
Node st[4 * MAX_S];
void update(int i, int u = 1, int lo = 1, int hi = MAX_S) {
if (i < lo || hi < i) return;
if (lo == hi) { st[u] = {st[u].count + 1, st[u].sum + i}; return; };
int mid = (lo + hi) / 2;
update(i, 2 * u, lo, mid), update(i, 2 * u + 1, mid + 1, hi);
st[u] = st[2 * u] + st[2 * u + 1];
}
Node query(int l, int r, int u = 1, int lo = 1, int hi = MAX_S) {
if (r < lo || hi < l) return {0, 0};
if (l <= lo && hi <= r) return st[u];
int mid = (lo + hi) / 2;
return query(l, r, 2 * u, lo, mid) + query(l, r, 2 * u + 1, mid + 1, hi);
}
int walk(ldouble x, int u = 1, int lo = 1, int hi = MAX_S) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |