自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(22)
  • 收藏
  • 关注

转载 POJ 1459(EK)

这题是学着小媛学姐写的.. 1 #include<cstdio> 2 #include<cstring> 3 #include<iostream> 4 #include<queue> 5 #include <climits> 6 using namespace std; 7 #define N...

2014-05-25 09:47:00 67

转载 POJ 1273(EK)

题目大概意思是,有N条水沟和M个水池,问从第一个水池到最后一个水池在同一时间内能够流过多少水第一行有两个整数N,M接下来N行,每行有3个整数,a,b,c,代表从a到b能够流c单位的水超级模板题,一个有向图,源点为1,汇点为M,套最大流模板就行了我就通过这水题理解EK的... 1 #include<cstdio> 2 #include<cstring&gt...

2014-05-25 09:45:00 67

转载 POJ 1947 Rebuilding Roads

大概的题意是给出n,p,一共有n个节点,问你要剩下p个节点,最少减去最少的边是多少。dp[root][i]:记录root结点,要得到一棵i个节点的子树去掉的最少边数详细解释看代码: 1 #include<cstdio> 2 #include<iostream> 3 #include<cstring> 4 using namesp...

2014-04-11 11:27:00 65

转载 POJ 3254 Corn Fields

1 #include<cstdio> 2 #include<cstring> 3 #include<iostream> 4 using namespace std; 5 #define N 15 6 #define mod 100000000 7 8 int map[N][N],map_num[N]...

2014-04-11 11:25:00 62

转载 POJ 1014 Dividing

多重背包..看代码吧还是orz#include <iostream>using namespace std;#define LEN 7#define INIT 0xffffffffint F[60001];int max(int x, int y){ return x>y?x:y;}void ZeroOn...

2014-04-04 12:05:00 43

转载 HDU 2571

设 d[ i ][ j ] 表示走到坐标为(i, j)的格子时最大的幸运值。初始化:dp[i][j]的第0行和第0列初始化为负的无穷大。。、#include <stdio.h>#include <string.h>#include <algorithm>using namespace std;int map[25][1005...

2014-04-04 12:03:00 79

转载 POJ 2533

最长上升子序列裸题在网上看到有两种方法...一种复杂度O(N^2),一种O(NlogN)。orzO(N^2):#include<cstdio>#define N 1001int main(){ int n,ans; int a[N],d[N]; while(~scanf("%d",&n)){ fo...

2014-04-04 12:01:00 62

转载 POJ 1458

就是找两个字符串的最长公共子序列的长度#include<iostream>#include<string>const int Max=1000;int res[Max][Max];using namespace std;int main(){ string str1,str2; int len1,len2...

2014-04-04 12:00:00 53

转载 POJ 1384

求猜存钱罐中至少有多少钱。容易知道金币总的重量,接着背包。#include<cstdio>#include<iostream>using namespace std;#define N 10010#define M 100000000int dp[N];int val[501],we[501];int main()...

2014-04-04 11:59:00 113

转载 POJ 3624

背包问题,在定容量的背包中放入物体求装满价值最大。因为每种物体数量只有1,故只有放与不放。#include<iostream>#include<cstring>#include<cstdio>using namespace std;#define N 3410#define M 13000int dp[M];in...

2014-04-04 11:58:00 151

转载 POJ 1163 The Triangle

简单DP三角形左右取最大值就好,然后计算到最后一行时再取最大值。#include<iostream>#include<cstdio>using namespace std;int main(){ int a[101][101],n,i,j; while(scanf("%d",&n)!=-1) {...

2014-04-04 11:57:00 53

转载 POJ 2528 Mayor’s posters

Mayor's postersTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 37982Accepted: 11030DescriptionThe citizens of Bytetown, AB, could not stand that the...

2014-03-23 09:29:00 63

转载 HDU 3308 LCIS

LCISTime Limit: 6000/2000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3553Accepted Submission(s): 1577Problem DescriptionGiven n integers.You have ...

2014-03-23 08:57:00 73

转载 POJ 3468

A Simple Problem with IntegersTime Limit: 5000MSMemory Limit: 131072KTotal Submissions: 54392Accepted: 16353Case Time Limit: 2000MSDescriptionYou ...

2014-03-23 08:51:00 50

转载 HDU 1698

Just a HookTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 14770Accepted Submission(s): 7315Problem DescriptionIn the game of D...

2014-03-23 08:46:00 43

转载 HDU 1754

I Hate ItTime Limit: 9000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 32300Accepted Submission(s): 12787Problem Description很多学校流行一种比较的习惯。老师们很喜...

2014-03-18 14:52:00 94

转载 HLG 1400 汽车比赛

题目链接:http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=1400结构体排序+树状数组模板..#include<cstdio>#include<cstring>#include<algorithm>using nam...

2014-03-12 20:25:00 66

转载 POJ 3928 Ping pong

题目链接:http://poj.org/problem?id=3928乒乓比赛,有N个人参加,输入每个玩家的技能等级,对每个人设置一个特定ID和一个技能值,一场比赛需要两个选手和一个裁判,只有当裁判的ID和技能值都在两个选手之间的时候才能进行一场比赛,现在问一共能组织多少场比赛。参考的其他人的代码,重新敲了一遍。/*POJ 3928Ping pong*/#in...

2014-03-12 20:21:00 109

转载 POJ 2299 Ultra-QuickSort

题目链接:http://poj.org/problem?id=2299用了树状数组,求逆序数。读入这些数,每读一个数就update一次,看一下它前面比它小的已出现过的有多少个sum(),然后用当前的位置-当前的sum(),就可以得到当前逆序对数了,加起来就得到总的逆序对数。#include<cstdio>#include<cstring>#in...

2014-03-12 18:54:00 51

转载 2013山东省“浪潮杯”省赛 A.Rescue The Princess

A.Rescue The PrincessDescriptionSeveral days ago, a beast caught a beautiful princess and the princess was put in prison. To rescue the princess, a prince who wanted to marry the princess set ...

2014-03-10 16:20:00 70

转载 HIT 1867 经理的烦恼

题目链接:http://acm.hit.edu.cn/hoj/problem/view?id=1867每次更新时判断是否素数,如果从非素数变成素数就Update(x, 1),如果从素数变成非素数就Update(x, -1)。 1 /*HIT 1867 2 经理的烦恼 3 */ 4 #include<cstdio> 5 #include<cs...

2014-03-08 09:24:00 68

转载 POJ 1195

Mobile phonesTime Limit: 5000MSMemory Limit: 65536KTotal Submissions: 13774Accepted: 6393DescriptionSuppose that the fourth generation mobile...

2014-03-07 21:23:00 100

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除