Submission #986709

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9867092024-05-21 04:37:56WongYiKaiSeats (IOI18_seats)C++14
31 / 100
3001 ms262144 KiB
#include "seats.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll maxn = 1100005;
pair<ll,ll> t[maxn*4];
ll lazy[maxn*4];
ll h,w,n;
vector<ll> c,r;
map<pair<ll,ll>,ll> pos;
void build(ll a[], ll tl, ll tr, ll v){
if (tl==tr){
t[v].first = a[tl];
t[v].second = 1;
}
else{
ll tm = (tl+tr)>>1;
build(a,tl,tm,v*2);
build(a,tm+1,tr,v*2+1);
if (t[v*2].first==t[v*2+1].first){
t[v].first = t[v*2].first;
t[v].second = t[v*2].second+t[v*2+1].second;
}
else if (t[v*2].first>t[v*2+1].first){
t[v].first = t[v*2+1].first;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...