Submission #87590

# Submission time Handle Problem Language Result Execution time Memory
87590 2018-12-01T10:43:56 Z AntonioDaki Olivander (COCI18_olivander) C++14
0 / 50
2 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 - 1;
    	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 448 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 448 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 524 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 -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 652 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 -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 652 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 -