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 ; i++)
{
for(int j = 0; j < M; j++)
{
if(array_M[j] == array_N[0] - array_M[i]) return "YES";
}
}
return "NO";
}
int main()
{
cout<<solved();
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |