Submission #446631

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4466312021-07-22 21:35:44ritul_kr_singhMeetings 2 (JOI21_meetings2)C++17
100 / 100
2637 ms27272 KiB
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define sp << ' ' <<
#define nl << '\n'
const int LIM = 2e5+2, INF = 1e9;
template<class T> struct SegmentTree{
const T ID = -INF;
int n, i; vector<T> a;
SegmentTree(int N) : a((n=N)*2, ID) {}
SegmentTree& operator[](int j){ i=j+n; return *this; }
void operator=(T v){
for(a[i]=v; i/=2; ) a[i] = max(a[2*i], a[2*i+1]); }
int operator()(int l, int r){
T x = ID;
for(l+=n, r+=n+1; l<r; l/=2, r/=2){
if(l & 1) x = max(x, a[l++]);
if(r & 1) x = max(x, a[--r]);
}
return x;
}
};
int n, ans[LIM], s[LIM], mxSz;
vector<int> g[LIM];
bool r[LIM], update;
SegmentTree<int> st(LIM);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...