Skip to content

Commit

Permalink
docs: Add PS study saturday post (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
chaeeun-Han committed Mar 16, 2024
1 parent 367bf2d commit d1550e0
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,11 @@ mid ์‹œ๊ฐ„ ๋™์•ˆ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ๋Š” ์‚ฌ๋žŒ ์ˆ˜ ๊ณ„์‚ฐํ•  ๋•Œ, `total_people =
- ํ”Œ๋žซํผ: ๋ฐฑ์ค€ [[๋ฌธ์ œ๋ณด๊ธฐ]](https://www.acmicpc.net/problem/20444)
- ํ’€์ด ์‹œ๊ฐ„: 57min 09sec
- ํฌ์ธํŠธ: ์ด ์กฐ๊ฐ์˜ ๊ฐฏ์ˆ˜๋Š” (๊ฐ€๋กœ ์ž๋ฅธ ํšŸ์ˆ˜ + 1)*(์„ธ๋กœ ์ž๋ฅธ ํšŸ์ˆ˜ + 1).
mid๋ฅผ (๊ฐ€๋กœ์ž๋ฅธ ํšŸ์ˆ˜)๋ผ ํ•˜๋ฉด y๋Š” N-(๊ฐ€๋กœ ์ž๋ฅธ ํšŸ์ˆ˜)๋กœ ํƒ์ƒ‰
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.

0 comments on commit d1550e0

Please sign in to comment.