# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
406166 | dvdg6566 | Worst Reporter 4 (JOI21_worst_reporter4) | C++14 | 12 ms | 5324 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pi;
typedef vector<ll> vi;
typedef vector<pi> vpi;
#define pb emplace_back
#define f first
#define s second
#define mp make_pair
#define SZ(x) (ll)x.size()
#define ALL(x) x.begin(),x.end()
#define lb lower_bound
#define ub upper_bound
const int MAXN = 200100;
const int MAXK = 19;
int p[MAXN];
int H[MAXN],C[MAXN];
int N;
vi V[MAXN];
vi roots;
ll ans;
ll dp1[MAXN];
ll calc(ll x,ll c){
ll r=0;
if(H[x]>=c)r=C[x];
for(auto v:V[x])r=max(r,calc(v,c));
return r;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |