제출 #369863

#제출 시각아이디문제언어결과실행 시간메모리
369863A_DFootball (info1cup20_football)C++14
100 / 100
288 ms2156 KiB
#include <bits/stdc++.h> #define int long long #define ii pair<int,int> #define F first #define S second #define du long double using namespace std; const int N=1e6+100; int a[N]; int n; bool solve(int k) { if(k==0)return 0; int sum=0; for(int i=1;i<=n;i++){ sum+=a[i]; } for(int i=1;i<=n;i++)a[i]/=2; if(sum&1)return 1; else return solve(k/2); } void qqqq() { int k; cin>>n>>k; for(int i=1;i<=n;i++){ scanf("%lld",&a[i]); } cout<<solve(k); } main() { int t; cin>>t; while(t--)qqqq(); }

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

football.cpp:31:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   31 | main()
      |      ^
football.cpp: In function 'void qqqq()':
football.cpp:27:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   27 |         scanf("%lld",&a[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...