Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- C++
- 1759번
- Linux
- 백준 1253번
- 민겸수
- 오손데이터읽기
- 트랜잭션 관리
- objtofbx
- UnrealMP
- Unreal
- Security
- UActor
- hackerank
- 백준
- 셰그먼트트리
- SQL
- 데이터베이스 배움터
- oracle
- 5639
- 1253번
- 언리얼 플러그인
- 2단계로킹
- OS
- 1967번
- 실습
- 의미와 무의미의 경계에서
- command not found
- FBX
- 언리얼 커스텀 플러그인
- 비재귀셰그먼트
Archives
- Today
- Total
fatalite
Permuting Two Arrays 본문
규칙 발견, Constrait 발견
Solution Code
string twoArrays(int k, vector<int> A, vector<int> B) {
std::sort(A.begin(),A.end());
std::sort(B.begin(),B.end());
reverse(B.begin(),B.end());
for(int i = 0; i < A.size(); i++){
if(A[i] + B[i] < k) return "NO";
}
return "YES";
}
'코딩 인터뷰 > C++' 카테고리의 다른 글
(파이썬 풀이) XOR String 3 (0) | 2023.02.03 |
---|---|
Subarray Division 2 (0) | 2023.02.03 |
Mars Exploration (0) | 2023.01.18 |
Counting Valleys (0) | 2023.01.17 |
Diagonal Difference (0) | 2023.01.13 |