# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
666426 | Melika0gh | Regions (IOI09_regions) | C++17 | 4157 ms | 72516 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10, maxr = 25e3, maxsq = 500;
int st[maxn], ft[maxn], pnt[maxn], cnt_big[maxsq + 10], cnt[maxsq + 10][maxr], h[maxn];
vector<int> tmp_team[maxr], team[maxr];
vector<int> adj[maxn];
int n, q, r, t;
void Dfs(int v, int p)
{
st[v] = t++;
if(pnt[h[v]] > 0)
cnt_big[pnt[h[v]]]++;
team[h[v]].push_back(st[v]);
for(int u : adj[v])
{
for(int i = 1; i < maxsq + 10; i++)
cnt[i][h[u]] += cnt_big[i];
Dfs(u, v);
}
if(pnt[h[v]] > 0)
cnt_big[pnt[h[v]]]--;
ft[v] = t;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |