Submission #87597

# Submission time Handle Problem Language Result Execution time Memory
87597 2018-12-01T11:30:55 Z AntonioDaki Olivander (COCI18_olivander) C++14
50 / 50
3 ms 692 KB
#include <bits/stdc++.h>

using namespace std;

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);

    int n, ok = 1, m = 0;
    cin >> n;
    long long x[102], y[102];
    for(int i = 0; i < n; ++i) cin >> x[i];
    for(int i = 0; i < n; ++i) cin >> y[i];
    sort(x, x + n);
    sort(y, y + n);
    for(int i = 0; i < n; ++i){
    	for(int j = 0; j <= n; ++j){
		    if(x[i] <= y[j]){
		        m = j;
		        j = n + 1;
		    }
		    if(j == n) ok = 0;
		}
    	y[m] = 0;
    	m = 0;
	}
	if(ok) cout << "DA";
	else cout << "NE";

    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 376 KB Output is correct
2 Correct 2 ms 512 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 512 KB Output is correct
2 Correct 2 ms 512 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 624 KB Output is correct
2 Correct 2 ms 636 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 636 KB Output is correct
2 Correct 3 ms 636 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 636 KB Output is correct
2 Correct 2 ms 636 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 636 KB Output is correct
2 Correct 2 ms 636 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 636 KB Output is correct
2 Correct 2 ms 676 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 680 KB Output is correct
2 Correct 2 ms 680 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 684 KB Output is correct
2 Correct 2 ms 692 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 692 KB Output is correct
2 Correct 2 ms 692 KB Output is correct