Submission #689821

#TimeUsernameProblemLanguageResultExecution timeMemory
689821TomitaMateiFootball (info1cup20_football)C++14
26 / 100
92 ms468 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; 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; }

Compilation message (stderr)

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