Submission #753106

#TimeUsernameProblemLanguageResultExecution timeMemory
753106DJeniUpFootball (info1cup20_football)C++17
100 / 100
209 ms1392 KiB
#include "bits/stdc++.h" //#pragma GCC optimize("Ofast") //#pragma GCC optimize("O3") using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<ll,ll>pairll; typedef pair<ll,ull>pairull; typedef pair<ll,pairll>pair3l; typedef long double ld; typedef pair<ld,ll>pairld; #define fr first #define sc second #define pb push_back #define endl '\n' #define N 100007 //#define MOD 998244353 #define INF 100000000000007 #define eps 0.0000000001 ll t,n,d[N],k; ll S(ll x){ ll res=0; for(int i=1;i<=n;i++){ res+=d[i]/x; } return res%2; } int main(){ cin>>t; while(t--){ cin>>n>>k; for(int i=1;i<=n;i++){ cin>>d[i]; } ll res=0; for(ll i=1;i<=k;i*=2){ res=max(res,S(i)); } cout<<res; } return 0; }
#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...