제출 #205747

#제출 시각아이디문제언어결과실행 시간메모리
205747ly20Political Development (BOI17_politicaldevelopment)C++17
4 / 100
7 ms380 KiB
#include <bits/stdc++.h> using namespace std; int main() { int n, k; scanf("%d %d", &n, &k); bool ok = false; for(int i = 0; i < n; i++) { int a; scanf("%d", &a); if(a > 0) ok = true; for(int j = 0; j < a; j++) { int b; scanf("%d", &b); } } if(ok) printf("2\n"); else printf("1\n"); return 0; }

컴파일 시 표준 에러 (stderr) 메시지

politicaldevelopment.cpp: In function 'int main()':
politicaldevelopment.cpp:5:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d %d", &n, &k);
  ~~~~~^~~~~~~~~~~~~~~~~
politicaldevelopment.cpp:9:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d", &a);
   ~~~~~^~~~~~~~~~
politicaldevelopment.cpp:13:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
    scanf("%d", &b);
    ~~~~~^~~~~~~~~~
#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...