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
- 1759번
- Unreal
- 1253번
- 트랜잭션 관리
- command not found
- 데이터베이스 배움터
- objtofbx
- 백준 1253번
- 백준
- 실습
- Linux
- 언리얼 플러그인
- 1967번
- hackerank
- UActor
- 언리얼 커스텀 플러그인
- 2단계로킹
- 비재귀셰그먼트
- SQL
- 오손데이터읽기
- FBX
- oracle
- C++
- 5639
- 민겸수
- Security
- UnrealMP
- 의미와 무의미의 경계에서
- OS
- 셰그먼트트리
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 |