Submission #1089158

#TimeUsernameProblemLanguageResultExecution timeMemory
1089158vjudge1Bank (IZhO14_bank)C++17
0 / 100
0 ms348 KiB
#include <bits/stdc++.h> #define EmirBey ios_base::sync_with_stdio(NULL);cin.tie(0);cout.tie(0); #pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") using namespace std; const int N = 200; int n,m,a,b[N],used[N]; void get(int val , int pos){ if(val>a)return; used[val]=1; for(int i=pos ; i<m ; i++){ get(b[i]+val , i+1); } } void putin() { cin>>n>>m>>a; for(int i=1 ; i<=m ; i++)cin>>b[i]; for(int i=1 ; i<=n ; i++){ get(b[i] , i+1); } if(used[a])cout<<"NO\n"; else cout<<"YES\n"; } signed main() { EmirBey int tt=1; //cin>>tt; while(tt--){ putin(); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...