답안 #361542

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
361542 2021-01-30T13:39:52 Z israeladewuyi Olivander (COCI18_olivander) C++17
50 / 50
1 ms 512 KB
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
 
typedef long long ll;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<pair<int,int>> vp;

#define int ll
#define PB push_back
#define pb pop_back
#define in inser1t 
#define endl "\n"
#define MP make_pair
#define f first
#define Trav(a,x) for(auto &a: x)
#define	sort(x) sort(x.begin(),x.end());
const int MOD  = 998244353;
const int maxn = 1e5+1;

int a,b,c,d,k,n,m,x,s,y,ans;


int32_t main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	cin>>n;
	vi A(n);
	vi B(n);
	Trav(a,A)cin>>a; sort(A);
	Trav(a,B)cin>>a; sort(B);
	int cnt = 0;
	for(int i = 0; i < n; i++){
		if(B[i]>= A[i])cnt++;
	}
	cout<<((cnt== n)?"DA": "NE");
	return 0;
}

 

Compilation message

olivander.cpp:2: warning: ignoring #pragma GCC optimization [-Wunknown-pragmas]
    2 | #pragma GCC optimization ("O3")
      | 
olivander.cpp:3: warning: ignoring #pragma GCC optimization [-Wunknown-pragmas]
    3 | #pragma GCC optimization ("unroll-loops")
      |
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 512 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 292 KB Output is correct
2 Correct 1 ms 364 KB Output is correct