摘要:
Recently, Pari and Arya did some research about NP-Hard problems and they found the minimum vertex cover problem very interesting. Suppose the graph G 阅读全文
摘要:
Daniel has a string s, consisting of lowercase English letters and period signs (characters '.'). Let's define the operation of replacement as the fol 阅读全文
摘要:
output standard output output standard output output Ohana Matsumae is trying to clean a room, which is divided up into an n by n grid of squares. Eac 阅读全文
摘要:
Permutation p is an ordered set of integers p1, p2, ..., pn, consisting of n distinct positive integers not larger than n. We'll denote as n the lengt 阅读全文
摘要:
Quite recently a creative student Lesha had a lecture on trees. After the lecture Lesha was inspired and came up with the tree of his own which he cal 阅读全文
摘要:
Peter Parker wants to play a game with Dr. Octopus. The game is about cycles. Cycle is a sequence of vertices, such that first one is connected with t 阅读全文
摘要:
Caisa is going to have a party and he needs to buy the ingredients for a big chocolate cake. For that he is going to the biggest supermarket in town. 阅读全文
摘要:
Vasya has the square chessboard of size n × n and m rooks. Initially the chessboard is empty. Vasya will consequently put the rooks on the board one a 阅读全文
摘要:
DZY loves chessboard, and he enjoys playing with it. He has a chessboard of n rows and m columns. Some cells of the chessboard are bad, others are goo 阅读全文
摘要:
Fedya studies in a gymnasium. Fedya's maths hometask is to calculate the following expression: (1^n + 2^n + 3^n + 4^n) mod 5 for given value of n. Fed 阅读全文