Problem Description
bobo has a sequence a1,a2,…,an. He is allowed to swap two
adjacent numbers for no more than k times.
Find the minimum number of inversions after his swaps.
Note: The number...
分类:
其他好文 时间:
2014-08-05 22:44:03
阅读次数:
248
Problem Description
Given two matrices A and B of size n×n, find the product of them.
bobo hates big integers. So you are only asked to find the result modulo 3.
Input
The input consists of...
分类:
其他好文 时间:
2014-08-05 22:38:00
阅读次数:
248
Description
Let x and y be two strings over some finite alphabet A. We would like to transform
x into y allowing only operations given below:
Deletion: a letter in x is missing in y at a corr...
分类:
其他好文 时间:
2014-08-05 19:32:50
阅读次数:
247
Problem B: The Largest Clique
Given a directed graph G, consider the following transformation. First, create a new graph T(G) to have the same vertex set as G. Create a directed edge between two ve...
分类:
其他好文 时间:
2014-08-05 19:26:40
阅读次数:
365
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpo...
分类:
其他好文 时间:
2014-08-05 18:54:19
阅读次数:
282
1. Not care/give two hoots这个习语在英文中表示“根本不在乎”,有种嗤之以鼻,压根儿瞧不上的赶脚。例:I don't care two hoots about having money, as long as I'm happy.只要开心,我根本不在乎有没有钱。2. Big ...
分类:
其他好文 时间:
2014-08-05 18:35:19
阅读次数:
207
Question: Given two integersnandk, return all possible combinations ofknumbers out of 1 ...n.要产生全部的combinations,我们需要一种有序的方式产生combination以达到既产生全部又没有重复的...
分类:
编程语言 时间:
2014-08-05 15:17:59
阅读次数:
263
Given a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater located within th....
分类:
其他好文 时间:
2014-08-05 13:38:49
阅读次数:
218
PotsTime Limit:1000MSMemory Limit:65536KTotal Submissions:9845Accepted:4146Special JudgeDescriptionYou are given two pots, having the volume ofAandBli...
分类:
其他好文 时间:
2014-08-05 13:21:40
阅读次数:
283