# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
963706 | Ivo_12 | Paprike (COI18_paprike) | C++98 | 47 ms | 24340 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>
#define ll long long
#define pb push_back
using namespace std;
struct node {
vector < int > chi;
int par = -1;
ll val = 0;
};
const int N = 100010;
node tree[N];
int n;
int k;
vector < int > edges[N];
int sol;
void dfs( int pos ) {
for(int i = 0; i < edges[pos].size(); i++) {
if(edges[pos][i]!=tree[pos].par) {
tree[edges[pos][i]].par=pos;
tree[pos].chi.pb(edges[pos][i]);
dfs(edges[pos][i]);
}
}
}
ll sumover( int pos ) {
Compilation message (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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |