제출 #299657

#제출 시각아이디문제언어결과실행 시간메모리
299657E869120Football (info1cup20_football)C++14
0 / 100
45 ms2296 KiB
#include <bits/stdc++.h> using namespace std; long long T, N, K; long long A[1 << 18]; bool solve_Subtask1() { int ret = 0; for (int i = 1; i <= N; i++) ret += A[i]; if (ret % 2LL == 1LL) return true; return false; } int main() { string str = ""; scanf("%lld", &T); for (int i = 1; i <= T; i++) { scanf("%lld%lld", &N, &K); for (int j = 1; j <= N; j++) scanf("%lld", &A[j]); bool ret = false; if (K == 1) ret = solve_Subtask1(); if (ret == false) str += "0"; if (ret == true) str += "1"; } cout << str << endl; return 0; }

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

football.cpp: In function 'int main()':
football.cpp:16:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   16 |  scanf("%lld", &T);
      |  ~~~~~^~~~~~~~~~~~
football.cpp:18:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   18 |   scanf("%lld%lld", &N, &K);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~
football.cpp:19:37: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   19 |   for (int j = 1; j <= N; j++) scanf("%lld", &A[j]);
      |                                ~~~~~^~~~~~~~~~~~~~~
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...