![[C++] 백준 13단계 - 11650번 문제 (좌표 정렬하기)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FwBMbX%2FbtsnEpcxgal%2FgOaORv6jRvw5PXk6YImIO1%2Fimg.png)
문제설명 소스코드 #include #include using namespace std; class XY { public: int x; int y; bool operator x x == arr.x) && (this->y > N; XY* arr = new XY[N]; for (int i = 0; i < N; ++i) cin ..
![[C++] 백준 10867번 문제 (중복 빼고 정렬하기)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FC9fHb%2FbtsnGOowYxh%2FsqY0ukKVg6YmFitJaoUPf1%2Fimg.png)
문제설명 소스코드 #include #include #include using namespace std; int main() { int N; vector arr; cin >> N; int input; for (int i = 0; i > input; arr.push_back(input); } sort(arr.begin(), arr.end()); arr.erase(unique(arr.begin(), arr.end()), arr.end()); for (int i = 0; i < arr.size(); ++i) cout 중복된 원소의 첫 번째 부터 벡터의 마지막까지를 지워버림
![[C++] 백준 13단계 - 1427번 문제 (소트인사이드)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FcgRjHh%2FbtsnE970rnG%2F08s7LyQzpLTOnuXxFYX7L0%2Fimg.png)
문제설명 소스코드 #include #include using namespace std; bool compare(int a, int b) { return a > b; } int main() { string N; cin >> N; sort(N.begin(), N.end(),compare); cout
![[C++] 백준 13단계 - 10989번 문제 (커트라인)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fvug05%2FbtsnDBqWH0T%2F9BzEe3vBl4xQZQdasBPa2k%2Fimg.png)
문제설명 소스코드 #include #include using namespace std; bool compare(int a, int b) { return a > b; } int main() { int N, k; cin >> N >> k; int* arr = new int[N]; for (int i = 0; i > arr[i]; sort(arr, arr + N, compare); cout
![[C++] 백준 13단계 - 2587번 문제 (대표값2)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FdnaolI%2FbtsnF5DIWJc%2Fo9NwCpZ5pIExu2YGzIvQ9k%2Fimg.png)
문제설명 소스코드 #include #include using namespace std; int main() { int arr[5]; int sum = 0; for (int i = 0; i > arr[i]; sum += arr[i]; } sort(arr, arr + 5); cout
![[C++] 백준 13단계 - 10989번 문제 (수 정렬하기 3)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fbom0W5%2Fbtsnwpwfyiz%2FcY2nB2sOnlfPR4tANCVfa1%2Fimg.png)
문제설명 소스코드 #include using namespace std; int main() { ios_base::sync_with_stdio(false); //표준 스트림 동기화 해제 cin.tie(NULL); //입력과 출력 연결 끊기 int N; cin >> N; int arr[10001] = { 0 }; for (int i = 0; i > idx; arr[idx] += 1; } for (int i = 1; i < 10001; ++i) { for (int j = 0; j < arr[i]; ++j) cout
![[C++] 백준 13단계 - 2751번 문제 (수 정렬하기 2)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbRhcqW%2FbtsnrsOykka%2FdyDKKKYut0SsC0iAO7MEHK%2Fimg.png)
문제설명 소스코드 #include #include using namespace std; int main() { ios_base::sync_with_stdio(false); //표준 스트림 동기화 해제 cin.tie(NULL); //입력과 출력 연결 끊기 int N; cin >> N; int* arr = new int[N]; for (int i = 0; i > arr[i]; sort(arr, arr+N); for (int i = 0; i < N; ++i)cout
![[C++] 백준 13단계 - 2750번 문제 (수 정렬하기)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FBaMC9%2FbtsnvoY4bdN%2FBDmCqpibxW1okpKBycCgbk%2Fimg.png)
문제설명 소스코드 #include #include using namespace std; int main() { int N; cin >> N; int* arr = new int[N]; for (int i = 0; i > arr[i]; sort(arr, arr+N); for (int i = 0; i < N; ++i)cout