码迷,mamicode.com
首页 >  
搜索关键字:贪心 poj acm    ( 44317个结果
POJ 2151 概率DP
主要的子问题是每一个队伍有一个做出题目的概率,求做出k个题目的概率。简单的简单的组合数DP。想清楚即可。 1: #include 2: #include 3: #include 4: using namespace std; 5: 6: double dp[35][35]; 7: double p[...
分类:其他好文   时间:2014-05-01 11:00:44    阅读次数:328
POJ 1503 Integer Inquiry(大数相加,java)
题目我要开始练习一些java的简单编程了^v^import java.io.*;import java.util.*;import java.math.*;public class Main { /** * @param args */ public static voi...
分类:编程语言   时间:2014-05-01 10:03:42    阅读次数:411
POJ 2443 - Set Operation
注意变换思维,然后就是水题。(如果卡时还可以进一步二分优化。)#include long existed[10000][32];int main(void){ int N;// freopen("poj2443.txt", "r", stdin); scanf("%d", &N);...
分类:其他好文   时间:2014-05-01 09:15:47    阅读次数:373
POJ 3107 - Godfather
本题与POJ 1655的区别是要把所有重心的点按顺序输出出来。// poj3107 Godfather#include #include #define NDEBUG#define MAXN 50005using namespace std;int N;int edgefw[MAXN*2], ...
分类:其他好文   时间:2014-05-01 08:53:09    阅读次数:284
[ACM] POJ2352 [树状数组稍微变形]
DescriptionAstronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level...
分类:其他好文   时间:2014-05-01 05:42:32    阅读次数:368
hdu acm 2082 找单词
找单词Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3722Accepted Submission(s): 2663Problem Descrip...
分类:其他好文   时间:2014-05-01 05:22:05    阅读次数:464
c++ ACM常用函数
1 保留小数点后两位#include cout const char * spilt="/";char *p;p=strtok(str,spilt);while(p!=NULL){ //cout #includesort(Rs.begin(),Rs.end());sort(Rs.begin(),Rs...
分类:编程语言   时间:2014-05-01 05:05:45    阅读次数:409
poj 2723
Get Luffy OutTime Limit:2000MSMemory Limit:65536KTotal Submissions:7295Accepted:2778DescriptionRatish is a young man who always dreams of being a hero...
分类:其他好文   时间:2014-05-01 04:56:26    阅读次数:392
POJ 1655 - Balancing Act
裸的树的重心,要注意的问题是此题的边并没有给出准确的父子拓扑关系,所以需要建双向的边,所以以后要看清题意做仔细分析。可以知道一个结点的子树必定是 它的拓扑子树 和 根树去掉这个拓扑结点树本身,思路也就很明显了。 1 // poj1655 Balancing Act 2 #include 3 #in....
分类:其他好文   时间:2014-05-01 03:19:04    阅读次数:263
UVa 10020 - Minimal coverage(区间覆盖、贪心)
算法入门经典关于区间覆盖的讲解: 8.4.6:区间覆盖问题...
分类:其他好文   时间:2014-04-29 13:21:23    阅读次数:262
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!