# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1010331 | AdamGS | Worst Reporter 4 (JOI21_worst_reporter4) | C++17 | 217 ms | 58688 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
typedef long double ld;
typedef long long ll;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
const int LIM=2e5+7;
vector<int>V[LIM];
ll A[LIM], T[LIM], C[LIM], odw[LIM], cykl[LIM], root[LIM], ile[LIM];
void DFS(int x) {
ile[x]=1;
for(auto i : V[x]) {
DFS(i);
ile[x]+=ile[i];
}
rep(i, V[x].size()) if(ile[V[x][i]]>ile[V[x][0]]) swap(V[x][i], V[x][0]);
}
void DFS2(int x, multiset<pair<ll,ll>>&S) {
if(V[x].size()) DFS2(V[x][0], S);
for(int i=1; i<V[x].size(); ++i) {
multiset<pair<ll,ll>>P;
DFS2(V[x][i], P);
for(auto j : P) S.insert(j);
}
ll a=C[x];
while(a) {
auto it=S.lower_bound({T[x], -1});
컴파일 시 표준 에러 (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... |