제출 #339699

#제출 시각아이디문제언어결과실행 시간메모리
339699wwddFootball (info1cup20_football)C++14
100 / 100
40 ms2156 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vl; int main() { ios::sync_with_stdio(0);cin.tie(0); ll N; cin >> N; while(N--) { ll n,k; cin >> n >> k; vl w; for(int i=0;i<n;i++) { ll t; cin >> t; w.push_back(t); } int res = 0; while(k) { ll su = 0; for(int i=0;i<w.size();i++) { su += w[i]; } if(su&1) { res = 1;break; } for(int i=0;i<w.size();i++) { w[i] /= 2; } k /= 2; } cout << res; } cout << '\n'; }

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

football.cpp: In function 'int main()':
football.cpp:21:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   21 |    for(int i=0;i<w.size();i++) {
      |                ~^~~~~~~~~
football.cpp:27:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   27 |    for(int i=0;i<w.size();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...