Submission #1103864

#TimeUsernameProblemLanguageResultExecution timeMemory
1103864vjudge1Bank (IZhO14_bank)C++17
0 / 100
1 ms508 KiB
#include <bits/stdc++.h> using namespace std; //Amenov Omar const int N=1e5+1; using ll=long long; bool used[N]; int main(){ ios::sync_with_stdio(false); cin.tie(NULL); ll n,m; cin>>n>>m; ll a[n+1],b[m+1]; ll ans=0; for(ll i=1;i<=n;i++) { cin>>a[i]; } for(ll j=1;j<=m;j++) { cin>>b[j]; } for(ll j=1;j<=m;j++) { for(ll i=1;i<=m;i++) { if(i!=j) { if(b[j]+b[i]==a[1]) ans++; } } } if(ans>=1) cout<<"Yes"; else cout<<"No "; } //01.12.2010
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...