摘要:
Given a N × N matrix A, whose element in the i-th row and j-th column Aij is an number that equals i2 + 100000 × i + j2 - 100000 × j + i × j, you are 阅读全文
摘要:
Santa has to send presents to the kids. He has a large stack of nn presents, numbered from 11 to nn; the topmost present has number a1a1, the next pre 阅读全文
摘要:
You're given an array a1,…,ana1,…,an of nn non-negative integers. Let's call it sharpened if and only if there exists an integer 1≤k≤n1≤k≤n such that 阅读全文
摘要:
Vasya came to the store to buy goods for his friends for the New Year. It turned out that he was very lucky — today the offer "kk of goods for the pri 阅读全文
摘要:
Inhabitants of the Wonderland have decided to hold a regional programming contest. The Judging Committee has volunteered and has promised to organize 阅读全文
摘要:
Given a positive integer X, an X-factor chain of length m is a sequence of integers, 1 = X0, X1, X2, …, Xm = X satisfying Xi < Xi+1 and Xi | Xi+1 wher 阅读全文
摘要:
Mike is frantically scrambling to finish his thesis at the last minute. He needs to assemble all his research notes into vaguely coherent form in the 阅读全文