# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
116157 | luciocf | Regions (IOI09_regions) | C++14 | 7182 ms | 131072 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5+10;
const int maxr = 25010;
typedef long long ll;
int n, R, q;
int region[maxn];
int st[maxn], en[maxn], tt;
ll ans[510][510], pre[maxr][510];
vector<int> grafo[maxn], pos[maxr], V[maxr];
map<int, int> mp;
int dfs(int u, int p, int r)
{
int qtd = (region[u] == r ? 1 : 0);
for (auto v: grafo[u])
{
if (v == p) continue;
qtd += dfs(v, u, r);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |