From d1550e0b81dbfb5660425ca4c802af39347811fc Mon Sep 17 00:00:00 2001 From: chaeeun-Han Date: Sat, 16 Mar 2024 12:07:20 +0900 Subject: [PATCH] docs: Add PS study saturday post (#16) --- .../study-week3-binary-search-chaeeun-han.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/content/posts/problem_solving/study-week3-binary-search-chaeeun-han.md b/content/posts/problem_solving/study-week3-binary-search-chaeeun-han.md index 6f9d9a4..24de204 100644 --- a/content/posts/problem_solving/study-week3-binary-search-chaeeun-han.md +++ b/content/posts/problem_solving/study-week3-binary-search-chaeeun-han.md @@ -65,4 +65,11 @@ mid 시간 동안 처리할 수 있는 사람 수 계산할 때, `total_people = - 플랫폼: 백준 [[문제보기]](https://www.acmicpc.net/problem/20444) - 풀이 시간: 57min 09sec - 포인트: 총 조각의 갯수는 (가로 자른 횟수 + 1)*(세로 자른 횟수 + 1). -mid를 (가로자른 횟수)라 하면 y는 N-(가로 자른 횟수)로 탐색 \ No newline at end of file +mid를 (가로자른 횟수)라 하면 y는 N-(가로 자른 횟수)로 탐색 + +### 🥳 사냥꾼(500ms) +- 플랫폼: 백준 [[문제보기]](https://www.acmicpc.net/problem/8983) +- 풀이 시간: 40min 08sec +- 포인트: [[선분 위의 점]](https://www.acmicpc.net/problem/11663) 풀이 방식과 유사하다고 생각함. +정렬을 사대로 두고 동물과 사대 거리 공식을 사정거리 l(target)과 비교하며 start, end를 이동하는 방식. +동물 좌표 x가 사대보다 오른쪽에 있으면 start = mid + 1. 왼쪽에 있으면 end = mid - 1. \ No newline at end of file