08 2014 档案
求两条直线(线段)的交点
摘要:转自:http://blog.csdn.net/dgq8211/article/details/7952825如图,如何求得直线 AB与直线 CD的交点P?以上内容摘自《算法艺术与信息学竞赛》。思路就是利用叉积求得点P分线段DC的比,然后利用高中学习的定比分点坐标公式求得分点P的坐标。看不懂的可以去...
阅读全文
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...
阅读全文
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...
阅读全文
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....
阅读全文
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...
阅读全文
poj3535 A+B (大数加法)
摘要:A+BTime Limit:2000MSMemory Limit:65536KTotal Submissions:811Accepted:371DescriptionTheResearch Institute of Given Strings(RIGS) is a well-known place ...
阅读全文
zkw线段树专题
摘要:题目来自大神博客的线段树专题http://www.notonlysuccess.com/index.php/segment-tree-complete/hdu1166 敌兵布阵题意:O(-1)思路:O(-1)线段树功能:update:单点增减 query:区间求和#include #include ...
阅读全文
CodeForce #261
摘要:A给出边与坐标轴平行的正方形的两个点的坐标,输出另外两个点的坐标,如果不能构成正方形,输出-1。直接枚举每一种情况就ok了#include #include #include #include #include #include #include #include #define REP(i,n) ...
阅读全文
ZOJ 2671 Cryptography 矩阵乘法+线段树
摘要:B -CryptographyTime Limit:5000MSMemory Limit:32768KB64bit IO Format:%lld & %lluSubmitStatusPracticeZOJ 2671DescriptionYoung cryptoanalyst Georgie is p...
阅读全文
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 ...
阅读全文
浙公网安备 33010602011771号