Skip to content

Conversation

@SeoYoung99
Copy link
Contributor

@SeoYoung99 SeoYoung99 commented Sep 3, 2023

Problem Description

BOJ_17266_굴다리

  • n 길이의 굴다리에 m 개의 가로등을 놓아서 모든 길을 밝힐 수 있는 최소 높이의 가로등 높이 구하기 (단, 가로등은 높이만큼 양옆을 밝힌다)

Explain Process


  • 처음에는 높이를 1부터 차례로 늘려가면서 전체를 비출 수 있는 높이를 구함.
  • while문 안에서 배열을 돌면서 비추는 곳이 충분한지 판단,, --> 시간초과 (당연함,,,,100000까지니까,,^^)
  • 다인의 풀이를 듣고 생각을 바꿔서 각 가로등 사이의 간격과 맨 앞,뒤의 간격만 고려해서 최댓값을 찾음

Comment

땡큐 다인,,,,ㅎ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants