Skip to content

Instantly share code, notes, and snippets.

@waynejo
Created April 19, 2024 11:23
Show Gist options
  • Save waynejo/a333835062252a917acbf157a869a28b to your computer and use it in GitHub Desktop.
Save waynejo/a333835062252a917acbf157a869a28b to your computer and use it in GitHub Desktop.
1개의 표현식으로 나타내기
min(
t2 + t1 + t3 + t1 + t4,
t2 + t1 + t4 + t2 + t2
)
17분인 이유
min(
2 + 1 + 5 + 1 + 10 = 19,
2 + 1 + 10 + 2 + 2 = 17
)
t3 + t1 <= 2 * t2 이여야 하므로
1, 4, 5, 10으로 하면
min(
4 + 1 + 5 + 1 + 10 = 21,
4 + 1 + 10 + 4 + 4 = 23
)
이 된다.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment