# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
980515 | AlperenT_ | Sličnost (COI23_slicnost) | C++17 | 1138 ms | 395896 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>
#pragma GCC optimize("O3,unroll-loops")
#define pb push_back
#define F first
#define S second
#define all(a) a.begin(),a.end()
#define pii pair <int,int>
#define PII pair<pii , pii>
#define ld long double
#define ll long long
#define sz(v) (int)v.size()
#define rep(i , a , b) for(int i=a;i <= b;i++)
#define per(i , a , b) for(int i=a;i >= b;i--)
using namespace std ;
const int maxn = 1e5 +10 , N = 1e5 +1 , maxq = 202 , inf = 1e9 , maxk = 2022 , mod =1e9+7 ;
struct node{
int mx, t, s , l , r ;
node(){
mx = s = l = r= t =0 ;
}
};node nw ;
node seg[200*maxn];
void mrg(int p){
int l = seg[p].l , r= seg[p].r ;
seg[p].s = seg[l].s + seg[r].s ;
seg[p].mx = max(seg[l].mx , seg[l].s + seg[r].mx) ;
if(seg[p].mx == seg[l].mx)seg[p].t += seg[l].t ;
if(seg[p].mx == seg[l].s + seg[r].mx)seg[p].t += seg[r].t ;
}
int c =1 ,root[maxn] , p[maxn] , pos[maxn] , n , k , q ;
# | 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... |