# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1056693 | SzymonKrzywda | The Xana coup (BOI21_xanadu) | C++17 | 1066 ms | 7260 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>
using namespace std;
int main()
{
ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
int n,m,a,b;
cin >> n;
vector<vector<int>> graf(n, vector<int>(0));
vector<int> tablica(n,0);
bool sciezka = true;
for (int i=0; i<n-1; i++){
cin >> a >> b;
a--;b--;
graf[a].push_back(b);
graf[b].push_back(a);
if (abs(a-b)!=1) sciezka=false;
}
for (int i=0; i<n; i++) cin >> tablica[i];
if (sciezka){
int wynik=0;
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |