C. New Year and Domino They say "years are like dominoes, tumbling one after the other". But would a year fit into a grid? I don't think so. Limak is a little polar bear who loves to play. He has recently got a rectangular grid with h rows and…
C. New Year and Domino time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output They say "years are like dominoes, tumbling one after the other". But would a year fit into a grid? I don't thin…
C. New Year and Domino 题目连接: http://www.codeforces.com/contest/611/problem/C Description They say "years are like dominoes, tumbling one after the other". But would a year fit into a grid? I don't think so. Limak is a little polar bear who loves…
题目描述: They say "years are like dominoes, tumbling one after the other". But would a year fit into a grid? I don't think so. Limak is a little polar bear who loves to play. He has recently got a rectangular grid with h rows and w columns. Each ce…
D. New Year and Ancient Prophecy time limit per test 2.5 seconds memory limit per test 512 megabytes input standard input output standard output Limak is a little polar bear. In the snow he found a scroll with the ancient prophecy. Limak doesn't know…
B. New Year and Old Property The year 2015 is almost over. Limak is a little polar bear. He has recently learnt about the binary system. He noticed that the passing year has exactly one zero in its representation in the binary system — 201510 = 111…