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 | 31 |
Tags
- Algorithm
- Kaggle
- rao
- BOF
- ARM
- Flutter
- ML
- llm을 활용 단어장 앱 개발일지
- system hacking
- pytorch
- Dreamhack
- Stream
- fastapi를 사용한 파이썬 웹 개발
- BAEKJOON
- MDP
- study book
- DART
- Image Processing
- PCA
- MATLAB
- Computer Architecture
- bloc
- C++
- FastAPI
- 파이토치 트랜스포머를 활용한 자연어 처리와 컴퓨터비전 심층학습
- 백준
- Got
- BFS
- 영상처리
- Widget
Archives
- Today
- Total
목록stable_sort() (1)
Bull

sort()의 문제점 최근 백준 문제를 풀던 중, pair로 담은 vector에서 이중 정렬을 compare() 를 구현하여 sort() 인자로 넣는 것 까진 잘 이해 하면서 풀었다. 하지만, pair에서 정렬 기준을 2개를 잡는 것이 아닌, 1개만 잡고 하면 나머지 다른 원소는 입력된 순서로 정렬 되는 것이 아닌 , 무작위로 정렬이 된다. 예를 들어보자. 문제: https://www.acmicpc.net/problem/10814 #include #include #include using namespace std; bool comp(pair a, pair b) { return a.first < b.first; } int main() { int T; int age; string name; vector sk..
Computer Language/C++
2024. 3. 21. 20:29