제출 #222364

#제출 시각아이디문제언어결과실행 시간메모리
222364dantoh000Checker (COCI19_checker)C++14
0 / 110
186 ms15864 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++; } } if (st == 3){ printf("%s",ct>2?"neispravna triangulacija":"tocno"); } }

컴파일 시 표준 에러 (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...