# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
860051 | QuackPhuc | Bank (IZhO14_bank) | C++11 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<iostream>
using namespace std;
string solved()
{
int N; int M; cin>>N>>M;
int array_N[N];
int array_M[M];
for(int i = 0; i < N; i++)
cin>>array_N[i];
for(int i = 0; i < M; i++)
cin>>array_M[i];
for(int i = 0; i < M - 1; i++)
{
for(int j = i+1; j < M; j++)
{
if(array_M[j] == array_N[0] - array_M[i]) return "YES";
}
}
return "NO";
}