# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
65551 | red1108 | 조화행렬 (KOI18_matrix) | C++17 | 2309 ms | 314204 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;
struct in{
int x, y,z;
}input[200010];
int n, k,si=1,top=0;
set<pair<int,int> > seg[530000];
pair<int,int> er[200010];
int getmax(int cur, int l, int r, int s, int e, int zz)
{
if(l>r||r<s||e<l) return 0;
if(s<=l&&r<=e)
{
auto it=seg[cur].lower_bound(pair<int,int>{zz,1000000});
if(it==seg[cur].begin()) return 0;
it--;
return -(*it).second;
}
return max(getmax(cur*2,l,(l+r)/2,s,e,zz),getmax(cur*2+1,(l+r)/2+1,r,s,e,zz));
}
void gang(int pos, int curz, int put)
{
pos=pos+si-1;
while(pos)
{
auto it=seg[pos].lower_bound(pair<int,int>{curz,-put});
if(it!=seg[pos].begin())
{
auto tmp=it;
it--;
Compilation message (stderr)
# | 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... |