- 博客(28)
- 收藏
- 关注
原创 2014 Multi-University Training Contest 10 1001 最大权闭合图
A simple brute force problem.Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 337 Accepted Submission(s): 191Problem Description
2014-08-27 17:13:05 400
原创 最大权闭合图
建图:*建立一个source点,使它和图中所有的权值为正的点相连,边权等于点权。*建立一个sink点,使图中所有权值为负的点连向它,边权等于点权的绝对值。*使图中原来的边权等于+oo对建好的网络求一次最大流,则最大权闭合图的权值 = 原图中所有正点权的和 - 最大流求最大流后得到的割集,其中包含source的集合去掉sourc
2014-08-27 14:17:26 377
原创 zoj 2676(最小割+01分数规划)
Network WarsTime Limit: 5 Seconds Memory Limit: 32768 KB Special JudgeNetwork of Byteland consists of n servers, connected by m optical cables. Each cable connects two servers and
2014-08-27 09:34:59 404
原创 POJ2728 最小比率生成树
Desert KingTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 20720 Accepted: 5814DescriptionDavid the Great has just become the king of a desert country. To win the respect of his people, he
2014-08-25 18:20:54 329
原创 poj 2976(01分数规划最基础)
Dropping testsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 6151 Accepted: 2131DescriptionIn a certain course, you take n tests. If you get ai out o
2014-08-25 00:26:46 333
原创 2014 Multi-University Training Contest 7 1003 1005
http://acm.hdu.edu.cn/showproblem.php?pid=4937Lucky NumberTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1123 Accepted Submissio
2014-08-15 15:47:56 321
原创 2014 Multi-University Training Contest 8 1002
1002, http://acm.hdu.edu.cn/showproblem.php?pid=4946
2014-08-14 20:47:17 376
原创 2014新生暑假个人排位赛11
B. 田田背课文 2014新生暑假个人排位赛11时间限制 10000 ms 内存限制 65536 KB题目描述田田被老师要求背诵一个字符串,田田刚刚背了一个子串,说他记性差他还不承认,背下这个子串后却忘了这个子串是从哪里开始的。现在田田把这个字符串给你,并且让你告诉他至少一次背多长的子串才不可能产生歧义,即不存在另一个子串与它相等输入格式
2014-08-08 21:11:08 2789
原创 2014新生暑假个人排位赛09
A. diffsum 2014新生暑假个人排位赛09时间限制 1000 ms 内存限制 65536 KB题目描述You are givin an array of integers, and you are to figure out the sum of differences between each pair of integers belonging t
2014-08-08 00:37:41 392
原创 2014新生暑假个人排位赛08
A. 游戏 2014新生暑假个人排位赛08时间限制 1000 ms 内存限制 65536 KB题目描述小弱发明了一个好玩的游戏,游戏开始时给你一个凸多边形,这个多边形可以任意旋转,平移。让你造出一个正方形“容器”(足够大),容器的两边垂直,两边水平。用这个容器把这个多边形完全包含,且多边形有且只有一条边恰好与容器下边界重合(与外界相通),不同的边与外界相通代表不
2014-08-08 00:18:19 550
原创 2014新生暑假个人排位赛07
B. 最长数链 2014新生暑假个人排位赛07时间限制 1000 ms 内存限制 65536 KB题目描述现有正整数集A={i|i>0&&i输入格式每组数据包含一行一个整数n(n输出格式每组数据输出一行,从小到大输出所求集合,注意行尾不要有空格。输入样例6100输出样例1 3 6
2014-08-08 00:06:25 586
原创 2014新生暑假个人排位赛06
A. 修路 2014新生暑假个人排位赛06时间限制 3000 ms 内存限制 65536 KB题目描述小弱的学校很喜欢修路,现在给你一张他学校的地图,地图上有n个点和m条双向边,每条边代表一条路,这条路有可能是畅通,也有可能正在修路。大家都知道修路使得交通很不方便。所有小弱很想学校快快的把路修好,使得他能够很轻松的到达主楼915去刷题。但考虑到学校的施工能力有限
2014-07-27 17:36:16 451
原创 2014新生暑假个人排位赛05
A. 平方的平均值 2014新生暑假个人排位赛05时间限制 1000 ms 内存限制 65536 KB题目描述给定集合A,求集合A的子集合B使得:B中元素的平方的平均值尽可能小。输入格式每组case两行,第一行一个正整数n,n输出格式输出上述比值,如果是整数,直接输出,否则保留两位小数。输入样例34
2014-07-27 14:51:19 419
原创 2014新生暑假个人排位赛03
A. 学姐的数码管 2014新生暑假个人排位赛03时间限制 1000 ms 内存限制 65536 KB题目描述学姐的七段数码管玩的出神入化。 现在给你一个浮点数,你需要把它以七段数码管的形式输出出来。 一个(2∗n+1)∗n的矩阵来表示七段数码管,若下标均从0开始,则以第0列的两个,第n−1列的两个,第0行的一个,第n行的一个,第2∗n行的一个表示七个段。小数点
2014-07-27 14:39:35 369
原创 hdu 1730(转化成nim)
Northcott GameTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2660 Accepted Submission(s): 1132Problem Description Tom和Jerry
2014-07-17 18:57:28 324
原创 poj 1979
#include #include int W, H, res;char a[21][21];int dfs(int i, int j){ if(i>=0&&i=0&&j<W&&(a[i][j]=='.'||a[i][j]=='@')) { a[i][j]='1'; res++; dfs(i+1,j); df
2014-03-31 21:23:46 373
原创 poj 3253
#include #include int a[20010];long long sum=0;int main(){ int n,t,i,s; scanf("%d",&n); for(i=0; i<n; i++) scanf("%d",&a[i]); while(n>1) { int firmin=0,secmin
2014-03-29 14:49:35 372
原创 poj 3069
#include #include int a[1010];int cmp(int *a,int *b){ return *a-*b;}int main(){ int R,n,i,j,k,count;; while(scanf("%d%d",&R,&n)){ if(R==-1&&n==-1)break; count=0;
2014-03-26 18:12:41 414
原创 poj 3617
#include #include char a[2001];int main(){ int n; int i,j,k,ok,count; while(~scanf("%d",&n)){ count=0; for(i=0;i<n;i++) scanf("\n%c",&a[i]); j=0;k=n
2014-03-26 16:49:35 325
原创 poj 2386
#include #include char a[101][101];int N,M;void dfs(int x,int y){ int i,j,dx,dy; a[x][y]='.'; for(i=-1;i<2;i++){ for(j=-1;j<2;j++) { dx=x+i; d
2014-03-25 17:28:29 416
原创 poj 1852
#include #include #includeint a[1000010];int main(){ int cases, lenth, n; int i, j; int max1, min1, max2, min2, min; scanf("%d",&cases); for(i=0;i<cases;i++) { max
2014-03-24 23:09:18 442
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人