제출 #311178

#제출 시각아이디문제언어결과실행 시간메모리
311178GioChkhaidzeFootball (info1cup20_football)C++14
100 / 100
39 ms2176 KiB
#include <bits/stdc++.h> #define ll long long #define pb push_back #define F first #define S second using namespace std; const int N=2e5+5; int n,k,a[N]; void solve() { cin>>n>>k; for (int i=1; i<=n; i++) cin>>a[i]; bool ko=false; while (k) { ll s=0; for (int i=1; i<=n; i++)s+=a[i]; if (s%2==1) { ko=true; break; } for (int i=1; i<=n; i++) a[i]/=2; k/=2; } if (ko) cout<<1; else cout<<0; } main() { ios::sync_with_stdio(false); cin.tie(NULL),cout.tie(NULL); int t; cin>>t; while (t--) { solve(); } }

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

football.cpp:33:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   33 | main() {
      |      ^
#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...