일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 알고리즘
- c++
- Unreal Engine 5
- 우선순위 큐
- DFS
- 자료구조
- 그래프
- 트리
- 브루트포스
- 누적 합
- 스택
- 다익스트라
- 투 포인터
- 유니티
- 유니온 파인드
- Team Fortress 2
- 구현
- ue5
- 문자열
- 그리디 알고리즘
- 백준
- BFS
- XR Interaction Toolkit
- VR
- 수학
- 다이나믹 프로그래밍
- 정렬
- 백트래킹
- 재귀
- 시뮬레이션
- Today
- Total
목록알고리즘 (532)
1일1알
https://www.acmicpc.net/problem/11758 11758번: CCW 첫째 줄에 P1의 (x1, y1), 둘째 줄에 P2의 (x2, y2), 셋째 줄에 P3의 (x3, y3)가 주어진다. (-10,000 ≤ x1, y1, x2, y2, x3, y3 ≤ 10,000) 모든 좌표는 정수이다. P1, P2, P3의 좌표는 서로 다르다. www.acmicpc.net 외적을 이용, (P2 - P1) X (P3 - P2)가 양수면 둘 사이의 각도가 (0,180) 이므로 반시계방향 음수면 둘 사이의 각도가 (180,360) 이므로 시계방향 0이면 일직선 #include #include #include #include #include #include #include #include #include ..
https://www.acmicpc.net/problem/24445 24445번: 알고리즘 수업 - 너비 우선 탐색 2 첫째 줄에 정점의 수 N (5 ≤ N ≤ 100,000), 간선의 수 M (1 ≤ M ≤ 200,000), 시작 정점 R (1 ≤ R ≤ N)이 주어진다. 다음 M개 줄에 간선 정보 u v가 주어지며 정점 u와 정점 v의 가중치 1인 양 www.acmicpc.net bfs, 내림차순으로 방문 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; us..
https://www.acmicpc.net/problem/17952 17952번: 과제는 끝나지 않아! 성애는 이번 학기에 전공을 정말 많이 듣는다. 이로 인해 거의 매일을 과제를 하면서 보내고 있다. 그런데도 과제가 줄어들 기미가 보이지 않는데, 바로 분단위로 과제가 추가되고 있기 때문이 www.acmicpc.net 최근에 했던 과제를 꺼내서 하기에는 스택이 적합한 것 같아서 스택을 사용해서 풀었다. #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ..
https://www.acmicpc.net/problem/1240 1240번: 노드사이의 거리 N(2≤N≤1,000)개의 노드로 이루어진 트리가 주어지고 M(M≤1,000)개의 두 노드 쌍을 입력받을 때 두 노드 사이의 거리를 출력하라. www.acmicpc.net dfs #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using int64 = long long; int n, m; int ans; vector graph; vector visited; void d..
https://www.acmicpc.net/problem/13414 13414번: 수강신청 입력 데이터는 표준 입력을 사용한다. 입력은 1개의 테스트 데이터로 구성된다. 입력의 첫 번째 줄에는 과목의 수강 가능 인원 K(1 ≤ K ≤ 100,000)와 학생들이 버튼을 클릭한 순서를 기록한 대기목 www.acmicpc.net map 로 입력받은 순서를 통해 우선순위를 정하고 원소들을 vector 으로 옮겨서 우선순위를 기준으로 오름차순 정렬 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using ..
https://www.acmicpc.net/problem/14921 14921번: 용액 합성하기 홍익대 화학연구소는 다양한 용액을 보유하고 있다. 각 용액은 -100,000,000부터 100,000,000사이의 특성 값을 갖는데, 같은 양의 두 용액을 혼합하면, 그 특성값은 두 용액의 특성값의 합이 된다. 당 www.acmicpc.net 투 포인터 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using int64 = long long; int n; vecto..