Competitive Programming 3: The New Lower Bound of Programming Contests
Competitive Programming 3题解
1. Introduction
1.1 Getting Started: The Easy Problems
1.1.1 Super Easy
POJ1488 UVA272 UVALive5381 TEX Quotes【输入输出+水题】 - 海岛Blog - CSDN博客
POJ3062 ZOJ3124 UVA1124 UVALive2581 Celebrity jeopardy【水题】 - 海岛Blog - CSDN博客
POJ2304 ZOJ1928 UVA10550 Combination Lock【模拟】 - 海岛Blog - CSDN博客
UVA11044 Searching for Nessy【水题】 - 海岛Blog - CSDN博客
UVA11172 Relational Operator【水题】 - 海岛Blog - CSDN博客
UVA11364 ZOJ2878 Parking【最值】 - 海岛Blog - CSDN博客
UVA11498 Division of Nlogonia【Ad Hoc】 - 海岛Blog - CSDN博客
UVA11547 Automatic Answer【水题】 - 海岛Blog - CSDN博客
UVA11727 Cost Cutting【Ad Hoc】 - 海岛Blog - CSDN博客
UVA12250 LA4995 Language Detection【水题】 - 海岛Blog - CSDN博客
UVA12279 LA4853 Emoogle Balance【水题】 - 海岛Blog - CSDN博客
UVA12289 One-Two-Three【水题】 - 海岛Blog - CSDN博客
UVA12372 LA5814 Packing for Holiday【水题】 - 海岛Blog - CSDN博客
UVA12403 Save Setu【水题】 - 海岛Blog - CSDN博客
UVA12577 Hajj-e-Akbar【水题】 - 海岛Blog - CSDN博客
1.1.2 Easy
UVA621 Secret Research【水题】 - 海岛Blog - CSDN博客
POJ1571 HDU1309 ZOJ1706 UVA10114 LA5332 Loansome Car Buyer【水题】 - 海岛Blog - CSDN博客
UVA10300 Ecological Premium【Ad Hoc+水题】 - 海岛Blog - CSDN博客
UVA10963 The Swallowing Ground【水题】 - 海岛Blog - CSDN博客
UVA11332 Summing Digits【数根】 - 海岛Blog - CSDN博客
UVA11559 Event Planning【水题】 - 海岛Blog - CSDN博客
UVA11679 Sub-prime【水题】 - 海岛Blog - CSDN博客
UVA11764 Jumping Mario【Ad Hoc】 - 海岛Blog - CSDN博客
UVA11799 Horror Dash【最值】 - 海岛Blog - CSDN博客
UVA11942 Lumberjack Sequencing【Ad Hoc】 - 海岛Blog - CSDN博客
UVA12015 Google is Feeling Lucky【最值+排序】 - 海岛Blog - CSDN博客
UVA12157 LA4405 Tariff Plan【水题】 - 海岛Blog - CSDN博客
UVA12468 Zapping【水题】 - 海岛Blog - CSDN博客
UVA12503 Robot Instructions【模拟】 - 海岛Blog - CSDN博客
UVA12554 A Special "Happy Birthday" Song!!!【水题】 - 海岛Blog - CSDN博客
1.1.3 Medium
UVA119 Greedy Gift Givers【map+水题】 - 海岛Blog - CSDN博客
POJ1563 HDU1302 ZOJ1710 UVA573 UVALive5318 The Snail【模拟】 - 海岛Blog - CSDN博客
POJ1484 ZOJ1195 UVA661 UVALive5632 Blowing Fuses【模拟】 - 海岛Blog - CSDN博客
POJ2691 ZOJ1844 UVA10141 Request for Proposal【最值】 - 海岛Blog - CSDN博客
UVA10324 Zeros and Ones【水题】 - 海岛Blog - CSDN博客
UVA10424 Love Calculator【水题】 - 海岛Blog - CSDN博客
POJ2664 HDU1144 ZOJ2548 UVA10919 Prerequisites?【Ad Hoc】 - 海岛Blog - CSDN博客
2.3 Data Structures with Our-Own Libraries
2.3.1 Graph Data Structures Problems
2.3.2 Union-Find Disjoint Sets
UVA793 UVALive5289 Network Connections【并查集】 - 海岛Blog - CSDN博客
POJ1611 ZOJ1789 UVA1197 UVALive2817 The Suspects【并查集】 - 海岛Blog - CSDN博客
UVA10158 War【并查集】 - 海岛Blog - CSDN博客
UVA10227 POJ2419 ZOJ1900 Forests【并查集+set】 - 海岛Blog - CSDN博客
UVA10507 Waking up brain【并查集】 - 海岛Blog - CSDN博客
POJ2524 UVA10583 Ubiquitous Religions【并查集】 - 海岛Blog - CSDN博客
UVA10608 Friends【并查集】 - 海岛Blog - CSDN博客
UVA10685 Nature【并查集】 - 海岛Blog - CSDN博客
HDU3172 UVA11503 Virtual Friends【并查集】 - 海岛Blog - CSDN博客
UVA11690 HDU3140 Money Matters【并查集】 - 海岛Blog - CSDN博客
5. Mathematics
5.1 Ad Hoc Mathematics Problems
5.1.1 The Simpler Ones
UVA10055 Hashmat the Brave Warrior【水题】 - 海岛Blog - CSDN博客
UVA10071 Back to High School Physics【水题】 - 海岛Blog - CSDN博客
POJ2501 ZOJ1890 UVA10281 Average Speed【水题】 - 海岛Blog - CSDN博客
UVA10469 To Carry or not to Carry【数字逻辑运算】 - 海岛Blog - CSDN博客
UVA10773 Back to Intermediate Math【数学Ad Hoc】 - 海岛Blog - CSDN博客
UVA11614 Etruscan Warriors Never Play Chess【数学Ad Hoc】 - 海岛Blog - CSDN博客
UVA11723 Numbering Roads【数学】 - 海岛Blog - CSDN博客
UVA11805 Bafana Bafana【模除】 - 海岛Blog - CSDN博客
UVA11875 Brick Game【数学Ad Hoc】 - 海岛Blog - CSDN博客
UVA12149 LA4215 Feynman【数学Ad Hoc】 - 海岛Blog - CSDN博客
UVA12502 Three Families【数学Ad Hoc】 - 海岛Blog - CSDN博客
5.1.2 Mathematical Simulation (Brute Force), easier
UVA100 POJ1207 HDU1032 The 3n + 1 problem【水题】 - 海岛Blog - CSDN博客
UVA371 UVALive5343 Ackermann Functions【模拟+最值】 - 海岛Blog - CSDN博客
UVALive5429 UVA382 POJ1528 HDU1323 ZOJ1284 Perfection【整除+水题】 - 海岛Blog - CSDN博客
UVa834 Continued Fractions【连分数】 - 海岛Blog - CSDN博客
UVA906 Rational Neighbor【暴力】 - 海岛Blog - CSDN博客
UVA1225 UVALive3996 Digit Counting【水题】 - 海岛Blog - CSDN博客
POJ2562 UVA10035 ZOJ1874 Primary Arithmetic【进制+进位】 - 海岛Blog - CSDN博客
POJ2509 UVA10346 Peter's Smokes【模拟】 - 海岛Blog - CSDN博客
POJ2350 ZOJ1915 UVA10370 Above Average【水题】 - 海岛Blog - CSDN博客
UVA10783 Odd Sum【数列】 - 海岛Blog - CSDN博客
UVA10879 Code Refactoring【因子+暴力】 - 海岛Blog - CSDN博客
UVA11150 Cola【数学】 - 海岛Blog - CSDN博客
UVA11247 Income Tax【数学Ad Hoc】 - 海岛Blog - CSDN博客
UVA11313 Gourmet Games【数学】 - 海岛Blog - CSDN博客
UVA11689 HDU3139 Soda Surpler【模拟题】 - 海岛Blog - CSDN博客
UVA11877 The Coco-Cola Store【模拟】 - 海岛Blog - CSDN博客
UVA11934 Magic Formula【暴力】 - 海岛Blog - CSDN博客
UVA12290 Counting Game【数学模拟】 - 海岛Blog - CSDN博客
UVA12527 LA6134 Different Digits【前缀和+进制】 - 海岛Blog - CSDN博客
5.1.3 Mathematical Simulation (Brute Force), harder
UVA493 Rational Spiral【数学模拟】 - 海岛Blog - CSDN博客
UVA550 UVALive5566 Multiplying by Rotation【进制+迭代】 - 海岛Blog - CSDN博客
POJ1309 HDU1346 ZOJ1269 UVA616 UVALive5462 Coconuts, Revisited【暴力+模拟】 - 海岛Blog - CSDN博客
UVA697 LA5469 Jack and Jill【数学Ad Hoc】 - 海岛Blog - CSDN博客
POJ2590 UVA846 ZOJ1871 Steps【模拟】 - 海岛Blog - CSDN博客
UVA10025 The ? 1 ? 2 ? ... ? n = k problem【数学规律】 - 海岛Blog - CSDN博客
UVA10257 ZOJ1110 Dick and Jane【暴力】 - 海岛Blog - CSDN博客
UVA10624 Super Number【DFS】 - 海岛Blog - CSDN博客
UVA11130 Billiard bounces【数学】 - 海岛Blog - CSDN博客
UVA11254 Consecutive Integers【暴力】 - 海岛Blog - CSDN博客
UVA11968 In The Airport【最值】 - 海岛Blog - CSDN博客
5.1.4 Finding Pattern or Formula, easier
UVA10014 Simple calculations【数列】 - 海岛Blog - CSDN博客
UVA10170 The Hotel with Infinite Rooms【数学模拟+二分查找】 - 海岛Blog - CSDN博客
UVA10499 The Land of Justice【水题】 - 海岛Blog - CSDN博客
UVA10696 f91【数学函数+打表】 - 海岛Blog - CSDN博客
UVA10751 Chessboard【数学水题】 - 海岛Blog - CSDN博客
UVA10940 Throwing cards away II【数学规律+约瑟夫环】 - 海岛Blog - CSDN博客
UVA11202 The least possible effort【数学水题】 - 海岛Blog - CSDN博客
UVA12004 Bubble Sort【数学】 - 海岛Blog - CSDN博客
UVA12027 Very Big Perfect Squares【数学】 - 海岛Blog - CSDN博客
5.1.5 Finding Pattern or Formula, harder
UVA651 LA5505 POJ1607 ZOJ1216 HDU1330 Deck【数学Ad Hoc】 - 海岛Blog - CSDN博客
UVA913 Joana and the Odd Numbers【数学】 - 海岛Blog - CSDN博客
UVA10161 Ant on a Chessboard【数学规律】 - 海岛Blog - CSDN博客
UVA10493 Cats, with or without Hats【组合】 - 海岛Blog - CSDN博客
5.1.7 Number Systems or Sequences
UVA136 Ugly Numbers【set】 - 海岛Blog - CSDN博客
POJ1320 UVA138 Street Numbers【Pell方程+数学】 - 海岛Blog - CSDN博客
UVA413 LA5388 POJ1492 ZOJ1338 Up and Down Sequences【序列处理】 - 海岛Blog - CSDN博客
UVA413 LA5388 POJ1492 ZOJ1338 Up and Down Sequences【序列处理】 - 海岛Blog - CSDN博客
POJ2247 HDU1058 UVA443 ZOJ1095 Humble Numbers【数学计算+打表+水题】 - 海岛Blog - CSDN博客
HDU1128 UVA640 UVALive5326 ZOJ1180 Self Numbers【水题】 - 海岛Blog - CSDN博客
UVA694 UVALive5466 The Collatz Sequence【模拟】 - 海岛Blog - CSDN博客
UVA962 Taxicab Numbers【数】 - 海岛Blog - CSDN博客
UVA974 Kaprekar Numbers【Kaprekar数】 - 海岛Blog - CSDN博客
UVa10006 Carmichael Numbers【素数判定+快速模幂】 - 海岛Blog - CSDN博客
UVALive2203 UVa10042 Smith Numbers【质因数分解+素数判定+数位之和】 - 海岛Blog - CSDN博客
UVA10049 Self-describing Sequence【数列】 - 海岛Blog - CSDN博客
UVA10101 Bangla Numbers【进制+递归】 - 海岛Blog - CSDN博客
UVA10408 Farey sequences【数列】 - 海岛Blog - CSDN博客
UVA10930 A-Sequence【序列】 - 海岛Blog - CSDN博客
UVA11028 Sum of Product【数列】 - 海岛Blog - CSDN博客
UVA11063 B2-Sequence【序列】 - 海岛Blog - CSDN博客
UVA11461 Square Numbers【数学+前缀和】 - 海岛Blog - CSDN博客
UVA11660 Look-and-Say sequences【数列+模拟】 - 海岛Blog - CSDN博客
UVA11970 Lucky Numbers【数列】 - 海岛Blog - CSDN博客
5.1.8 Logarithm, Exponentiation, Power
POJ1289 UVA107 The Cat in the Hat【暴力】 - 海岛Blog - CSDN博客
POJ2109 ZOJ2486 UVA113 UVALive3098 Power of Cryptography【数学】 - 海岛Blog - CSDN博客
6. String Processing
6.1 Ad Hoc String Processing Problems
6.1.1 Cipher/Encode/Encrypt/Decode/Decrypt, Easier
UVA245 WF5184 POJ1885 Uncompress【文本】 - 海岛Blog - CSDN博客
POJ1026 HDU1439 UVA306 UVALive521 Cipher【密码+置换】 - 海岛Blog - CSDN博客
UVA444 Encoder and Decoder【编码+解码】 - 海岛Blog - CSDN博客
UVA458 The Decoder【编码】 - 海岛Blog - CSDN博客
UVA483 Word Scramble【Ad Hoc+单词逆序】 - 海岛Blog - CSDN博客
UVA492 Pig-Latin【文本】 - 海岛Blog - CSDN博客
POJ1317 UVA641 UVALive5327 HDU1129 ZOJ1006 Do the Untwist【密码】 - 海岛Blog - CSDN博客
HDU1442 UVA739 UVALive5031 Soundex Indexing【编码】 - 海岛Blog - CSDN博客
UVA795 LA5291 Sandorf's Cipher【文本】 - 海岛Blog - CSDN博客
UVA865 Substitution Cypher【文本】 - 海岛Blog - CSDN博客
UVA10019 Funny Encryption Method【进制】 - 海岛Blog - CSDN博客
UVA10222 Decode the Mad man【编码】 - 海岛Blog - CSDN博客
UVA10851 2D Hieroglyphs decoder【文本】 - 海岛Blog - CSDN博客
UVA10878 Decode the tape【编码】 - 海岛Blog - CSDN博客
UVA10896 Known Plaintext Attack【文本】 - 海岛Blog - CSDN博客
UVA10921 Find the Telephone【编码】 - 海岛Blog - CSDN博客
UVA11220 Decoding the message.【解码+strtok】 - 海岛Blog - CSDN博客
UVA11541 Decoding【水题】 - 海岛Blog - CSDN博客
UVA11278 One-Handed Typist【编码】 - 海岛Blog - CSDN博客
UVA11716 Digital Fortress【解密】 - 海岛Blog - CSDN博客
UVA11787 Numeral Hieroglyphs【数制】 - 海岛Blog - CSDN博客
UVA11946 Code Number【译码】 - 海岛Blog - CSDN博客
6.1.2 Cipher/Encode/Encrypt/Decode/Decrypt, Harder
UVA213 UVALive5152 Message Decoding【密码】 - 海岛Blog - CSDN博客
6.1.3 Frequency Counting
UVA499 What's The Frequency, Kenneth?【文本】 - 海岛Blog - CSDN博客
UVA895 Word Problem【文本】 - 海岛Blog - CSDN博客
UVA902 Password Search【子串统计】 - 海岛Blog - CSDN博客
UVA10008 What's Cryptanalysis?【字符统计+sort】 - 海岛Blog - CSDN博客
UVA10062 Tell me the frequencies!【字符统计+sort】 - 海岛Blog - CSDN博客
UVA10252 POJ2629 Common Permutation【字符串排序】 - 海岛Blog - CSDN博客
UVA10293 Word Length and Frequency【单词长度频度+strtok】 - 海岛Blog - CSDN博客
UVA10374 POJ2643 ZOJ1854 Election【map】 - 海岛Blog - CSDN博客
UVA10420 List of Conquests【map】 - 海岛Blog - CSDN博客
UVA10625 GNU = GNU'sNotUnix【字符统计】 - 海岛Blog - CSDN博客
UVA10789 Prime Frequency【筛选法】 - 海岛Blog - CSDN博客