제출 #689822

#제출 시각아이디문제언어결과실행 시간메모리
689822TomitaMateiFootball (info1cup20_football)C++14
42 / 100
88 ms1344 KiB
#include <iostream> using namespace std; int long long t,k,i,n,ok,s1; int long long s,v[100011]; int main() { cin>>t; while (t!=0) { ok=0; t--; cin>>n>>k; s=0; s1=0; for (i=1; i<=n; i++) { cin>>v[i]; s=s+v[i]; } if (s%2==1) cout<<1; else { if (k==1) cout<<0; if (k==2) { for (i=1; i<=n; i++) s1=s1+v[i]/2; if (s1%2==1) cout<<1; else cout<<0; } } } return 0; }

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

football.cpp: In function 'int main()':
football.cpp:29:17: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   29 |                 for (i=1; i<=n; i++)
      |                 ^~~
football.cpp:33:21: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   33 |                     if (s1%2==1) cout<<1;
      |                     ^~
#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...