Submission #346835

#TimeUsernameProblemLanguageResultExecution timeMemory
346835arnold518Football (info1cup20_football)C++14
26 / 100
38 ms2156 KiB
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

const int MAXN = 1e5;

int TC, N, K, A[MAXN+10];

int main()
{
	scanf("%d", &TC);
	while(TC--)
	{
		scanf("%d%d", &N, &K);
		for(int i=1; i<=N; i++) scanf("%d", &A[i]);

		ll t=0;
		for(int i=1; i<=N; i++) t+=A[i];
		if(t%2) printf("1");
		else printf("0");
	}
}

Compilation message (stderr)

football.cpp: In function 'int main()':
football.cpp:14:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   14 |  scanf("%d", &TC);
      |  ~~~~~^~~~~~~~~~~
football.cpp:17:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   17 |   scanf("%d%d", &N, &K);
      |   ~~~~~^~~~~~~~~~~~~~~~
football.cpp:18:32: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   18 |   for(int i=1; i<=N; i++) scanf("%d", &A[i]);
      |                           ~~~~~^~~~~~~~~~~~~
#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...