摘要: Little penguin Polo has an n × m matrix, consisting of integers. Let's index the matrix rows from 1 to n from top to bottom and let's index the column 阅读全文
posted @ 2020-02-29 11:03 DeaL57 阅读(184) 评论(0) 推荐(0) 编辑
摘要: You have a garland consisting of nn lamps. Each lamp is colored red, green or blue. The color of the ii-th lamp is sisi ('R', 'G' and 'B' — colors of 阅读全文
posted @ 2020-02-29 10:10 DeaL57 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Finally, a basketball court has been opened in SIS, so Demid has decided to hold a basketball exercise session. 2⋅n2⋅n students have come to Demid's e 阅读全文
posted @ 2020-02-29 09:51 DeaL57 阅读(214) 评论(0) 推荐(0) 编辑
摘要: A number is called quasibinary if its decimal representation contains only digits 0 or 1. For example, numbers 0, 1, 101, 110011 — are quasibinary and 阅读全文
posted @ 2020-02-29 09:07 DeaL57 阅读(200) 评论(0) 推荐(0) 编辑
摘要: Vasya has n days of vacations! So he decided to improve his IT skills and do sport. Vasya knows the following information about each of this n days: w 阅读全文
posted @ 2020-02-29 01:11 DeaL57 阅读(245) 评论(0) 推荐(0) 编辑
摘要: You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and su 阅读全文
posted @ 2020-02-28 22:43 DeaL57 阅读(184) 评论(0) 推荐(0) 编辑
摘要: NEKO#ΦωΦ has just got a new maze game on her PC! The game's main puzzle is a maze, in the forms of a 2×n2×n rectangle grid. NEKO's task is to lead a N 阅读全文
posted @ 2020-02-27 22:10 DeaL57 阅读(187) 评论(0) 推荐(0) 编辑
摘要: Bajtek is learning to skate on ice. He's a beginner, so his only mode of transportation is pushing off from a snow drift to the north, east, south or 阅读全文
posted @ 2020-02-27 19:18 DeaL57 阅读(283) 评论(0) 推荐(0) 编辑
摘要: Alice's hair is growing by leaps and bounds. Maybe the cause of it is the excess of vitamins, or maybe it is some black magic... To prevent this, Alic 阅读全文
posted @ 2020-02-27 17:42 DeaL57 阅读(201) 评论(0) 推荐(0) 编辑
摘要: PolandBall lives in a forest with his family. There are some trees in the forest. Trees are undirected acyclic graphs with k vertices and k - 1 edges, 阅读全文
posted @ 2020-02-26 23:49 DeaL57 阅读(181) 评论(0) 推荐(0) 编辑