Submission #365893

#TimeUsernameProblemLanguageResultExecution timeMemory
365893Blobo2_Blobo2Football (info1cup20_football)C++14
26 / 100
32 ms1024 KiB
/* Editor: Abdelrahman Hossam Nickname: Blobo2_Blobo2 IOI next year isA :) */ //#pragma GCC optimize ("O3") //#pragma GCC optimize ("unroll-loops") #include<bits/stdc++.h> #define int long long #define endl "\n" #define PI 3.1415926535897932384626433 #define ceil1(a,b) (a+(b-1))/b #define all(v) v.begin(),v.end() #define gen(arr,n,nxt) generate(arr,arr+n,nxt) #define base ios_base::sync_with_stdio(false);cin.tie(0); #define open freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout); using namespace std; const int mo=1e9+7; int nxt(){int x;cin>>x;return x;} int mod(int n,int m){int ans=n%m;if(ans<0)ans+=m;return ans;} signed main(){ base int qu=nxt(); while(qu--){ int n=nxt(),k=nxt(); int arr[n]; gen(arr,n,nxt); if(n==1){ cout<<1; continue; } int cnt=0; for(int i=0;i<n;i++)cnt+=arr[i]; if(cnt%2)cout<<1; else cout<<0; } return 0; }

Compilation message (stderr)

football.cpp: In function 'int main()':
football.cpp:27:21: warning: unused variable 'k' [-Wunused-variable]
   27 |         int n=nxt(),k=nxt();
      |                     ^
#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...