AC→poj
KamyShi
iOS开发工程师
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
poj_1003——Hangover
地址: http://poj.org/problem?id=1003 题意很简单,输入一个数, 算出1/2 + 1/3 + 1/4 + ... + 1/(n + 1)大于这个数时的最小n。 用了一个很暴力的方法就是打表; #include using namespace std; double c[296]={0.0, 0.5,0.833333,1.08333,1.28原创 2012-03-31 19:56:12 · 922 阅读 · 0 评论 -
水两题 hdu1286 || poj3292
Address:http://acm.hdu.edu.cn/showproblem.php?pid=1286 || http://poj.org/problem?id=3292 hdu1286:中文题 自己应该都能读懂。 poj3292:给你一个数,这个数 是4n+1,看能分成多少个(4i+1)*(4j+1)。 1、 #include #include usin原创 2013-04-16 17:06:32 · 758 阅读 · 0 评论 -
poj——1458——Common Subsequence
地址:Common Subsequence 本题意思就是给你两个子串,让求出这两个串中最长的公共子序列。abcfbc abfcab → abfb/abfc/abcb 本题目其实就是简单的最长公共子序列,解法如下 Dp[] a b c f b c 0 0原创 2013-03-26 16:28:26 · 833 阅读 · 0 评论 -
poj2492——A Bug's Life(并查集扩展)
Address:http://poj.org/problem?id=2492 此题今天我们写的也很纠结。最后才发现是初始化 放错位置了。 #include #include using namespace std; #define MAX 2010 int father[MAX],rela[MAX]; int find(int x) { if(x!=father[x])原创 2013-04-06 16:37:57 · 834 阅读 · 0 评论 -
poj2362——Square(深搜dfs)
Address:http://poj.org/problem?id=2362 一道深搜的题目,整体不是太难。今天做的很水。。 #include #include #include #include using namespace std; int N,stick[26]; int ave; bool visit[26]; bool dfs(int t,int su原创 2013-04-06 15:46:50 · 746 阅读 · 0 评论 -
poj——1031——fence
address:http://poj.org/problem?id=1031 My thought:说实话 看见英语题的时候 状态不咋好,后来勉强把题目看完。 不是太懂,想了好久,题目根本通不了,这英语太菜让我无语,我去度了一下,有的解法是用积分,有的说这是一道很水的题目。 我大概都看了看,有一些代码 提示错误,下面这个代码是可以用的。 题目中有一部分不是太懂,如果哪位朋友看懂了,可以留原创 2013-04-03 13:21:48 · 1341 阅读 · 1 评论 -
找来poj计算几何的题目,做一段时间。
poj 1031 Fence //1039 Pipe ////1066 1092 Farmland ////1106 Transmitters ////1113 Wall ////1118 Lining Up 1133 Stars 1151 Atlantis 1225 STRICTLY INSCRIBED SIMILAR TRIANGLES 1259 The Picnic原创 2013-04-02 15:12:41 · 1134 阅读 · 0 评论 -
poj_1363_Rai
题目:http://poj.org/problem?id=1363 这个题目题意很简单。给你一组数据,让你判断存在不存在这样的出栈顺序,。 这道题是数据结构一个实验,我选了这个,做一下练习吧! 这个代码是具体栈的实现, #include using namespace std; #define size 1010 struct sta { int *top; int *base;原创 2012-04-10 15:16:29 · 622 阅读 · 0 评论 -
poj_3765_Xiang Hex
题目:http://poj.org/problem?id=3765 这个题目是我们一次比赛的题目,看着挺简单的,呵呵,只要你看懂题目就行了,废话不多说。 代码贴上,大家参考下,不懂给我留言。欢迎交流! #include #include #include using namespace std; int main() { string str[23]; str[0]= "原创 2012-04-10 15:34:01 · 1029 阅读 · 0 评论 -
poj_3767——I Wanna Go Home
来源:http://poj.org/problem?id=3767 题目就不贴了,把代码和遇到的问题分享一下吧! 中间用G++交了很多次都是RE(运行错误),后来改用C++交发现还是有问题,一样的错误。这个程序中发现我写的一般都是用C++交比较牢靠,还有定义迪杰斯特拉 函数名的时候我用了个dijk(),然后我悲剧了,RE!你懂得,后来突发奇想改了一下交上去就AC了。郁闷死我啊! 呵呵原创 2012-03-31 19:47:10 · 1092 阅读 · 0 评论 -
poj 1113 Wall
Address:http://poj.org/problem?id=1113 题目意思: 本题目给你N,L,N代表有这个城堡有N个点组成,L是你现在建的墙离城堡的最小距离。 题解 :求出凸包 凸包的周长 加上 以L 为半径的圆周长 #include #include #include using namespace std; #define PI acos(-1.0) s原创 2013-04-25 20:58:59 · 837 阅读 · 0 评论
分享