Descriptionbobo has a sequence a 1,a 2,…,a n. He is allowed to swap two adjacent numbers for no more than k times. Find the minimum number of inversio...
分类:
其他好文 时间:
2015-08-08 16:29:05
阅读次数:
151
DescriptionOnce Bob took a paper stripe of n squares (the height of the stripe is 1 square). In each square he wrote an integer number, possibly negat...
分类:
其他好文 时间:
2015-08-08 16:16:30
阅读次数:
250
Descriptionbobo has a sequence a1,a2,…,an. He is allowed to swap twoadjacentnumbers for no more than k times.Find the minimum number of inversions aft...
分类:
移动开发 时间:
2015-08-08 16:11:05
阅读次数:
171
This problem can be solved easily once you find the regularities :-) This link has done it for you. You may refer to its Python version. I rewrite it ...
分类:
其他好文 时间:
2015-08-08 16:09:29
阅读次数:
994
Guess the number
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 7077 Accepted Submission(s): 1626
Problem Description
AekdyCoin...
分类:
其他好文 时间:
2015-08-08 15:03:47
阅读次数:
139
使用raw_input函数,它会把所有的输入当作原始数据(raw data),然后将其放入字符串中:>>> input("Enter a number: ")Enter a number: 33>>> raw_input("Enter a number: ")Enter a number: 3'3'...
分类:
编程语言 时间:
2015-08-08 14:44:40
阅读次数:
118
Nim or not Nim?
Description
Nim is a two-player mathematic game of strategy in which players take turns removing objects from distinct heaps. On each turn, a player must remove at least one object, and may remove any number of objects provided they all com...
分类:
其他好文 时间:
2015-08-08 13:39:38
阅读次数:
137
题目链接 :http://acm.hdu.edu.cn/showproblem.php?pid=1394
暴力(Time:453ms)
#include
#define MAXN 5005
int a[MAXN];
int main()
{
int n,i,j;
while(~scanf("%d",&n))
{
int ans=0x3...
分类:
其他好文 时间:
2015-08-08 12:13:07
阅读次数:
155
Problem Description
There are n soda
conveniently labeled by 1,2,…,n.
beta, their best friends, wants to invite some soda to go hiking. The i-th
soda will go hiking if the total number of sod...
分类:
其他好文 时间:
2015-08-08 12:10:46
阅读次数:
127
hdu 1394 的传送门Problem Description
The inversion number of a given number sequence a1, a2, …, an is the number of pairs (ai, aj) that satisfy i aj.For a given sequence of numbers a1, a2, …,...
分类:
其他好文 时间:
2015-08-08 12:10:17
阅读次数:
130