Submission #222366

#TimeUsernameProblemLanguageResultExecution timeMemory
222366dantoh000Checker (COCI19_checker)C++14
0 / 110
161 ms12544 KiB
#include <bits/stdc++.h> using namespace std; typedef pair<int,int> ii; int col[200005]; vector<ii> adjlist[200005]; int main(){ int st; scanf("%d",&st); int n; scanf("%d",&n); for (int i = 0; i < n; i++){ char x; scanf(" %c",&x); col[i] = x-'0'; } 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 = 1; i <= n; i++){ //printf("%d %d\n",i,adjlist[i].size()); if ((int)adjlist[i].size() % 2 == 1){ ct++; } } printf("%s",ct>2?"neispravna triangulacija":"tocno"); }

Compilation message (stderr)

checker.cpp: In function 'int main()':
checker.cpp:8:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&st);
     ~~~~~^~~~~~~~~~
checker.cpp:10:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&n);
     ~~~~~^~~~~~~~~
checker.cpp:13:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf(" %c",&x);
         ~~~~~^~~~~~~~~~
checker.cpp:18:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d%d%d",&a,&b,&c);
         ~~~~~^~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...