摘要:
Toxophily Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2068 Accepted Submission(s):... 阅读全文
摘要:
reference:http://blog.csdn.net/jayye1994/article/details/12361481 Number String Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/327... 阅读全文
摘要:
monkey Problem:642 Time Limit:1000ms Memory Limit:65536K Description Cc is a lovely monkey. It likes to play the ... 阅读全文
摘要:
题意:给一个字符串,在后面添加最少的字符,使它变成回文串。 思路:显然要找出后缀最长的回文子串,然后加上前面的部分即可,我们可以考虑用字符串哈希或kmp匹配,将后往前和前往后的子串匹配一下,相同的就是回文串。 ①使用滚动哈希的方法,复杂度O(n)。 # include # include ... 阅读全文
摘要:
Eqs Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 16239 Accepted: 7973 Description Consider equations having the foll... 阅读全文
摘要:
找球号(二) 时间限制:1000 ms | 内存限制:65535 KB 难度:5 描述在某一国度里流行着一种游戏。游戏规则为:现有一堆球中,每个球上都有一个整数编号i(0# include # include # define maxn 1000000//开大一点,开小了就R... 阅读全文
摘要:
B. Queue time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output There are n walr... 阅读全文
摘要:
魔法串 Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 2671 Accepted Submission(s): 965 ... 阅读全文
摘要:
1.有1,2,....一直到n的无序数组,求排序算法,并且要求时间复杂度为O(n),空间复杂度O(1),使用交换,而且一次只能交换两个数。 # include int main(){ int a[10] = {8,7,5,4,1,6,3,9,10,2}; for(int i=0; ... 阅读全文
摘要:
A Simple Problem with Integers Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 106215 Accepted: 33148 Case Time Limit: 200... 阅读全文