- 博客(100)
- 收藏
- 关注
原创 计算几何总结
计算几何总结一、精度控制计算几何经常牵扯到浮点数的运算,所以就会产生精度误差,因此我们需要设置一个eps(偏差值),一般取1e-7到1e-10之间,并用下面的函数控制精度。const double eps=1e-8;int dcmp(double x){ if (fabs(x)<eps) return 0; else return x<0?-1:1;}二、向量
2017-01-01 15:53:50 18115 8
原创 bzoj 4013: [HNOI2015]实验比较 (树形DP+组合数学)
4013: [HNOI2015]实验比较Time Limit: 5 Sec Memory Limit: 512 MBSubmit: 511 Solved: 254[Submit][Status][Discuss]Description小D 被邀请到实验室,做一个跟图片质量评价相关的主观实验。实验用到的图片集一共有 N 张图片,编号为 1 到 N。实验分若干轮进行,在每轮
2017-01-24 15:10:52 325
原创 hdu 5212 Code (数论)
CodeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 939 Accepted Submission(s): 372Problem DescriptionWLD likes playing with code
2017-01-23 20:45:29 245
原创 poj 3678 Katu Puzzle (2-SAT)
Katu PuzzleTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9567 Accepted: 3578DescriptionKatu Puzzle is presented as a directed graph G(V, E) with each
2017-01-22 20:54:18 418
原创 poj 3207 Ikki's Story IV - Panda's Trick (2-SAT)
Ikki's Story IV - Panda's TrickTime Limit: 1000MS Memory Limit: 131072KTotal Submissions: 9752 Accepted: 3576Descriptionliympanda, one of Ikki’s friend, likes p
2017-01-22 20:20:41 231
原创 bzoj 1063: [Noi2008]道路设计 (树形dp)
1063: [Noi2008]道路设计Time Limit: 20 Sec Memory Limit: 162 MBSubmit: 990 Solved: 547[Submit][Status][Discuss]Description Z国坐落于遥远而又神奇的东方半岛上,在小Z的统治时代公路成为这里主要的交通手段。Z国共有n座城市,一些城市之间由双向的公路所连接。
2017-01-22 19:35:27 656
原创 bzoj 1532: [POI2005]Kos-Dicing (二分+最大流)
1532: [POI2005]Kos-DicingTime Limit: 5 Sec Memory Limit: 64 MBSubmit: 1577 Solved: 542[Submit][Status][Discuss]DescriptionDicing 是一个两人玩的游戏,这个游戏在Byteotia非常流行. 甚至人们专门成立了这个游戏的一个俱乐部. 俱乐部的人时常
2017-01-22 16:56:06 407
原创 BestCoder Round #91
Lotus and Characters Accepts: 150 Submissions: 897 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/131072 K (Java/Others)问题描述Lotus有nn种字母,给出每种字母的价值以及每种字母的个数限制,她
2017-01-22 16:35:12 554
原创 hdu 1814 Peaceful Commission (2-SAT)
Peaceful CommissionTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3355 Accepted Submission(s): 1101Problem DescriptionThe Publi
2017-01-21 17:33:06 262
原创 hdu 3622 Bomb Game (2-SAT)
Bomb GameTime Limit: 10000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5369 Accepted Submission(s): 1912Problem DescriptionRobbie is playing a
2017-01-21 16:19:05 364
原创 bzoj 2732: [HNOI2012]射箭 (二分+半平面交)
2732: [HNOI2012]射箭Time Limit: 10 Sec Memory Limit: 128 MBSubmit: 2537 Solved: 853[Submit][Status][Discuss]Description沫沫最近在玩一个二维的射箭游戏,如下图 1 所示,这个游戏中的 x 轴在地面,第一象限中有一些竖直线段作为靶子,任意两个靶子都没有公共部分
2017-01-20 23:22:21 383
原创 poj 2451 Uyuw's Concert (半平面交)
Uyuw's ConcertTime Limit: 6000MS Memory Limit: 65536KTotal Submissions: 9483 Accepted: 3534DescriptionPrince Remmarguts solved the CHESS puzzle successfully. As a
2017-01-20 19:15:53 289
原创 bzoj 2741: 【FOTILE模拟赛】L (分块+可持久化trie树)
2741: 【FOTILE模拟赛】LTime Limit: 15 Sec Memory Limit: 162 MBSubmit: 2572 Solved: 735[Submit][Status][Discuss]DescriptionFOTILE得到了一个长为N的序列A,为了拯救地球,他希望知道某些区间内的最大的连续XOR和。即对于一个询问,你需要求出max(Ai
2017-01-20 16:49:47 513
原创 codeforces 455 D. Serega and Fun (分块+双向链表)
D. Serega and Funtime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSerega loves fun. However, everyone has f
2017-01-19 17:11:31 1347
原创 bzoj 3530: [Sdoi2014]数数 (AC自动机+数位DP)
3530: [Sdoi2014]数数Time Limit: 10 Sec Memory Limit: 512 MBSubmit: 814 Solved: 423[Submit][Status][Discuss]Description我们称一个正整数N是幸运数,当且仅当它的十进制表示中不包含数字串集合S中任意一个元素作为其子串。例如当S=(22,333,0233)时,23
2017-01-19 15:13:35 399
原创 codeforces 348 C. Subset Sums (暴力+技巧)
C. Subset Sumstime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an array a1, a2, ..., an and m
2017-01-18 17:09:49 532
原创 codeforces 13 E. Holes (分块)
E. Holestime limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard outputLittle Petya likes to play a lot. Most of all he lik
2017-01-18 14:37:31 393
原创 codeforces 551 E. GukiZ and GukiZiana (分块)
E. GukiZ and GukiZianatime limit per test10 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputProfessor GukiZ was playing with ar
2017-01-18 10:00:36 322
原创 bzoj 4216: Pig (分块)
4216: PigTime Limit: 10 Sec Memory Limit: 3 MBSubmit: 720 Solved: 176[Submit][Status][Discuss]Description红学姐和黄学长是好朋友。有一天,黄学长想吃猪肉丸,于是他去找红学姐买猪。红学姐到她的猪圈中赶猪的时候发现有许多猪逃离了她的猪圈。同时红学姐发现,一个名叫w
2017-01-18 08:07:44 225
原创 bzoj 2388: 旅行规划 (分块+凸包+三分)
2388: 旅行规划Time Limit: 50 Sec Memory Limit: 128 MBSubmit: 281 Solved: 78[Submit][Status][Discuss]DescriptionOIVillage是一个风景秀美的乡村,为了更好的利用当地的旅游资源,吸引游客,推动经济发展,xkszltl决定修建了一条铁路将当地n个最著名的经典连接起来,
2017-01-17 23:19:01 573
原创 bzoj 1486: [HNOI2009]最小圈 (01分数规划+深搜版spfa)
1486: [HNOI2009]最小圈Time Limit: 10 Sec Memory Limit: 64 MBSubmit: 2224 Solved: 1046[Submit][Status][Discuss]Description InputOutputSample Input4 51 2 52 3 53 1 5
2017-01-16 16:34:45 335
原创 poj 3155 Hard Life (最大密度子图)
Hard LifeTime Limit: 8000MS Memory Limit: 65536KTotal Submissions: 8595 Accepted: 2497Case Time Limit: 2000MS Special JudgeDescriptionJohn is a Chief
2017-01-16 15:07:37 336
原创 bzoj 1565: [NOI2009]植物大战僵尸 (最大权闭合子图+tarjan+拓扑序)
1565: [NOI2009]植物大战僵尸Time Limit: 10 Sec Memory Limit: 64 MBSubmit: 2345 Solved: 1081[Submit][Status][Discuss]DescriptionInputOutput仅包含一个整数,表示可以获得的最大能源收入。注意,你也可以选择不进行任何攻击,这样能源
2017-01-16 14:09:15 332
原创 poj 2987 Firing (最大权闭合子图)
FiringTime Limit: 5000MS Memory Limit: 131072KTotal Submissions: 10248 Accepted: 3110DescriptionYou’ve finally got mad at “the world’s most stupid” employees of
2017-01-16 09:04:57 446
原创 hdu 3987 Harry Potter and the Forbidden Forest (最小割)
Harry Potter and the Forbidden ForestTime Limit: 5000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2081 Accepted Submission(s): 696Problem Descri
2017-01-15 17:42:27 457
原创 spoj 839 OPTM - Optimal Marks (最小割)
OPTM - Optimal Marksno tags You are given an undirected graph G(V, E). Each vertex has a mark which is an integer from the range [0..231 – 1]. Different vertexes may have the same ma
2017-01-15 17:14:16 284
原创 bzoj 2400: Spoj 839 Optimal Marks (最小割)
2400: Spoj 839 Optimal MarksTime Limit: 10 Sec Memory Limit: 128 MBSubmit: 681 Solved: 256[Submit][Status][Discuss]Description定义无向图中的一条边的值为:这条边连接的两个点的值的异或值。定义一个无向图的值为:这个无向图所有边的值的和。
2017-01-15 15:12:54 253
原创 poj 3621 Sightseeing Cows (最优比率环)
Sightseeing CowsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9976 Accepted: 3402DescriptionFarmer John has decided to reward his cows for their hard
2017-01-14 19:29:35 297
原创 poj 2728 Desert King (最优比率生成树)
Desert KingTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 24814 Accepted: 6882DescriptionDavid the Great has just become the king of a desert country.
2017-01-14 17:16:07 309
原创 poj 2976 Dropping tests (01分数规划)
Dropping testsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 10428 Accepted: 3629DescriptionIn a certain course, you take n tests. If you get ai out of
2017-01-14 15:26:30 256
原创 bzoj 3993: [SDOI2015]星际战争 (二分+最大流)
3993: [SDOI2015]星际战争Time Limit: 10 Sec Memory Limit: 128 MBSec Special JudgeSubmit: 1036 Solved: 483[Submit][Status][Discuss]Description 3333年,在银河系的某星球上,X军团和Y军团正在激烈地作战。在战斗的某一阶段,Y军团一共派遣了
2017-01-14 14:43:20 317
原创 bzoj 4514: [Sdoi2016]数字配对 (二分+费用流)
4514: [Sdoi2016]数字配对Time Limit: 10 Sec Memory Limit: 128 MBSubmit: 1191 Solved: 446[Submit][Status][Discuss]Description有 n 种数字,第 i 种数字是 ai、有 bi 个,权值是 ci。若两个数字 ai、aj 满足,ai 是 aj 的倍数,且 ai
2017-01-14 11:22:09 478
原创 bzoj 1316: 树上的询问 (点分治)
1316: 树上的询问Time Limit: 10 Sec Memory Limit: 162 MBSubmit: 564 Solved: 150[Submit][Status][Discuss]Description一棵n个点的带权有根树,有p个询问,每次询问树中是否存在一条长度为Len的路径,如果是,输出Yes否输出No.Input第一行两个整数n, p
2017-01-13 19:35:53 501
原创 bzoj 1468: Tree (点分治)
1468: TreeTime Limit: 10 Sec Memory Limit: 64 MBSubmit: 1351 Solved: 713[Submit][Status][Discuss]Description给你一棵TREE,以及这棵树上边的距离.问有多少对点它们两者间的距离小于等于KInputN(nOutput一行,有多少对点之间的距离
2017-01-13 19:17:55 460
原创 poj 2114 Boatherds (点分治)
BoatherdsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 2564 Accepted: 829DescriptionBoatherds Inc. is a sailing company operating in the country of Tr
2017-01-13 18:56:08 370
原创 vijos P1739计算系数 (组合数学)
P1739计算系数Wrong Answer标签:NOIP提高组2011[显示标签]描述给定一个多项式(ax + by)^k,请求出多项式展开后x^n * y^m项的系数。格式输入格式共一行,包含5个整数,分别为a,b,k,n,m,每两个整数之间用一个空格隔开。输出格式输出共1行,包含一个整数,表示所
2017-01-13 16:12:50 384
原创 bzoj 1856: [Scoi2010]字符串 (组合数学)
1856: [Scoi2010]字符串Time Limit: 5 Sec Memory Limit: 64 MBSubmit: 1389 Solved: 770[Submit][Status][Discuss]Descriptionlxhgww最近接到了一个生成字符串的任务,任务需要他把n个1和m个0组成字符串,但是任务还要求在组成的字符串中,在任意的前k个字符中,1的
2017-01-13 10:46:38 288
原创 poj 2891 Strange Way to Express Integers (中国剩余定理不互质)
Strange Way to Express IntegersTime Limit: 1000MS Memory Limit: 131072KTotal Submissions: 14953 Accepted: 4918DescriptionElina is reading a book written by Ruji
2017-01-13 08:04:55 255
原创 bzoj 1396: 识别子串 (后缀自动机+线段树)
1396: 识别子串Time Limit: 10 Sec Memory Limit: 162 MBSubmit: 308 Solved: 190[Submit][Status][Discuss]DescriptionInput一行,一个由小写字母组成的字符串S,长度不超过10^5OutputL行,每行一个整数,第i行的数据表示关于S的第i个元素的
2017-01-12 21:33:58 1771 1
原创 bzoj 2738: 矩阵乘法 (整体二分+二维树状数组)
2738: 矩阵乘法Time Limit: 20 Sec Memory Limit: 256 MBSubmit: 1334 Solved: 579[Submit][Status][Discuss]Description 给你一个N*N的矩阵,不用算矩阵乘法,但是每次询问一个子矩形的第K小数。Input 第一行两个数N,Q,表示矩
2017-01-12 11:17:46 363
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人