# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
360040 | keta_tsimakuridze | Construction of Highway (JOI18_construction) | C++14 | 1462 ms | 20844 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#define ll long long
#define f first
#define s second
using namespace std;
const int N=1e5+5;
int sz[N],par[N],lazy[4*N],ind[N],c[N],cur,idx,k,i,a[N],b[N],n,st[N],f[N],ch[N],s[N];
pair<int,int>d[N],tree[4*N];
vector<int>V[N];
void dfs(int u,int p){
sz[u]=1; par[u]=p;
for(int i=0;i<V[u].size();i++){
if(V[u][i]!=p) dfs(V[u][i],u),sz[u]+=sz[V[u][i]];
}
}
void update(int u,int start,int end,int l,int r,int val){
if(lazy[u]){
tree[u]={lazy[u],lazy[u]};
if(l!=r){
lazy[2*u]=lazy[u];
lazy[2*u+1]=lazy[u];
}
lazy[u]=0;
}
if(l>end || r<start) return;
if(start<=l && r<=end) {
tree[u]={val,val};
if(l!=r){
lazy[2*u]=val;
컴파일 시 표준 에러 (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... |