摘要:DreamGrid has just found an integer sequence in his right pocket. As DreamGrid is bored, he decides to play with the sequence. He can perform the foll
阅读全文
摘要:Magic Odd Square Find an n × n matrix with different numbers from 1 to n2, so the sum in each row, column and both main diagonals are odd. Input The o
阅读全文
摘要:Find an element in hidden array There is an array of length N consisting of non-negative integers. The array is sorted in non-decreasing order. Each n
阅读全文
摘要:String Given a string S and two integers L and M, we consider a substring of S as “recoverable” if and only if (i) It is of length M*L; (ii) It can be
阅读全文
摘要:Decoding of Varints Statements Varint is a type used to serializing integers using one or more bytes. The key idea is to have smaller values being enc
阅读全文
摘要:题目4 : 80 Days 题目4 : 80 Days 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 80 Days is an interesting game based on Jules Verne's science fiction "Around the Wo
阅读全文
摘要:Features Track 31.32% 1000ms 262144K Morgana is learning computer vision, and he likes cats, too. One day he wants to find the cat movement from a cat
阅读全文
摘要:Function The shorter, the simpler. With this problem, you should be convinced of this truth. You are given an array AA of NN postive integers, and MM
阅读全文
摘要:Do you know what is called ``Coprime Sequence''? That is a sequence consists of nnpositive integers, and the GCD (Greatest Common Divisor) of them is
阅读全文
摘要:Covering Covering Bob's school has a big playground, boys and girls always play games here after school. To protect boys and girls from getting hurt w
阅读全文
摘要:Fibonacci-ish Yash has recently learnt about the Fibonacci sequence and is very excited about it. He calls a sequence Fibonacci-ish if You are given s
阅读全文
摘要:B. New Skateboard time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Max wants to buy a new
阅读全文
摘要:Maze Pavel loves grid mazes. A grid maze is an n × m rectangle maze where each cell is either empty, or is a wall. You can go from one cell to another
阅读全文