# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
522278 | andreiomd | Employment (JOI16_employment) | C++11 | 596 ms | 29276 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 <iostream>
#include <algorithm>
using namespace std;
const int NMAX = 4e5 + 2;
class SegmentTree
{
long long Aint[4 * NMAX], Lazy[4 * NMAX];
private:
void Propag(int nod, int a, int b)
{
if(a == b)
return;
if(Lazy[nod] == 0)
return;
int mid = (a + b) >> 1;
Aint[2 * nod] += 1LL * Lazy[nod] * (mid - a + 1);
Aint[2 * nod + 1] += 1LL * Lazy[nod] * (b - mid);
Lazy[2 * nod] += Lazy[nod];
Lazy[2 * nod + 1] += Lazy[nod];
Lazy[nod] = 0;
return;
}
public:
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |