摘要:
The inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i < j and ai > aj. For a given sequence o 阅读全文
posted @ 2017-08-05 17:10
阿波罗2003
阅读(149)
评论(0)
推荐(0)
摘要:
Vasya is studying number theory. He has denoted a function f(a, b) such that: f(a, 0) = 0; f(a, b) = 1 + f(a, b - gcd(a, b)), where gcd(a, b) is the g 阅读全文
posted @ 2017-08-05 16:49
阿波罗2003
阅读(348)
评论(0)
推荐(0)
摘要:
Let's call the roundness of the number the number of zeros to which it ends. You have an array of n numbers. You need to choose a subset of exactly k 阅读全文
posted @ 2017-08-05 15:48
阿波罗2003
阅读(258)
评论(0)
推荐(0)
摘要:
You are given a directed acyclic graph with n vertices and m edges. There are no self-loops or multiple edges between any pair of vertices. Graph can 阅读全文
posted @ 2017-08-05 14:16
阿波罗2003
阅读(500)
评论(0)
推荐(0)
摘要:
Of course our child likes walking in a zoo. The zoo has n areas, that are numbered from 1 to n. The i-th area contains ai animals in it. Also there ar 阅读全文
posted @ 2017-08-05 13:42
阿波罗2003
阅读(362)
评论(0)
推荐(0)
浙公网安备 33010602011771号