The sequence of integer pairs (a1, b1), (a2, b2), ..., (ak, bk) is beautiful, if the following statements are fulfilled: 1 ≤ a1 ≤ b1 < a2 ≤ b2 < ... < ak ≤ bk ≤ n, where n is a given positive integer; all numbers b1 - a1, b2 - a2, ..., bk - ak ar…
题目链接 http://vjudge.net/contest/132391#problem/G Description standard input/outputStatements — It' s a good game, — Princess said pensively. It was clear that she was thinking about something else. — They like to play various games here in Castles Val…
题目链接:http://codeforces.com/problemset/problem/2/B B. The least round way time limit per test 5 seconds memory limit per test 64 megabytes input standard input output standard output There is a square matrix n × n, consisting of non-negative integer n…