제출 #1098116

#제출 시각아이디문제언어결과실행 시간메모리
1098116vjudge1은행 (IZhO14_bank)C++17
0 / 100
5 ms8028 KiB
#include <bits/stdc++.h> #define int unsigned long using namespace std; signed main() { int n,m; cin >> n >> m; bool q=false; int a[500000],b[500000]; for(int i=0;i<n;i++){ cin >> a[i]; } for(int i=0;i<m;i++){ cin >> b[i]; } for(int i=0;i<m;i++){ for(int j=i;j<=m;j++){ for(int z=j;z<=m;z++){ if(b[i]+b[j]+b[z]==a[i] || a[i]==b[i]){ q=true; } } } } if(q){ cout << "YES"; } else{ 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...