제출 #1296889

#제출 시각아이디문제언어결과실행 시간메모리
1296889mikurakill은행 (IZhO14_bank)C++20
19 / 100
33 ms584 KiB
#include<iostream> using namespace std; int tab[20]; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); int n, m; cin>>n>>m; int N; cin>>N; for(int i=0; i<m; i++){ cin>>tab[i]; } for(int maska = 0; maska < (1<<(m+1)); maska++){ int sumka = 0; for(int i=0; i<m; i++){ sumka += ((maska>>i)&1) * tab[i]; } if(sumka == N){ cout<<"YES"; return 0; } } cout<<"NO"; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...