# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
173184 | songc | Rope (JOI17_rope) | C++14 | 791 ms | 41484 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;
typedef long long LL;
typedef pair<int,int> pii;
int N, M;
int A[1010101];
int Ecnt[1010101], E[1010101], EM, ES, EN=1;
int Ocnt[1010101], O[1010101], OM, OS, ON=1;
pii Ec[1010101], Oc[1010101];
int Eup(int k, int v){
Ecnt[E[k]]--;
if (v < 0 ){
if (!Ecnt[EM]) EM--;
else if (EM == ES && Ecnt[EM]<=1) ES--;
else if (!Ecnt[ES]) ES--;
}
E[k] += v;
if (v > 0){
if (EM < E[k]) EM = E[k];
else if (ES < E[k]) ES = E[k];
}
Ecnt[E[k]]++;
}
int Oup(int k, int v){
Ocnt[O[k]]--;
if (v < 0){
if (!Ocnt[OM]) OM--;
Compilation message (stderr)
# | 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... |