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
- DP
- cs
- 오에스
- 정석학술정보관
- 컴공과
- 구현
- 알고리즘
- OS
- 문제풀이
- 개발
- 그래프
- 브루트포스
- 너비우선탐색
- 북리뷰
- 자료구조
- 코딩
- 컴공
- c++
- 정석
- 백준
- Operating System
- 코테
- 오퍼레이팅시스템
- vector
- Computer science
- 컴퓨터공학과
- bfs
- Stack
- coding
- 스택
Archives
- Today
- Total
목록binary_search (1)
Little Jay
[C++] 백준 1764번 - 듣보잡
마지막에 조건으로 이름을 사전순으로 출력해야 되는것을 제대로 못보고 왜 틀렸는지 하루종일 보고 있었다..... 일단 맵이나 해쉬로 풀지 않았다. 이거 같은 경우는 그냥 벡터를 계속 정렬해주면서 binary_search로 빠르게 이름을 찾으면 되는 문제인 것 같다. #include #include #include #include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int n, m; cin >> n >> m; vector v(n); v.resize(n); string s; for (int i = 0; i > v[i]; } sort(v.begin(), v.end()); vector ..
알고리즘/BOJ
2021. 8. 17. 15:42