随笔分类 -  ACM

求两条直线(线段)的交点
摘要:转自:http://blog.csdn.net/dgq8211/article/details/7952825如图,如何求得直线 AB与直线 CD的交点P?以上内容摘自《算法艺术与信息学竞赛》。思路就是利用叉积求得点P分线段DC的比,然后利用高中学习的定比分点坐标公式求得分点P的坐标。看不懂的可以去... 阅读全文
posted @ 2014-08-29 18:57 someblue 阅读(3618) 评论(0) 推荐(0)
hdu 3635 Dragon Balls (并查集)
摘要:Dragon BallsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3245Accepted Submission(s): 1252Proble... 阅读全文
posted @ 2014-08-29 10:53 someblue 阅读(229) 评论(0) 推荐(0)
uva 12452 Plants vs. Zombies HD SP (树DP)
摘要:Problem I: Plants vs. Zombies HD Super ProPlants versus Zombies HD Super Pro is a game played not a grid, but on a connected graph G with no cycles (i... 阅读全文
posted @ 2014-08-28 21:48 someblue 阅读(369) 评论(0) 推荐(0)
ural 1500 Pass Licenses (状态压缩+dfs)
摘要:1500. Pass LicensesTime limit: 2.5 secondMemory limit: 64 MBA New Russian Kolyan believes that to spend his time in traffic jams is below his dignity.... 阅读全文
posted @ 2014-08-28 09:43 someblue 阅读(303) 评论(0) 推荐(0)
sgu 321 The Spy Network (dfs+贪心)
摘要:321. The Spy NetworkTime limit per test: 0.5 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardThe network of spies consists ofNint... 阅读全文
posted @ 2014-08-25 23:08 someblue 阅读(377) 评论(0) 推荐(0)
poj3535 A+B (大数加法)
摘要:A+BTime Limit:2000MSMemory Limit:65536KTotal Submissions:811Accepted:371DescriptionTheResearch Institute of Given Strings(RIGS) is a well-known place ... 阅读全文
posted @ 2014-08-24 09:47 someblue 阅读(548) 评论(0) 推荐(0)
zkw线段树专题
摘要:题目来自大神博客的线段树专题http://www.notonlysuccess.com/index.php/segment-tree-complete/hdu1166 敌兵布阵题意:O(-1)思路:O(-1)线段树功能:update:单点增减 query:区间求和#include #include ... 阅读全文
posted @ 2014-08-18 00:28 someblue 阅读(429) 评论(0) 推荐(0)
CodeForce #261
摘要:A给出边与坐标轴平行的正方形的两个点的坐标,输出另外两个点的坐标,如果不能构成正方形,输出-1。直接枚举每一种情况就ok了#include #include #include #include #include #include #include #include #define REP(i,n) ... 阅读全文
posted @ 2014-08-16 02:43 someblue 阅读(144) 评论(0) 推荐(0)
ZOJ 2671 Cryptography 矩阵乘法+线段树
摘要:B -CryptographyTime Limit:5000MSMemory Limit:32768KB64bit IO Format:%lld & %lluSubmitStatusPracticeZOJ 2671DescriptionYoung cryptoanalyst Georgie is p... 阅读全文
posted @ 2014-08-15 10:37 someblue 阅读(253) 评论(0) 推荐(0)
UVA 12656 Almost Palindrome (字符串DP)
摘要:12656 Almost PalindromeGiven a line of text, nd the longest almost-palindrome substring. A string S is almost-palindrome if1. S begins and ends with ... 阅读全文
posted @ 2014-08-13 21:29 someblue 阅读(415) 评论(0) 推荐(0)
Maximum Cardinality Bipartite Matching: Augmenting Path Algorithm
摘要:http://www.csie.ntnu.edu.tw/~u91029/Matching.html 1 int nx,ny; 2 int mx[N],my[N]; 3 bool vy[N]; 4 bool g[N][N]; 5 6 int decode(int x,int y) {return... 阅读全文
posted @ 2014-07-20 13:54 someblue 阅读(294) 评论(0) 推荐(0)
ge lei zi yuan
摘要:introduction to OJhttp://acdream.info/topic/101ji suan ji he mo banhttp://wenku.baidu.com/link?url=JNBUwmSX6uWJQXTjs3RmHqThCNydjlXb2f6rSt-SyKC1-KLraL4... 阅读全文
posted @ 2014-07-16 10:04 someblue 阅读(276) 评论(0) 推荐(0)
poj 2155 matrix
摘要:彻底弄懂二维树状数组http://www.java3z.com/cwbwebhome/article/article1/1369.html?id=480409年国家集训队武森《浅谈信息学竞赛中的“0” 和“ 1”》的论文http://wenku.baidu.com/link?url=Nl7I-GFx... 阅读全文
posted @ 2014-07-15 15:44 someblue 阅读(168) 评论(0) 推荐(0)
【hdu4570】Multi-bit Trie 区间DP
摘要:标签: 区间dphdu4570http://acm.hdu.edu.cn/showproblem.php?pid=4570题意:这题题意理解变态的。转自大神博客:这题题意确实有点难懂,起码对于我这个英语渣渣来说是这样,于是去别人的博客看了下题目意思,归纳起来如下:给出一个长度为n的数列,将其分成若干... 阅读全文
posted @ 2014-07-12 13:37 someblue 阅读(300) 评论(1) 推荐(0)
题目分类
摘要:贪心:hdu 3177背包:hdu 2955poj 2184(含负数01背包)hdu 2639(01背包求第k大)区间DP:hdu 2476hdu 4570hdu 4283状态压缩DP:http://blog.csdn.net/ice_crazy/article/details/9698213hdu... 阅读全文
posted @ 2014-07-12 11:52 someblue 阅读(169) 评论(0) 推荐(0)
2014 SCAU_ACM 暑期集训
摘要:暑期集训,希望能在这段时间获得对得起自己的提升吧时间:7.11~8.30集训各专题内容: 1.贪心,递推,基础DP(背包,区间DP,状态压缩DP(去年出了不少于2道铜牌题,看着办)) 2.搜索(BFS,DFS,A*,IDA*) 3.单调队列、单调栈的思想,倍增算法(ST表) (重点左边3个东西... 阅读全文
posted @ 2014-07-11 21:24 someblue 阅读(387) 评论(0) 推荐(0)
2014 ACM广东省赛总结
摘要:2014年广东省赛在化工大学城开,5月10日开幕式&热身赛,5月11日正式赛。 热身赛的时候,开幕式说有两小时,于是我们愉快的切题了,像平常组队赛那样很快出了两题,但卡在后面两题切不动了。这时候已经大概过了一小时十分钟了,于是开始各种测试调戏测评机。测的内容有:栈深、全局数组开的大小、dfs深... 阅读全文
posted @ 2014-05-16 22:56 someblue 阅读(1020) 评论(0) 推荐(1)