![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Hdoj-杭电
Ares233
这个作者很懒,什么都没留下…
展开
-
1002-大数相加
2016暑期ACM学习 http://acm.hdu.edu.cn/showproblem.php?pid=1002#include<iostream> #include<string> #include<cstdio> using namespace std; int main() { string a,b; int num,sum[1000];//数组转载 2016-10-05 15:04:28 · 316 阅读 · 0 评论 -
1532-Drainage Ditches
(http://acm.hdu.edu.cn/showproblem.php?pid=1532)//poj1273,hdoj1532模板代码 注意重边!//s为源点,t为汇点,f为s-t净流量#include <iostream>#include <queue>#include <string.h>#define N 250#define MaxInt 0x3f3f3f3fusing n转载 2016-10-06 14:42:42 · 243 阅读 · 0 评论 -
1875-畅通工程再续
(http://acm.hdu.edu.cn/showproblem.php?pid=1875)//零基础学算法135 #include <iostream>using namespace std;#include <cmath>const double INF=0x3f3f3f3f*1.0;struct node{ int x; int y;};double d[105][翻译 2016-10-06 14:45:13 · 166 阅读 · 0 评论 -
4334-Trouble
(http://acm.hdu.edu.cn/showproblem.php?pid=4334)#include <iostream>#include <stdio.h>#include <string.h>#include <algorithm>using namespace std;long long a[40005],b[40005],c[205],d[205],e[205],f[2翻译 2016-10-06 14:57:14 · 205 阅读 · 0 评论 -
4331-Image Recognition
(http://acm.hdu.edu.cn/showproblem.php?pid=4331)#include<iostream> #include<cmath> #include<cstdio> #include<vector> #include<cstring> #include<algorithm> using namespace std; int t,T,ans,翻译 2016-10-06 14:59:10 · 204 阅读 · 0 评论 -
1003-Max Sum
(http://acm.split.hdu.edu.cn/showproblem.php?pid=1003)#include <iostream> using namespace std; int main() { int j,i,k,n,m,t; int a; //不需要数组,只需要一个输入变量 scanf("%d",&t); for (j翻译 2016-10-06 15:14:59 · 210 阅读 · 0 评论 -
1003-Max Sum
(http://acm.split.hdu.edu.cn/showproblem.php?pid=1003)#include <stdio.h> #define maxn 100000 + 2 int arr[maxn]; int main(){ int t,n,maxLeft,maxRight,maxSum,id=1; int thisSum; sc翻译 2016-10-06 15:18:02 · 202 阅读 · 0 评论 -
数字三角形
#include<stdio.h>#define MAXN 101int a[MAXN][MAXN],d[MAXN][MAXN];int main(){ int n,m,i,j; scanf("%d",&n); while(n--) { scanf("%d",&m); for(i=1;i<=m;i++)翻译 2016-10-06 15:40:56 · 228 阅读 · 0 评论 -
取石子游戏
//必输态:(1,2)、(3,5)、(4,7)、(6,10)、(8,13)、(9,15)、(11,18)、(12,20)......//(x,y)中y-x的值是递增1的,而且x和y是不重复的自然数#include <iostream> #include<stdlib.h> #include<cstring>using namespace std; #define LEN 1000000翻译 2016-10-06 15:44:15 · 309 阅读 · 0 评论 -
1301-Jungle Roads
(http://acm.hdu.edu.cn/showproblem.php?pid=1301)#include<iostream>#include<cstdio>#include<cstring>#define INF 0xfffffff//零基础学算法135 1<n<27 表示村庄数目 int map[28][28],f[133],n,vis[28],dis[28],min;void翻译 2016-10-06 14:39:26 · 172 阅读 · 0 评论 -
1301-Jungle Roads
(http://acm.hdu.edu.cn/showproblem.php?pid=1301)#include<iostream>#include<string>#include<algorithm>using namespace std ;const int MAX_VETEXT_NUM = 26;//最大的顶点数const int MAX_EDGE_NUM = 75;//最大的边数st翻译 2016-10-06 14:38:07 · 163 阅读 · 0 评论 -
4334-哈希
2016暑期ACM学习 4334Trouble-哈希 (http://acm.hdu.edu.cn/showproblem.php?pid=4334)#include <cstdio>#include <iostream>#include <cstring>#include <algorithm>using namespace std;const int mod=401704; //这转载 2016-10-05 14:55:26 · 200 阅读 · 0 评论 -
1622-构造二叉树
(http://acm.hdu.edu.cn/showproblem.php?pid=1622)#include <algorithm> #include <iostream> #include <cstdlib> #include <cstring> #include <cstdio> #include <cmath> #include<conio.h> using na原创 2016-10-05 19:36:39 · 229 阅读 · 0 评论 -
1005-Number Sequence
(http://acm.split.hdu.edu.cn/showproblem.php?pid=1005)#include <cstring>#include <cstdio>#include <cstdlib>using namespace std;int rec[60];int main(){ int a,b,n; rec[0]=rec[1]=rec[2]=1;翻译 2016-10-06 14:12:29 · 195 阅读 · 0 评论 -
1004-Let the Balloon Rise
(http://acm.split.hdu.edu.cn/showproblem.php?pid=1004)#include <iostream>#include<cstring> #include<algorithm>using namespace std; //颜色结构,num用来计算每种颜色出现的次数 struct Color{ int num; char翻译 2016-10-06 14:20:31 · 222 阅读 · 0 评论 -
1006-Tick and Tick
(http://acm.split.hdu.edu.cn/showproblem.php?pid=1006)#include <iostream>#include <cmath>#include <iomanip> using namespace std;struct Segment{ double a,b;};double d;Segment makeseg1(double a, doubl翻译 2016-10-06 14:22:43 · 217 阅读 · 0 评论 -
1009-FatMouse' Trade
(http://acm.hdu.edu.cn/showproblem.php?pid=1009)#include<stdio.h>#include<algorithm>using namespace std;struct Trade{ int j,f; double percent;}mouse[3001];bool cmp(Trade a,Trade b){转载 2016-10-06 14:26:26 · 285 阅读 · 0 评论 -
1049-Climbing Worm
(http://acm.hdu.edu.cn/showproblem.php?pid=1049)#include<stdio.h>int main(){ int n,u,d; while(scanf("%d%d%d",&n,&u,&d),n) { int t=(n-u)/(u-d); if(t*(u-d)<(n-u))转载 2016-10-06 14:28:47 · 165 阅读 · 0 评论 -
1176-免费馅饼
(http://acm.hdu.edu.cn/showproblem.php?pid=1176)#include"stdio.h"#include"stdlib.h"int dp[100110][11];int max(int a,int b){ int max; max=a>b?a:b; return max;}int main(){ int n,i,翻译 2016-10-06 14:30:43 · 157 阅读 · 0 评论 -
5883-The Best Path
(http://acm.split.hdu.edu.cn/showproblem.php?pid=5883)#include<bits/stdc++.h> using namespace std;int indeg[100001];int a[100001],s[1000001],t[1000001];int main(){ int T; scanf("%d",&T);原创 2016-10-07 11:08:54 · 322 阅读 · 0 评论