Skip to content

BOJ16969_차량_번호판_2_실버5_이동혁 #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DHLemonade
Copy link
Collaborator

total = 1로 두고..

경우1) 리스트의 맨 첫 번째 요소는 무조건 경우의 수를 곱해주고
경우2) 두번째 요소부터 이전 요소랑 비교를 한다. 두 개가 같다면 경우의 수 - 1을 곱한다
경우3) 아니면 그냥 경우의 수를 곱한다.

정말 개같은 점은 합계를 항상 10000000009로 나눠서 초기화 하지 않으면 시간초과가 난다는 점이다.
시간복잡도는 똑같이 O(N)인데 메모리 초과도 아니고 시간 초과가 나는 덕분에 실버5 문제 가지고 거의 두 시간을 개삽질한 게 너무 억울

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.

1 participant