Submission #87589

# Submission time Handle Problem Language Result Execution time Memory
87589 2018-12-01T10:40:05 Z AntonioDaki Olivander (COCI18_olivander) C++14
0 / 50
3 ms 652 KB
#include <bits/stdc++.h>

using namespace std;

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

    int n, m = 0, ok = 1, t = 0;
    cin >> n;
    long long x[n], y[n];
    for(long long i = 0; i < n; ++i) cin >> x[i];
    for(long long i = 0; i < n; ++i) cin >> y[i];
    for(long long i = 0; i < n; ++i){
    	while(x[i] > y[t] and t < n) ++t;
    	m = t;
    	for(long long j = t; j < n; ++j){
    	    if(x[i] <= y[j] and x[i] > y[m]) m = j;
    	    if(x[i] == y[j]) j = n;
    	}
    	y[m] = 0;
    	if(m == n) ok = 0;
    	m = 0;
    	t = 0;
	}
	if(ok) cout << "Da";
	else cout << "Ne";

    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 528 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 528 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 588 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 588 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 592 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 640 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 648 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 652 KB Output isn't correct
2 Halted 0 ms 0 KB -