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;
using ll = long long;
std::mt19937 rng((int) std::chrono::steady_clock::now().time_since_epoch().count());
void solve() {
int n; cin >> n;
for(int u, v, i = 1; i < n; i++)
cin >> u >> v;
int m; cin >> m;
vector<array<int, 2>> a(m);
for(auto &[u, v] : a)
cin >> v >> u;
cout << "Yes" << '\n';
}
signed main() {
std::ios::sync_with_stdio(0);
std::cin.tie(0);
int tc; cin >> tc;
while(tc--)
solve();
return 0;
}
# | 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... |