[백준] 1107번: 리모콘 (tbc i couldnt)

whitehousechef·2024년 1월 19일
0

https://www.acmicpc.net/problem/1107

initial

https://seongonion.tistory.com/99
v useful I got it thanks to him

I think I need more practice on brute force. I couldnt solve it. So we are gonna calculate every possibility of channel from 0 to million. Why million and not 500k as given in the limit in the question? Cuz we need to consider the possibility of using minus operator as well. For example in that link wait tbh i still dont get it. 600k - 100k when number 1 is broken doesnt make sense.

Anyway we iterate through each number in the string form of channel and if it is a broken number, we skip that channel cuz we cant make it. But if it is a valid channel, we compare the answer with the logic of inputting those numbers in. I dont get that logic still.

0개의 댓글