Submission #40556

# Submission time Handle Problem Language Result Execution time Memory
40556 2018-02-04T17:49:47 Z vanjo9800 Olivander (COCI18_olivander) C++14
50 / 50
2 ms 676 KB
#include<iostream>
#include<algorithm>
using namespace std;
int sticks[101],wands[101];
int main(){
	cin.tie(NULL);
	ios::sync_with_stdio(false);
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>wands[i];
	}
	sort(wands,wands+n);
	for(int i=0;i<n;i++){
		cin>>sticks[i];
	}
	sort(sticks,sticks+n);
	for(int i=0;i<n;i++){
		if(wands[i]>sticks[i]){
			cout<<"NE\n";
			return 0;
		}
	}
	cout<<"DA\n";
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 252 KB Output is correct
2 Correct 1 ms 356 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 432 KB Output is correct
2 Correct 1 ms 436 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 460 KB Output is correct
2 Correct 1 ms 460 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 516 KB Output is correct
2 Correct 1 ms 576 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 612 KB Output is correct
2 Correct 1 ms 616 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 640 KB Output is correct
2 Correct 2 ms 640 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 648 KB Output is correct
2 Correct 1 ms 648 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 652 KB Output is correct
2 Correct 1 ms 660 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 664 KB Output is correct
2 Correct 1 ms 672 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 672 KB Output is correct
2 Correct 2 ms 676 KB Output is correct