Skip to content

[2025-05-02] gwangseok #471#474

Open
c0natus wants to merge 2 commits intomainfrom
gwangseok-#471
Open

[2025-05-02] gwangseok #471#474
c0natus wants to merge 2 commits intomainfrom
gwangseok-#471

Conversation

@c0natus
Copy link
Copy Markdown
Collaborator

@c0natus c0natus commented Apr 29, 2025

PR Summary

<풀이 시간>

1시간

<문제 회고>

처음엔 팰린드롬인지 확인하는 것을 그때그때해서 O($n^3$)으로 해결해서 시간 초과가 났다.
i부터 j까지 팰린드롬인지 확인하는 것을 미리 계산해서 O($n^2$)으로 해결했다.

image

@c0natus c0natus requested a review from blaire-pi April 29, 2025 13:52
@c0natus c0natus self-assigned this Apr 29, 2025
@c0natus c0natus linked an issue Apr 29, 2025 that may be closed by this pull request
Copy link
Copy Markdown
Collaborator

@blaire-pi blaire-pi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

전반적으로 로직이 비슷해서 이해하기 쉬웠습니다:)



text = read_line().strip()
dp = [2500] * len(text) + [0]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0을 추가한 건 dp를 갱신할 때 start_idx - 1을 처리하기 위해서인가요?

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[2025-05-02]: 팰린드롬 분할

2 participants