# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
689821 | TomitaMatei | Football (info1cup20_football) | C++14 | 92 ms | 468 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |