码迷,mamicode.com
首页 >  
搜索关键字:poj 1028-web navigation    ( 21220个结果
poj 3026
挺直接的一个题 哎 想复杂了题意:把n*m矩阵中的字母最小生成树求它的边权值之和 只有字母可以分叉 多了一个提取点的过程思路:prime 算法的简单应用#include#include#includeusing namespace std;char map[55][55];int node[55][...
分类:其他好文   时间:2014-06-09 21:29:26    阅读次数:276
poj 3630 Phone List
1 #include 2 #include 3 #include 4 #define N 100005 5 using namespace std; 6 int Trie[N][10]; 7 int nodeN; 8 int main() 9 {10 int t, n, i, j, isPref.....
分类:其他好文   时间:2014-06-09 20:21:04    阅读次数:219
poj 2584 T-Shirt Gumbo (二分匹配)
T-Shirt GumboTime Limit:1000MSMemory Limit:65536KTotal Submissions:2571Accepted:1202DescriptionBoudreaux and Thibodeaux are student volunteers for thi...
分类:其他好文   时间:2014-06-09 19:43:47    阅读次数:255
poj 1469 COURSES
DescriptionConsider a group of N students and P courses. Each student visits zero, one or more than one courses. Your task is to determine whether it ...
分类:其他好文   时间:2014-06-09 15:36:50    阅读次数:239
poj 1095 Trees Made to Order
http://poj.org/problem?id=1095先求出n个节点数的二叉树的形态有多少种。卡特兰数f[n]=f[n-1]*(4*n-2)/(n+1);再递归求。 1 #include 2 #include 3 #include 4 #define ll long long 5 #de...
分类:其他好文   时间:2014-06-09 15:14:11    阅读次数:167
poj2109
#include #include double n,p;int t; int main(){ while(~scanf("%lf%lf",&n,&p)) { t=int (pow(p,1/n) + 0.5); printf("%d\n",t); } return ...
分类:其他好文   时间:2014-06-09 13:54:21    阅读次数:209
POJ 3270 Cow Sorting(置换群)
题目链接题意 : N头牛,每个牛的坏脾气都有一个值,每个值都不相同,把这个值按照从小到大排序,如果两个值交换,那么会花掉这两个值之和的时间,让你花最少的时间将每个值从小到大排好序,求最小的总时间。思路 : 这个在黑书上有写,就是置换群,248页有写。写的挺详细的。每个状态都可以分为若干个循环的乘积。...
分类:其他好文   时间:2014-06-09 13:41:20    阅读次数:253
POJ 3537
利用后继节点的SG值求出当前的SG值。在当前任意一个BLANK插入一个x后,分成两段,于是,看成两段的NIM,异或和,按SG的定义求出当前的SG值即可。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 ...
分类:其他好文   时间:2014-06-09 13:37:24    阅读次数:235
POJ 1026 Cipher(置换群)
题目链接题意 :由n个数字组成的密钥,每个数字都不相同,都在1~n之间,有一份长度小于等于n的信息,要求将信息放到密钥下边,一一对应,信息不足n的时候补空格,然后将位置重新排列,将此过程重复k次,求最后的字符串序列,最后的空格不用输出。思路 :如果按照最原始的求循环结的话会超时,因为k值范围很大。所...
分类:其他好文   时间:2014-06-09 13:20:42    阅读次数:232
poj 2239 Selecting Courses (二分匹配)
Selecting CoursesTime Limit:1000MSMemory Limit:65536KTotal Submissions:8316Accepted:3687DescriptionIt is well known that it is not easy to select cour...
分类:其他好文   时间:2014-06-08 21:24:48    阅读次数:260
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!