#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;
vector < int > c;
g.resize(n+m+1);
for (int i=2; i<=n+m; i++) {
int p;
int cc;
cin >> p >> cc;
c.push_back(cc);
g[i].push_back({p,cc});
g[p].push_back({i,cc});
}
sort (c.begin(),c.end());
if (n==1) {
cout << c[(c.size()-1)/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 |
- |