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 |
Tags
- dfs
- 구현
- 백준 5397
- qorwns
- 백준 17471
- ㅣ풀이
- 해시구현
- 별 찍기 10
- 원판 돌리기
- 1764
- AVL 시간 복잡도
- 게리멘더링2
- 백준 2447
- C/C++ 구현
- c#
- 자료구조
- 해시 구현
- 버킷 정렬
- 백준 1406
- Stack 이란
- heap
- 스택의 특징
- 백준 1158
- 시간 복잡도
- 조세퍼스 순열
- 백준 17822
- 풀이
- 백준 17779
- 백준
- 5397
Archives
- Today
- Total
홍시홍의 프로그래밍
[백준 10871] X보다 작은 수 본문
요구사항
X보다 작은 수 출력
풀이
1. X를 입력받는다
2. n가지 숫자 입력 받을때, x보다 작으면 출력
#include <iostream>
#include <queue>
#include <functional>
#include <algorithm>
#include <vector>
using namespace std;
priority_queue<int, vector<int>, greater<> > q;
int n, m;
vector<int> v;
int main() {
scanf("%d%d", &n,&m);
for (int i = 0; i < n; i++) {
int x;
scanf("%d", &x);
if (x < m) printf("%d ", x);
}
}
'알고리즘 문제풀이 > 백준' 카테고리의 다른 글
[백준 1059] 수2 (0) | 2020.03.20 |
---|---|
[백준 2839] 설탕 배달 (0) | 2020.03.20 |
[백준 9498] 시험 성적 (0) | 2020.03.19 |
[백준 2075] N번째 큰 수 (0) | 2020.03.19 |
[백준 1826] 연료 채우기 (0) | 2020.03.19 |
Comments