04 2015 档案

摘要:bestcoder#37_1001 字符串,dfsRikka with string Accepts: 395 Submissions: 2281 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/... 阅读全文
posted @ 2015-04-11 23:15 __560 阅读(260) 评论(0) 推荐(0)
摘要:codeforces#297div2_d bfs,2*2法判断矩阵里的矩形D. Arthur and Wallstime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandar... 阅读全文
posted @ 2015-04-11 15:17 __560 阅读(291) 评论(0) 推荐(0)
摘要:codeforces#297div2_c 贪心C. Ilya and Stickstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn the ... 阅读全文
posted @ 2015-04-11 12:04 __560 阅读(291) 评论(0) 推荐(0)
摘要:codeforces#297div2_b 贪心,字符串Pasha got a very beautiful stringsfor his birthday, the string consists of lowercase Latin letters. The letters in the stri... 阅读全文
posted @ 2015-04-11 11:31 __560 阅读(258) 评论(0) 推荐(0)
摘要:poj2983——差分约束,bellman_fordIs the Information Reliable?Time Limit:3000MSMemory Limit:131072KTotal Submissions:11560Accepted:3658DescriptionThe galaxy w... 阅读全文
posted @ 2015-04-09 23:56 __560 阅读(289) 评论(0) 推荐(0)
摘要:poj1201——差分约束,spfaIntervalsTime Limit:2000MSMemory Limit:65536KTotal Submissions:22553Accepted:8530DescriptionYou are given n closed, integer interval... 阅读全文
posted @ 2015-04-09 21:55 __560 阅读(429) 评论(0) 推荐(0)
摘要:图的邻接表存储struct Edge{ int v; ll w; Edge *next;};Edge e[maxn*10];void add_edge(int u,int v,ll w) ///插入邻接表的首部而非尾部,避免遍历{ Edge *pre=&e[u]; Ed... 阅读全文
posted @ 2015-04-09 17:42 __560 阅读(200) 评论(0) 推荐(0)
摘要:hiho1093 ——spfa时间限制:10000ms单点时限:1000ms内存限制:256MB描述万圣节的晚上,小Hi和小Ho在吃过晚饭之后,来到了一个巨大的鬼屋!鬼屋中一共有N个地点,分别编号为1..N,这N个地点之间互相有一些道路连通,两个地点之间可能有多条道路连通,但是并不存在一条两端都是同... 阅读全文
posted @ 2015-04-09 17:37 __560 阅读(304) 评论(0) 推荐(0)
摘要:poj1716——差分约束Integer IntervalsTime Limit:1000MSMemory Limit:10000KTotal Submissions:13029Accepted:5516DescriptionAn integer interval [a,b], a =2,0=2,s... 阅读全文
posted @ 2015-04-09 14:58 __560 阅读(276) 评论(0) 推荐(0)
摘要:poj1113——凸包WallTime Limit:1000MSMemory Limit:10000KTotal Submissions:31132Accepted:10497DescriptionOnce upon a time there was a greedy King who ordere... 阅读全文
posted @ 2015-04-07 19:43 __560 阅读(266) 评论(0) 推荐(0)
摘要:求凸包—— graham_scan算法先按Y-X排序,在按对p0的极角排序,然后进行扫瞄bool cmp(Point A,Point B){ //return (A-vert[0])*(B-vert[0])>EPS; double tmp=(A-vert[0])*(B-vert[0]);... 阅读全文
posted @ 2015-04-06 23:18 __560 阅读(359) 评论(0) 推荐(0)
摘要:poj2187 求平面最远点对,garham_scan算法求凸包Beauty ContestTime Limit:3000MSMemory Limit:65536KTotal Submissions:29666Accepted:9180DescriptionBessie, Farmer John's... 阅读全文
posted @ 2015-04-06 23:09 __560 阅读(320) 评论(0) 推荐(0)
摘要:bestcoder#36 1002 哈希GunnerTime Limit: 8000/4000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 726Accepted Submission(s... 阅读全文
posted @ 2015-04-05 17:29 __560 阅读(261) 评论(0) 推荐(0)
摘要:poj1584——判断凸包,判断点是否在多边形内A Round Peg in a Ground HoleTime Limit:1000MSMemory Limit:10000KTotal Submissions:5441Accepted:1729DescriptionThe DIY Furnitur... 阅读全文
posted @ 2015-04-03 13:25 __560 阅读(432) 评论(0) 推荐(0)
摘要:poj1408——叉积求多边形面积FishnetTime Limit:1000MSMemory Limit:10000KTotal Submissions:1853Accepted:1185DescriptionA fisherman named Etadokah awoke in a very s... 阅读全文
posted @ 2015-04-02 22:44 __560 阅读(252) 评论(0) 推荐(0)
摘要:重载Point其中减法表示向量,乘法表示叉积struct Point{ double x,y; friend double operator*(const Point A,const Point B) { return A.x*B.y-A.y*B.x; } ... 阅读全文
posted @ 2015-04-02 18:25 __560 阅读(230) 评论(0) 推荐(0)
摘要:求直线与线段的交点求交点定比分点法,用叉积求面积,用面积比代替线段长度比Point inter_point(Point A,Point B,Point C,Point D)///返回直线AB和线段CD的交点{ if(!intersect(A,B,C,D)) return {-INF*1.0,0... 阅读全文
posted @ 2015-04-02 18:23 __560 阅读(257) 评论(0) 推荐(0)
摘要:poj1039——计算几何 求直线与线段交点,判断两条直线是否相交PipeTime Limit:1000MSMemory Limit:10000KTotal Submissions:9439Accepted:2854DescriptionThe GX Light Pipeline Company s... 阅读全文
posted @ 2015-04-02 18:05 __560 阅读(870) 评论(0) 推荐(0)