码迷,mamicode.com
首页 >  
搜索关键字:poj 1979    ( 20310个结果
POJ 3080 Blue Jeans (后缀数组)
题目大意: 求出这些DNA序列中的最长且字典序最小的公共子串。 思路分析: 二分长度的答案,去height中扫描这个长度是否满足,一旦满足就马上输出,这样就可以保证字典序最小了。 #include #include #include #include #define maxn 1005 using namespace std; char str[maxn]...
分类:其他好文   时间:2014-07-22 22:39:12    阅读次数:258
poj 2632 Crashing Robots
坑了,没想的太周到,WA好久, 就两个地方想错了。。 一。对撞在撞墙之前, 二。对撞的是最靠近要动的这个的, 写的是按编号顺序判断。。。心碎了 模拟太坑爹。。。 #include #include #include using namespace std; char qq[105]; int a,s[105][2],b,c,t[3]; int d,e; int k,l,h,m,n; v...
分类:其他好文   时间:2014-07-22 22:38:53    阅读次数:224
poj 1094
Sorting It All Out Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 26911   Accepted: 9285 Description An ascending sorted sequence of distinct values is one ...
分类:其他好文   时间:2014-07-22 22:38:36    阅读次数:166
POJ-1061 青蛙的约会
青蛙的约会Time Limit:1000MSMemory Limit:10000KTotal Submissions:62388Accepted:9696Description两 只青蛙在网上相识了,...
分类:其他好文   时间:2014-07-22 22:36:55    阅读次数:202
POJ1061 青蛙的约会
一、题目POJ 1061 青蛙的约会【关于“欧几里得求最大公约数”和“扩展欧几里得算法”的题目】二、题目源程序#include using namespace std;#define LL long longLL gcd(LL a, LL b){ return b ? gcd(b, a%b)...
分类:其他好文   时间:2014-07-22 22:34:36    阅读次数:253
POJ 1703:Find them, Catch them(带权的并查集)
Find them, Catch them Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 30702   Accepted: 9447 Description The police office in Tadu City decides to sa...
分类:其他好文   时间:2014-07-22 14:41:45    阅读次数:212
POJ 2993 Emag eht htiw Em Pleh 模拟
Emag eht htiw Em Pleh Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 2661   Accepted: 1778 Description This problem is a reverse case of the problem 2996....
分类:其他好文   时间:2014-07-22 14:34:04    阅读次数:230
[ACM] POJ 3252 Round Numbers (一个区间内二进制中0的个数大于等于1的个数有多少个,组合)
Round Numbers Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 8590   Accepted: 3003 Description The cows, as you know, have no fingers or thumbs and thus a...
分类:其他好文   时间:2014-07-22 14:30:24    阅读次数:168
poj Common Substrings(后缀数组&单调队列)
Common Substrings Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 7082   Accepted: 2355 Description A substring of a string T is defined as: T(i, k)=TiTi+...
分类:其他好文   时间:2014-07-22 14:27:08    阅读次数:314
poj 2231 Moo Volume
题意: 给定n个数字。 问任意两数之间的差的总和是多少。 思路: 先从小到大排序。 然后dp转移方程: sum[i]=sum[i-1] + i*(sum[i]-sum[i-1]); 最后结果是ans=sum[n]*2;(因为噪声计算是双向的) 其实与其说是dp,还不如说是找规律。 这样的时间复杂度是sort的时间复杂度O(nlogn)。 主要卡精度。。。。 法一:#i...
分类:其他好文   时间:2014-07-22 14:20:04    阅读次数:174
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!