# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
52045 | Adhyyan1252 | Zoltan (COCI16_zoltan) | C++11 | 1060 ms | 24052 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, ll> ii;
#define LMAX 200005
const ll mod = 1000000007;
int n;
vector<int> a;
int unum = 1;
void compress(){
map<int, int> comp;
for(int i = 0; i < a.size(); i++){
comp.insert({a[i], -1});
}
for(auto it = comp.begin(); it != comp.end(); it++){
it->second = unum++;
}
for(int i = 0; i < a.size(); i++){
a[i] = comp[a[i]];
}
}
ii merge(ii a, const ii &b){
if(a.first > b.first){
return a;
}else if(b.first > a.first){
return b;
}else{
a.second = (a.second + b.second);
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |