제출 #524877

#제출 시각아이디문제언어결과실행 시간메모리
524877maks007Football (info1cup20_football)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define int long long int main(void) { int t; cin >> t; while(t --) { int n, k; cin >> n >> k; vector <int> a(n); for(int i = 0; i < n; i ++) cin >> a[i]; if(n == 1) { if(a[0] % 2 == 1) { cout << 1; }else cout << 0 ; continue; } if(k == 1) { int sum = accumulate(a.begin(), a.end(), 0ll); if(sum % 2 == 1) { cout << 1; }else cout << 0; continue; } int sum = count(a.begin(), a.end(), 1) + count(a.begin(), a.end(), 3); int move = count(a.begin(), a.end(), 2) + count(a.begin(), a.end(), 3); if(move % 2 == 0) { if(sum % 2 == 1) { cout << 1; }else cout << 0; }else { if(sum % 2 == 0) cout << 1; else cout << 0; } } return false; }

컴파일 시 표준 에러 (stderr) 메시지

cc1plus: error: '::main' must return 'int'