# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
973552 | vjudge1 | Zoltan (COCI16_zoltan) | C++17 | 185 ms | 20560 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>
#define int long long
using namespace std;
int mod=1e9+7,CC;
struct info{
int val,way;
info(){val=0,way=0;}
info operator+=(info b){
if(b.val>val)
*this=b;
else if(b.val==val)
way=(way+b.way)%mod;
return *this;
}
void print(){
cout<<val<<' '<<way<<'\n';
}
}T1[200100],T2[200100];
info query(int x,info T[]){
info b=info();
b.way++;
for(;x;x-=x&-x)
b+=T[x];
return b;
}
void update(int x,info T[],info upd){
for(;x<=CC;x+=x&-x)
T[x]+=upd;
}
int arr[200100];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |