# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1036551 | kunzaZa183 | Hiring (IOI09_hiring) | C++17 | 487 ms | 65536 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 double db = 1e-5;
const int maxn = 500001;
int orig[maxn], quality[maxn];
double seg[maxn * 4], adjusted[maxn];
int segppl[maxn * 4];
void update(int curin, int curl, int curr, int in, double val, int ppl) {
if (in < curl || curr < in) return;
if (curl == curr) {
seg[curin] = val;
segppl[curin] = ppl;
return;
}
update(curin * 2 + 1, curl, (curl + curr) / 2, in, val, ppl);
update(curin * 2 + 2, (curl + curr) / 2 + 1, curr, in, val, ppl);
seg[curin] = seg[curin * 2 + 1] + seg[curin * 2 + 2];
segppl[curin] = segppl[curin * 2 + 1] + segppl[curin * 2 + 2];
}
struct kun {
int orderin, rightmost, sumprice, numofppl;
kun() {
orderin = 0, rightmost = -1, sumprice = 0, numofppl = 0;
}
};
void query(int curin, int curl, int curr, double val, kun& tmp) {
if (val >= seg[curin] - db) {
tmp.rightmost = max(tmp.rightmost, curr);
tmp.sumprice += seg[curin];
# | 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... |