#include <bits/stdc++.h>
#define se second
#define fi first
using namespace std;
vector < vector < pair < int,int > > > g;
int main () {
ios_base::sync_with_stdio(false);
cin.tie(0);
int n,m;
cin >> n >> m;
int c[n+m+1];
g.resize(n+m+1);
for (int i=2; i<=n+m; i++) {
int p;
cin >> p >> c[i-1];
g[i].push_back({p,c[i-1]});
g[p].push_back({i,c[i-1]});
}
sort (c+1,c+n+1);
if (n==1) {
cout << c[(n+m)/2];
return 0;
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
2176 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
2176 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
2176 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
2176 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |