Submission #42693

# Submission time Handle Problem Language Result Execution time Memory
42693 2018-03-02T17:20:41 Z iletavcioski Olivander (COCI18_olivander) C++14
50 / 50
2 ms 552 KB
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long ll;
int main()
{
    int n;
    cin>>n;
    vector<int> v1,v2;
    for(int i=0;i<n;i++)
    {
        int a;
        cin>>a;
        v1.push_back(a);
        
    }
    for(int i=0;i<n;i++)
    {
        int a;
        cin>>a;
        v2.push_back(a);
        
    }
    sort(v1.begin(),v1.end());
    sort(v2.begin(),v2.end());
    for(int i=0;i<n;i++)
    {
        if(v2[i]<v1[i])
        {
            cout<<"NE"<<endl;
            return 0;
        }

    }
    cout<<"DA"<<endl;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 248 KB Output is correct
2 Correct 1 ms 352 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 352 KB Output is correct
2 Correct 1 ms 352 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 404 KB Output is correct
2 Correct 1 ms 456 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 456 KB Output is correct
2 Correct 1 ms 456 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 456 KB Output is correct
2 Correct 1 ms 532 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 552 KB Output is correct
2 Correct 1 ms 552 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 552 KB Output is correct
2 Correct 1 ms 552 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 552 KB Output is correct
2 Correct 1 ms 552 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 552 KB Output is correct
2 Correct 1 ms 552 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 552 KB Output is correct
2 Correct 1 ms 552 KB Output is correct