码迷,mamicode.com
首页 >  
搜索关键字:poj 1061    ( 20310个结果
Binary Stirling Numbers
http://poj.org/problem?id=1430 题目: 求 第二类 斯特林数 的 奇偶性 即 求 s2 ( n , m ) % 2 ; 题解: https://blog.csdn.net/ez_2016gdgzoi471/article/details/80219736 #includ ...
分类:其他好文   时间:2019-06-02 21:48:43    阅读次数:126
【POJ - 1321】棋盘问题 (dfs)
棋盘问题 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。 Input 输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开 ...
分类:其他好文   时间:2019-06-02 15:58:08    阅读次数:85
poj 2406
Power Strings Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 64350 Accepted: 26531 Description Given two strings a and b we define a*b to ...
分类:其他好文   时间:2019-06-02 01:29:03    阅读次数:125
poj 1463树形dp 树的最小覆盖
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<queue> #include<vector> using namespace std; // push_back inline in ...
分类:其他好文   时间:2019-06-02 01:04:48    阅读次数:100
poj 1947 树形dp
dp【root】【j】:以root为根节点的子树,得到 j 个节点的子树需要最少减掉的边数,注意子树中必须保留root节点。否则无法dp #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #includ ...
分类:其他好文   时间:2019-06-01 23:25:56    阅读次数:132
poj 2342树形dp板子题1
http://poj.org/problem?id=2342 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<queue> #include<vector> using namesp ...
分类:其他好文   时间:2019-06-01 23:02:30    阅读次数:120
POJ 1163 The Triangle
Description Figure 1 shows a number triangle. Write a program that calculates the highest sum of numbers passed on a route that starts at the top and ...
分类:其他好文   时间:2019-06-01 19:44:46    阅读次数:89
POJ_2253 Frogger 【最短路变形】
一、题目 Frogger 二、分析 题意关键点就是那个青蛙距离。就是所有1到2的点的路径中,每条路径都可以确定一个最大值,这个最大值就是青蛙要跳的青蛙距离,然后要求这个青蛙距离最小值。 其实就是最短路的变形,用dijkstra,原先求最短路的时候是每次确定当前最小距离的点,那么,这题只需要每次确定一 ...
分类:其他好文   时间:2019-06-01 12:37:34    阅读次数:99
Cut the Sequence
"POJ" 题意:给定一个长度为N($N include include include include define LL long long using namespace std; inline LL read(){ LL s=0,w=1;char ch=getchar(); while(ch ...
分类:其他好文   时间:2019-06-01 11:13:40    阅读次数:112
POJ_2387 Til the Cows Come Hom 【最短路】
一、题目 POJ2387 二、分析 Bellman-Ford算法 该算法是求单源最短路的,核心思想就是不断去更新到起点的最短距离,更新的前提是没有负边。如果有负边需要手动控制循环次数。 Dijkstra算法 同样是单源最短路,它的核心是 (1) 找到最短距离已经确定的顶点,再从该顶点出发,更新与它相 ...
分类:其他好文   时间:2019-05-31 19:27:49    阅读次数:98
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!