# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
544538 | Jarif_Rahman | Sprinkler (JOI22_sprinkler) | C++17 | 897 ms | 52064 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 pb push_back
#define f first
#define sc second
using namespace std;
typedef long long int ll;
typedef string str;
const int maxn = 200000;
vector<int> v[maxn];
int p[maxn];
int ml[maxn][41];
inline void dfs(int nd, int ss){
p[nd] = ss;
for(int x: v[nd]) if(x != ss) dfs(x, nd);
}
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
int n, md; cin >> n >> md;
for(int i = 0; i < n; i++) for(int j = 0; j <= 40; j++) ml[i][j] = 1;
for(int i = 0; i < n-1; i++){
int a, b; cin >> a >> b; a--, b--;
v[a].pb(b);
# | 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... |