# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
701522 | Abrar_Al_Samit | Duathlon (APIO18_duathlon) | C++17 | 1082 ms | 1048576 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
const int nax = 1e5 + 2;
vector<int>g[nax];
int n, m;
long long ans = 0;
bool vis[nax];
int sub[nax];
int dfs1(int v, int p) {
sub[v] = 1;
vis[v] = 1;
for(int u : g[v]) if(u!=p) {
sub[v] += dfs1(u, v);
}
return sub[v];
}
long long C(int n, int r) {
if(n<r) return 0;
long long ret = 1;
for(int i=n-r+1; i<=n; ++i) {
ret *= i;
}
for(int i=1; i<=r; ++i) {
ret /= i;
}
return ret;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |