Submission #40394

# Submission time Handle Problem Language Result Execution time Memory
40394 2018-01-31T13:16:06 Z szawinis Olivander (COCI18_olivander) C++14
50 / 50
2 ms 736 KB
#include <bits/stdc++.h>
using namespace std;

int n, a[101], b[101];
int main() {
	scanf("%d", &n);
	for(int i = 0; i < n; i++) cin >> a[i];
	for(int i = 0; i < n; i++) cin >> b[i];
	sort(a, a+n);
	sort(b, b+n);
	bool ans = true;
	for(int i = 0; i < n; i++) ans &= a[i] <= b[i];
	if(ans) printf("DA");
	else printf("NE");
}

Compilation message

olivander.cpp: In function 'int main()':
olivander.cpp:6:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &n);
                 ^
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 416 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 472 KB Output is correct
2 Correct 2 ms 512 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 532 KB Output is correct
2 Correct 2 ms 532 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 584 KB Output is correct
2 Correct 2 ms 624 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 624 KB Output is correct
2 Correct 2 ms 680 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 704 KB Output is correct
2 Correct 1 ms 708 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 736 KB Output is correct
2 Correct 2 ms 736 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 736 KB Output is correct
2 Correct 1 ms 736 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 736 KB Output is correct
2 Correct 2 ms 736 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 736 KB Output is correct
2 Correct 2 ms 736 KB Output is correct