# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
222363 | dantoh000 | Checker (COCI19_checker) | C++14 | 0 ms | 0 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 col[200005];
int adjlist[200005];
int main(){
int st;
scanf("%d",&st);
int n;
scanf("%d",&n);
for (int i = 0; i < n; i++){
scanf("%d",&col[i]);
}
for (int i = 0; i < n-3; i++){
int a,b,c;
scanf("%d%d%d",&a,&b,&c);
adjlist[a].push_back({b,c});
adjlist[b].push_back({a,c});
}
int ct= 0;
for (int i = 0; i < n; i++){
if ((int)adjlist[i].size() % 2 == 1){
ct++;
}
}
if (st == 3){
printf("%s",ct>2?"neispravna triangulacija":"tocno");
}
}