Sandy and Nuts (332 E) Time Complexity

Правка en2, от lmn0x4F, 2015-12-16 10:19:39

Hey, I was upsolving some problems and one of them was this one: 599E - Сэнди и Орешки

I liked the problem and after reading the editorial and some silly mistakes in the implementation I got accepted and feel that I learned something, but there's something I don't understand in the editorial, the time complexity.

I understand how to check the fulfillment of the conditions before a transition in O(N3) or O(N·Q) but I don't understand where does the O(3N) come from.

Could anyone give me an explanation or at least some hints about the 3N? ;)

Here's my solution btw 14830356

Thanks :)

Теги dp, bitmask, time complexity

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский lmn0x4F 2015-12-16 10:19:39 16
en1 Английский lmn0x4F 2015-12-16 10:18:26 640 Initial revision (published)