摘要:A simple math on modular calculations.Code below can be simplified of course.
阅读全文
07 2016 档案
摘要:Another interesting DP. Lesson learnt: how you define state is crucial.. 1. if DP[i] is defined as, longest wiggle(up\down) subseq AT number i, you wi
阅读全文
摘要:DP or Greedy - they are all in O(n) In editorial, a beautiful Greedy solution is given: "To reach the last cloud in a minimum number of steps, always
阅读全文
摘要:Another fun Greedy problem to work on: we simply go from first to second last person, as long someone is odd, we distribute bread to her and her next.
阅读全文
摘要:Greedy - though simple, but fun!
阅读全文
摘要:Fun with bits - carries etc.
阅读全文

浙公网安备 33010602011771号