제출 #829036

#제출 시각아이디문제언어결과실행 시간메모리
829036christinelynn은행 (IZhO14_bank)C++17
0 / 100
1 ms340 KiB
#include <bits/stdc++.h> typedef long long ll; using namespace std; int n, m; int a[25], b[25]; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n >> m; for(int i=0; i<n; i++) cin>>a[i]; for(int i=0; i<m; i++) cin>>b[i]; for(int i=1; i<(1<<m); i++){ int i2 = i, tmp=0; for(int j=0; j<m; j++){ if((i2 & (1<<j)) != 0) tmp += (1<<j); } if(tmp == a[0]){ cout<<"YES\n"; return 0; } } 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...