会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Fighting Heart
Microsoft - Software Engineer
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
64
65
66
67
68
69
下一页
2015年5月4日
hdu 1131 Count the Trees
摘要: 卡特兰数*阶乘就是答案 第一次用java。。高精度写起来好快。。。。不过代码比较丑。。import java.math.BigInteger;import java.util.Scanner; public class Main{ public static void main(St...
阅读全文
posted @ 2015-05-04 16:15 Fighting_Heart
阅读(175)
评论(0)
推荐(0)
2015年5月3日
hihoCoder挑战赛11 A 随机斐波那契
摘要: 算了前三项.....发现是个大水题。。。#includeint main(){ int n; while (~scanf("%d", &n)) { double k = 1.0*n; printf("%lf\n", k+1); } retur...
阅读全文
posted @ 2015-05-03 19:26 Fighting_Heart
阅读(173)
评论(0)
推荐(0)
湖南多校对抗赛(2015.05.03)Problem A: Twenty-four point
摘要: 给四个数 问能不能算出24点。。。我的方法比较烂。。。920ms 差点TLE。应该有更好的方法。#include#include#include#includeusing namespace std;double a[5], ff[5], n;double rt[30][5], yy[5];int ...
阅读全文
posted @ 2015-05-03 16:20 Fighting_Heart
阅读(256)
评论(0)
推荐(0)
湖南多校对抗赛(2015.05.03)Problem B: War
摘要: 并查集。从后往前加边。#include#include#include#includeusing namespace std;const int maxn = 1000000 + 10;int father[maxn], u[maxn], v[maxn], Q, q[maxn], ans[maxn]...
阅读全文
posted @ 2015-05-03 16:17 Fighting_Heart
阅读(172)
评论(0)
推荐(0)
hdu 1305 Immediate Decodability
摘要: 字典树。建树的过程中,一边建树一边判断有没有重复前缀的。#include#include#include#includeusing namespace std;char s[1000]; int i, j, summ;struct nn{ int tot, ling, yi; }dt[50000];...
阅读全文
posted @ 2015-05-03 08:18 Fighting_Heart
阅读(320)
评论(0)
推荐(0)
2015年5月2日
hdu 2058 The sum problem
摘要: 数学题目。折腾了一天,这种方法不是最好的,不过按照自己的第一直觉的方法AC还是很开心的。#include#include#include#includeusing namespace std;struct abc{ int start, end;}dt[5000000];bool cmp(co...
阅读全文
posted @ 2015-05-02 18:45 Fighting_Heart
阅读(191)
评论(0)
推荐(0)
2015年5月1日
zoj 2913 Bus Pass
摘要: 对于每个输入的站点求出所有点到这个站点的最短路。用anss数组存下来,然后就可以用anss数组求出答案了。题目分析清楚了 还是比较水的,折腾了一早上。。#include#include#include#include#include#includeusing namespace std;struct...
阅读全文
posted @ 2015-05-01 09:34 Fighting_Heart
阅读(162)
评论(0)
推荐(0)
2015年4月30日
zoj 1649 Rescue
摘要: BFS..第一次使用C++ STL的队列来写广搜。#include#include#include#include#includeusing namespace std;const int maxn = 222;struct Point{ int time, x, y; };queue Q;char...
阅读全文
posted @ 2015-04-30 08:51 Fighting_Heart
阅读(165)
评论(0)
推荐(0)
2015年4月29日
poj 1659 Frogs' Neighborhood
摘要: 简单的Havel-Hakimi定理(建图)的应用。#include#include#include#includeusing namespace std;const int maxn = 15;int ee[maxn][maxn];struct abc{ int f, node; }dt[maxn]...
阅读全文
posted @ 2015-04-29 21:27 Fighting_Heart
阅读(140)
评论(0)
推荐(0)
2015年4月28日
hdu 1385 Minimum Transport Cost
摘要: BFS注意字典序的问题。WA了好多发。#include#include#include#include#includeusing namespace std;const int maxn = 70;int n, cost[maxn][maxn],bb[maxn], ji[maxn];struct a...
阅读全文
posted @ 2015-04-28 23:04 Fighting_Heart
阅读(194)
评论(0)
推荐(0)
hdu 2680 Choose the best route
摘要: BFS.....#include#include#include#include#includeusing namespace std;const int maxn = 1111;vectorabc[maxn];int ji[maxn], tt[maxn][maxn], yy[maxn];struc...
阅读全文
posted @ 2015-04-28 21:15 Fighting_Heart
阅读(140)
评论(0)
推荐(0)
写了一下午的dijkstra。突然发现我写的根本不是dijkstra。。。。是没优化过的BFS.......
摘要: 写了一下午的dijkstra。突然发现我写的根本不是dijkstra。。。。是没优化过的BFS.......
阅读全文
posted @ 2015-04-28 19:38 Fighting_Heart
阅读(174)
评论(0)
推荐(0)
hdu 1548 A strange lift
摘要: SPFA#include#include#include#include#includeusing namespace std;const int maxn = 222;int k[maxn], ji[maxn];vector abc[maxn];struct aaa{int node, tot;}...
阅读全文
posted @ 2015-04-28 18:59 Fighting_Heart
阅读(129)
评论(0)
推荐(0)
hdu 2066 一个人的旅行
摘要: SPFA#include#include#include#include#includeusing namespace std;const int maxn = 1111;int tt[maxn][maxn], ji[maxn], yy[maxn];vectorabc[maxn];struct qw...
阅读全文
posted @ 2015-04-28 16:21 Fighting_Heart
阅读(152)
评论(0)
推荐(0)
hdu 2544 最短路
摘要: SPFA#include#include#include#include#includeusing namespace std;const int maxn = 2222;vectorabc[maxn];int s[maxn][maxn];int js[maxn];struct aaa{ in...
阅读全文
posted @ 2015-04-28 15:26 Fighting_Heart
阅读(126)
评论(0)
推荐(0)
hdu 1874 畅通工程续
摘要: SPFA#include#include#include#include#includeusing namespace std;const int maxn = 2222;vectorabc[maxn];int s[maxn][maxn];int js[maxn];struct aaa{ in...
阅读全文
posted @ 2015-04-28 14:48 Fighting_Heart
阅读(132)
评论(0)
推荐(0)
2015年4月27日
接下来的一段时间...
摘要: 认真的开始学习图论......必定会碰壁的,但是还是要坚持下来!!!
阅读全文
posted @ 2015-04-27 15:48 Fighting_Heart
阅读(173)
评论(0)
推荐(0)
2015年4月23日
zoj 3204 Connect them
摘要: 最小生成树,我用的是并查集+贪心的写法。#include#include#include#includeusing namespace std;const int maxn = 111;int c[maxn][maxn];int father[maxn];int flag[maxn];struct ...
阅读全文
posted @ 2015-04-23 09:38 Fighting_Heart
阅读(151)
评论(0)
推荐(0)
2015年4月22日
ZOJ 3490 String Successor
摘要: 简单的模拟题,类似于高精度加法运算。理解题意即可。#include#include#include#includeusing namespace std;const int maxn = 111;char s[maxn];char ji[maxn];int gg[maxn];void RevStr(...
阅读全文
posted @ 2015-04-22 21:37 Fighting_Heart
阅读(177)
评论(0)
推荐(0)
URAL 6089 Nine
摘要: 水题,找误差范围之内9最多的时间,如果有多个,选择误差最小的一个,如果还有多个,选择字典序最小的一个。同一个时间可以有不同的表示方法,例如60:15也可以表示为59:75。#include#include#include#includeusing namespace std;int main(){ ...
阅读全文
posted @ 2015-04-22 17:22 Fighting_Heart
阅读(156)
评论(0)
推荐(0)
上一页
1
···
64
65
66
67
68
69
下一页
公告