UVA
sxk_sxy
努力用自己辛勤的汗水,成为一名真正的ACMer
展开
-
《算法竞赛入门经典——训练指南》第二章题库
UVa特别题库UVa网站专门为本书设立的分类题库配合,方便读者提交:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=442注意,下面注有“extra”的习题并没有在书中出现,但在上面的特别题库中有,属于附加习题。基础练习 (Basic Problems)原创 2014-10-03 08:49:30 · 3711 阅读 · 0 评论 -
LA 3026 Period (strings)
PeriodTime Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %lluSubmit StatusDescriptionFor each prefix of a given string S with N characters (原创 2015-07-21 12:07:41 · 738 阅读 · 0 评论 -
UVA 11624 Fire! (BFS)
题目链接:Fire!解析:先用bfs处理出Fire到每个格子的最短时间。然后再使用bfs求出最短时间。注意:判断能否扩展的时候,要满足在格子着火之前才可以扩展。AC代码:#include #include #include #include using namespace std;const int maxn = 1000 + 5;char原创 2015-08-22 18:08:22 · 588 阅读 · 0 评论 -
UVA 3942 - Remember the Word (Trie)
3942 - Remember the WordNeal is very curious about combinatorial problems, and now here comes a problem about words. Knowing that Ray has a photographic memory and this may not trouble him, Neal原创 2015-07-14 16:27:11 · 944 阅读 · 0 评论 -
UVA 11732 "strcmp()" Anyone? (Trie)
题目链接:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2832题意:模拟strcmp()函数,给n个字符串,两两之间进行比较,问需要进行多少次比较?解析:字符串很多,数据量大,按题意两两比较显然不现实。如果把所有的单词插入到一棵Tr原创 2015-07-14 10:10:50 · 658 阅读 · 0 评论 -
UVA 11489 Integer Game (博弈)
1227: Integer GameTime Limit: 1 Sec Memory Limit:128 MBSubmit: 9 Solved: 4[Submit][Status][Web Board]DescriptionTwo players, S and T, are playing a game where they make alternate mov原创 2015-06-18 19:23:59 · 767 阅读 · 0 评论 -
UVa 10007 & hdu 1131 Count the Trees (卡特兰数)
Count the TreesCrawling in process...Crawling failedTime Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %lluSubmitStatus Description Count the T原创 2015-02-01 23:46:37 · 1282 阅读 · 0 评论 -
UVa 10006 Carmichael Numbers (快速幂 + 素性测试)
Carmichael NumbersTime Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %lluSubmitStatus Description Carmichael Numbers原创 2015-01-30 17:40:00 · 1037 阅读 · 0 评论 -
LA 5009 (HDU 3714) Error Curves (三分)
A - Error CurvesTime Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %lluSubmitStatusPracticeUVALive 5009Appoint description:Description Josephina is a clever girl and原创 2014-10-03 10:17:27 · 1840 阅读 · 1 评论 -
UVA 10891 Game of Sum (博弈论 + 区间dp)
Game of SumTime Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %lluSubmit StatusDescriptionThis is a two player game. Initially there are n integer numbers in an array and pl原创 2015-10-02 14:27:39 · 564 阅读 · 0 评论