码迷,mamicode.com
首页 >  
搜索关键字:number    ( 26994个结果
hdu 1711 Number Sequence
思路:裸裸的kmp算法; #include #include int next[5000100],a[5000100],b[5000010]; int n,m; void getnext() { int i=0,j=-1; memset(next,0,sizeof(next)); next[0]=-1; while(i<m) { if(j=...
分类:其他好文   时间:2015-03-11 17:13:22    阅读次数:142
Minimum Inversion Number
DescriptionThe 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 ....
分类:其他好文   时间:2015-03-11 16:58:40    阅读次数:143
NYOJ 411 Friends number (数论--因子和)
链接:点击打开链接 题意: Friends number 时间限制:2000 ms  |  内存限制:65535 KB 难度:2 描述 Paula and Tai are couple. There are many stories between them. The day Paula left by airplane, Tai send one mess...
分类:其他好文   时间:2015-03-11 14:55:02    阅读次数:128
LeetCode N-Queens II
Follow up for N-Queens problem. Now, instead outputting board configurations, return the total number of distinct solutions. 题意:还是n皇后问题。 思路:时间复杂度要求高了,还是每行每行的放,再开一个三维的标记数组,y-x代表了主对角线,y+x代表了负对角...
分类:其他好文   时间:2015-03-11 12:55:52    阅读次数:119
MiniGUI 显示中文
修改/usr/local/etc/MiniGUI.cfg# The first system font must be a logical font using RBF device font.[systemfont]font_number=6#font0=rbf-FixedSys-rrncnn-8...
分类:其他好文   时间:2015-03-11 12:21:17    阅读次数:274
Palindrome Number
Palindrome Number问题:Determine whether an integer is a palindrome. Do this without extra space.思路:常用的进制遍历方法while(num != 0){ remian = num % 进制; ...
分类:其他好文   时间:2015-03-11 12:07:14    阅读次数:148
[leetcode] Number of 1 Bits
Number of 1 BitsWrite a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as theHamming weight).For exampl...
分类:其他好文   时间:2015-03-11 10:48:09    阅读次数:123
【POJ2761】【fhq treap】A Simple Problem with Integers
DescriptionYou haveNintegers,A1,A2, ... ,AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each ...
分类:其他好文   时间:2015-03-11 10:47:01    阅读次数:156
POJ3259 Wormholes Floyd判负圈
DescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination at a t...
分类:其他好文   时间:2015-03-11 09:19:38    阅读次数:129
hdu 1711 Number Sequence KMP
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1711分析:求最小偏移位置使得两字符串匹配,KMP应用。/*Number SequenceTime Limit: 10000/5000 MS (Java/Others) Memory Limit: ...
分类:其他好文   时间:2015-03-11 09:15:57    阅读次数:141
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!