제출 #481787

#제출 시각아이디문제언어결과실행 시간메모리
481787Yazan_AlattarFootball (info1cup20_football)C++14
26 / 100
26 ms1984 KiB
#include <iostream> #include <fstream> #include <vector> #include <cstring> #include <algorithm> #include <set> #include <map> #include <queue> #include <list> #include <utility> #include <cmath> #include <numeric> using namespace std; typedef long long ll; #define F first #define S second #define pb push_back #define endl "\n" #define all(x) x.begin(), x.end() const int M = 1007; const ll inf = 1e18; const ll mod = 1e9 + 7; const double pi = acos(-1); const int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1}; int main() { ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); int t; cin >> t; while(t--){ ll n, k, sum = 0; cin >> n >> k; for(int i = 1; i <= n; ++i){ ll x; cin >> x; sum += x; } if(sum % 2) cout << '1'; else cout << '0'; } return 0; } // Don't forget special cases. (n = 1?) // Look for the constraints. (Runtime array? overflow?)
#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...