分治与归并
HPU2_2
这个作者很懒,什么都没留下…
展开
-
Equivalent Strings
Today on a lecture about strings Gerald learned a new definition of string equivalency. Two strings a and b of equal length are called equivalent in one of the two cases:They are equal. If we split...原创 2018-08-03 22:23:38 · 269 阅读 · 0 评论 -
逆序数
在一个排列中,如果一对数的前后位置与大小顺序相反,即前面的数大于后面的数,那么它们就称为一个逆序。一个排列中逆序的总数就称为这个排列的逆序数。 如2 4 3 1中,2 1,4 3,4 1,3 1是逆序,逆序数是4。给出一个整数序列,求该序列的逆序数。 Input 第1行:N,N为序列的长度(n <= 50000) 第2 - N + 1行:序列中的元素(0 <= Ai <...原创 2018-08-03 22:24:22 · 2419 阅读 · 0 评论 -
Quoit Design
Have you ever played quoit in a playground? Quoit is a game in which flat rings are pitched at some toys, with all the toys encircled awarded. In the field of Cyberground, the position of each toy i...原创 2018-08-03 22:25:15 · 543 阅读 · 0 评论