今天闲来没事上uva oj提取了下刘汝佳推荐的acm题号,原始数据如下:

Volume 0. Getting Started 
  10055 - Hashmat the Brave Warrior 109624 27.55% 24151 85.24% 
  10071 - Back to High School Physics 56685 50.79% 21326 93.47% 
  10300 - Ecological Premium 18992 66.80% 11204 96.40% 
  458 - The Decoder 41915 48.04% 15613 92.67% 
  494 - Kindergarten Counting Game 35952 37.98% 12776 88.13% 
  414 - Machined Surfaces 11324 44.55% 4710 91.80% 
  490 - Rotating Sentences 23458 27.72% 6578 75.84% 
  445 - Marvelous Mazes 20111 40.57% 7110 82.64% 
  488 - Triangle Wave 48280 18.94% 11271 57.67% 
  489 - Hangman Judge 12936 24.94% 4617 53.61% 
  694 - The Collatz Sequence 19320 38.40% 6653 85.50% 
  457 - Linear Cellular Automata 5273 31.97% 1837 76.76%

Volume 1. Elementary Problem Solving 
  String
  401 - Palindromes 31775 25.04% 8037 73.95% 
  10010 - Where's Waldorf? 17365 27.49% 4893 73.47% 
  10361 - Automatic Poetry 6227 49.86% 3042 90.70% 
  537 - Artificial Intelligence? 7535 37.36% 2902 83.22% 
......

因为这些题号数据都是直接copy过来的,所以附带了很多干扰数据(如每个题号后面的正确率...)...
闲来蛋疼编了个小程序剔除了这些干扰数据,以下为源码:

#include<fstream>
#include<sstream>
#include<iterator>
#include<string>
#include<cctype>
#include<vector>
#include<algorithm>
using namespace std;
bool compare(const string&);
int main()
{ifstream infile("ACM.txt", ios::in);    //ACM.txt为未处理的文件ofstream outfile("finish.txt");         //将输出流outfile绑定到finish.txtostream_iterator<string> out_1(outfile);ostream_iterator<string> out_2(outfile,"\40");string line; while(getline(infile, line)){    //每次读取一行stringstream strm(line);     //通过stringstream流提取line中的单词istream_iterator<string> in(strm);istream_iterator<string> eof;if(*in == ""){                //如果此行为空,则输出一行分隔符*out_1 = "=====================================================\n";continue;}         if(*in == "Volume"){      //如果行头为“Volume”,则直接输出copy(in, eof, out_2);*out_1 = "\n";            }else{vector<string> for_analyse(in, eof);//用行内每个单词初始化vector容器vector<string>::reverse_iterator it = find_if(for_analyse.rbegin(), for_analyse.rend(),compare);     //反向查找第一个非数字的元素 if(it.base() == for_analyse.begin()){   //若检测到特殊样式的标题(除了"-"外全为数字),则输出未处理的标题*out_1 = "error : ";copy(for_analyse.begin(), for_analyse.end(), out_2);             }               else{*out_1 = "\t";  //输出处理后元素copy(for_analyse.begin(), it.base(), out_2);}*out_1 = "\n";         }           }
    return 0;
}
bool compare(const string &k)//判断元素为字母的函数
{if(isalpha(k[0]))return true;elsereturn false;
}

以下为处理结果:

Volume 0. Getting Started 
10055 - Hashmat the Brave Warrior 
10071 - Back to High School Physics 
10300 - Ecological Premium 
458 - The Decoder 
494 - Kindergarten Counting Game 
414 - Machined Surfaces 
490 - Rotating Sentences 
445 - Marvelous Mazes 
488 - Triangle Wave 
489 - Hangman Judge 
694 - The Collatz Sequence 
457 - Linear Cellular Automata 
=====================================================
Volume 1. Elementary Problem Solving 
String 
401 - Palindromes 
10010 - Where's Waldorf? 
10361 - Automatic Poetry 
537 - Artificial Intelligence? 
409 - Excuses, Excuses! 
10878 - Decode the tape 
10815 - Andy's First Dictionary 
644 - Immediate Decodability 
10115 - Automatic Editing 
=====================================================
Big Number 
424 - Integer Inquiry 
10106 - Product 
465 - Overflow 
748 - Exponentiation 
10494 - If We Were a Child Again 
=====================================================
Sorting/Searching 
340 - Master-Mind Hints 
10420 - List of Conquests 
10474 - Where is the Marble? 
152 - Tree's a Crowd 
299 - Train Swapping 
120 - Stacks of Flapjacks 
156 - Ananagrams 
400 - Unix ls 
123 - Searching Quickly 
10194 - Football (aka Soccer) 
error : 755 - 487--3279 17614 16.63% 2583 53.77% 
10785 - The Mad Numerologist 
=====================================================
Maths - Misc 
113 - Power of Cryptography 
10161 - Ant on a Chessboard 
253 - Cube painting 
621 - Secret Research 
10025 - The ? 1 ? 2 ? ... ? n = k problem 
591 - Box of Bricks 
107 - The Cat in the Hat 
573 - The Snail 
846 - Steps 
10499 - The Land of Justice 
10790 - How Many Points of Intersection? 
11044 - Searching for Nessy 
10719 - Quotient Polynomial 
10177 - (2/3/4)-D Sqr/Rects/Cubes/Boxes? 
10916 - Factstone Benchmark 
10970 - Big Chocolate 
10014 - Simple calculations 
=====================================================
Maths - Number Theory 
575 - Skew Binary 
10110 - Light, more light 
550 - Multiplying by Rotation 
568 - Just the Facts 
408 - Uniform Generator 
350 - Pseudo-Random Numbers 
10061 - How many zero's and how many digits 
10392 - Factoring Large Numbers 
10879 - Code Refactoring 
=====================================================
Maths - Simple Geometry 
10250 - The Other Two Trees 
579 - ClockHands 
375 - Inscribed Circles and Isosceles Triangles 
10387 - Billiard 
10112 - Myacm Triangles 
=====================================================
Volume 2. Data Structures 
Lists 
127 - "Accordian" Patience 
101 - The Blocks Problem 
133 - The Dole Queue 
10152 - ShellSort 
673 - Parentheses Balance 
442 - Matrix Chain Multiplication 
11111 - Generalized Matrioshkas 
11234 - Expressions 
540 - Team Queue 
10050 - Hartals 
=====================================================
Binary Trees 
112 - Tree Summing 
548 - Tree 
297 - Quadtrees 
712 - S-Trees 
699 - The Falling Leaves 
327 - Evaluating Simple C Expressions 
839 - Not so Mobile 
10562 - Undraw the Trees 
=====================================================
Graphs 
572 - Oil Deposits 
657 - The die is cast 
784 - Maze Exploration 
705 - Slash Maze 
439 - Knight Moves 
532 - Dungeon Master 
10557 - XYZZY 
10047 - The Monocycle 
10004 - Bicoloring 
10129 - Play on Words 
10054 - The Necklace 
10596 - Morning Walk 
10305 - Ordering Tasks 
196 - Spreadsheet 
=====================================================
Volume 3. Brute Force 
Elementary Skills 
10167 - Birthday Cake 
11205 - The broken pedometer 
131 - The Psychic Poker Player 
146 - ID Codes 
10098 - Generating Fast 
729 - The Hamming Distance Problem 
592 - Island of Logic 
110 - Meta-Loopless Sorts 
=====================================================
Backtracking - Easy 
10474 - Where is the Marble? 
216 - Getting in Line 
639 - Don't Get Rooked 
539 - The Settlers of Catan 
301 - Transportation 
10344 - 23 out of 
331 - Mapping the Swaps 
10012 - How Big Is It? 
165 - Stamps 
167 - The Sultan's Successors 
10001 - Garden of Eden 
140 - Bandwidth 
193 - Graph Coloring 
208 - Firetruck 
=====================================================
Backtracking - Hard 
10123 - No Tipping 
10160 - Servicing Stations 
197 - Cube 
185 - Roman Numerals 
307 - Sticks 
317 - Hexagon 
387 - A Puzzling Problem 
519 - Puzzle 
529 - Addition Chains 
565 - Pizza Anyone? 
502 - DEL command 
322 - Ships 
=====================================================
Implicit Graph Traversal 
10603 - Fill 
10422 - Knights in FEN 
10085 - The most distant state 
310 - L--system 
321 - The New Villa 
704 - Colour Hash 
=====================================================
Hashing / Sets 
188 - Perfect Hash 
10282 - Babelfish 
10391 - Compound Words 
10125 - Sumsets 
10887 - Concatenation of Languages 
141 - The Spot Game 
10591 - Happy Number 
=====================================================
Rujia Liu's Problems for Beginners 
11218 - KTV 
11198 - Dancing Digits 
10274 - Fans and Gems 
11210 - Chinese Mahjong 
10624 - Super Number 
=====================================================
Volume 4. Algorithm Design 
10905 - Children's Game 
10763 - Foreign Exchange 
10132 - File Fragmentation 
270 - Lining Up 
10341 - Solve It 
10057 - A mid-summer night's dream. 
10706 - Number Sequence 
10487 - Closest Sums 
10340 - All in All 
10700 - Camel trading 
10026 - Shoemaker's Problem 
311 - Packets 
10020 - Minimal coverage 
10714 - Ants 
10954 - Add All 
714 - Copying Books 
10602 - Editor Nottoobad 
10400 - Game Show Math 
10718 - Bit Mask 
11054 - Wine trading in Gergovia 
10382 - Watering Grass 
10670 - Work Reduction 
10720 - Graph Construction 
993 - Product of digits 
10716 - Evil Straw Warts Live 
11100 - The Trip, 
10245 - The Closest Pair Problem 
11129 - An antiarithmetic permutation 
10041 - Vito's Family 
507 - Jill Rides Again 
108 - Maximum Sum 
10827 - Maximum sum on a torus 
757 - Gone Fishing 
10148 - Advertisement 
=====================================================
Volume 5. Dynamic Programming 
111 - History Grading 
103 - Stacking Boxes 
10405 - Longest Common Subsequence 
674 - Coin Change 
10003 - Cutting Sticks 
116 - Unidirectional TSP 
10131 - Is Bigger Smarter? 
10066 - The Twin Towers 
10192 - Vacation 
147 - Dollars 
357 - Let Me Count The Ways 
562 - Dividing coins 
348 - Optimal Array Multiplication Sequence 
624 - CD 
10130 - SuperSale 
531 - Compromise 
10465 - Homer Simpson 
10285 - Longest Run on a Snowboard 
437 - The Tower of Babylon 
10404 - Bachet's Game 
620 - Cellular Structure 
825 - Walking on the Safe Side 
10069 - Distinct Subsequences 
10534 - Wavio Sequence 
10051 - Tower of Cubes 
10651 - Pebble Solitaire 
590 - Always on the run 
10306 - e-Coins 
10739 - String to Palindrome 
10304 - Optimal Binary Search Tree 
10271 - Chopsticks 
10617 - Again Palindrome 
11137 - Ingenuous Cubrency 
10154 - Weights and Measures 
10201 - Adventures in Moving - Part IV 
10453 - Make Palindrome 
10029 - Edit Step Ladders 
10313 - Pay the Price 
10401 - Injured Queen Problem 
10891 - Game of Sum 
11151 - Longest Palindrome 
10911 - Forming Quiz Teams 
10635 - Prince and Princess 
10564 - Paths through the Hourglass 
662 - Fast Food 
10626 - Buying Coke 
10118 - Free Candies 
607 - Scheduling Lectures 
10604 - Chemical Reaction 
10913 - Walking on a Grid 
11008 - Antimatter Ray Clearcutting 
10723 - Cyborg Genes 
11258 - String Partition 
10599 - Robots(II) 
10817 - Headmaster's Headache 
10163 - Storage Keepers 
709 - Formatting Text 
10280 - Old Wine Into New Bottles 
10558 - A Brief Gerrymander 
11081 - Strings 
=====================================================
Volume 6. Mathematical Concepts and Methods 
138 - Street Numbers 
10006 - Carmichael Numbers 
128 - Software CRC 
106 - Fermat vs. Pythagoras 
10673 - Play with Floor and Ceil 
11121 - Base 
10791 - Minimum Sum LCM 
10717 - Mint 
10820 - Send a Table 
571 - Jugs 
11029 - Leading and Trailing 
10023 - Square root 
10308 - Roads in the North 
10105 - Polynomial Coefficients 
10375 - Choose and divide 
11027 - Palindromic Permutation 
10056 - What is the Probability 
10491 - Cows and Cars 
10759 - Dice Throwing 
542 - France 
10277 - Boastin' Red Socks 
10169 - Urn-ball Probabilities 
11181 - Probability|Given 
557 - Burger 
10900 - So you want to be a 
11176 - Winning Streak 
10417 - Gift Exchanging 
10183 - How Many Fibs? 
10303 - How Many Trees? 
10518 - How Many Calls? 
10862 - Connect the Cable Wires 
10334 - Ray Through Glasses 
10229 - Modular Fibonacci 
763 - Fibinary Numbers 
10236 - The Fibonacci Primes 
991 - Safe Salutations 
10079 - Pizza Cutting 
10940 - Throwing cards away II 
10359 - Tiling 
10519 - !! Really Strange 
10918 - Tri Tiling 
11069 - A Graph Problem 
10910 - Marks Distribution 
10254 - The Priest Mathematician 
10328 - Coin Toss 
10157 - Expressions 
10247 - Complete Tree Labeling 
10516 - Another Counting Problem 
10128 - Queue 
10081 - Tight Words 
10943 - How do you add? 
10721 - Bar Codes 
10912 - Simple Minded Hashing 
10616 - Divisible Group Sums 
11125 - Arrange Some Marbles 
10205 - Stack 'em Up 
701 - The Archeologists' Dilemma 
696 - How Many Knights 
254 - Towers of Hanoi 
10994 - Simple Addition 
306 - Cipher 
10570 - Meeting with Aliens 
=====================================================
Volume 7. Graph Algorithms and Implementation Techniques 
567 - Risk 
10034 - Freckles 
10048 - Audiophobia 
10397 - Connect the Campus 
10369 - Arctic Network 
658 - It's not a Bug, it's a Feature! 
10099 - The Tourist Guide 
10801 - Lift Hopping 
10986 - Sending email 
558 - Wormholes 
515 - King 
104 - Arbitrage 
125 - Numbering Paths 
10803 - Thunder Mountain 
10330 - Power Transmission 
10806 - Dijkstra, Dijkstra. 
11045 - My T-shirt suits me 
753 - A Plug for UNIX 
563 - Crimewave 
10746 - Crime Wave - The Sequel 
10594 - Data Flow 
10985 - Rings'n'Ropes 
10608 - Friends 
10158 - War 
10269 - Adventure of Super Mario 
10273 - Eat or Not to Eat?

提取了下刘汝佳推荐的题号...相关推荐

  1. (精讲)UVA - 1339 Ancient Cipher 刘汝佳紫书题单(算法竞赛入门经典)

    仔细读题并且对比样例可以发现,字母的替换和换元的规律是不同的,所以不能用模拟法将原来的字符串找到进行比对,所以要从替换换元前后的特点来看. 替换: 替换前后的两个字母集合可以看作是一个映射: 例如 H ...

  2. UVA - 489 Hangman Judge 刘汝佳紫书题单(算法竞赛入门经典)

    思路很简单,题目中说猜对目标字母中的一个字母,就会将所有该字母的位置显现,因此,可以对目标字符进行筛选去重,然后对输入猜测的每个字母进行比对,由于不能猜已经猜过的字母,因此,要对成功猜出的目标字母进行 ...

  3. UVA - 1225 Digit Counting(刘汝佳紫书题单(算法竞赛入门经典 第二版 2014)

    个人感觉这道题有表述问题 他的题目表述说明测试数据中的数是不超过20的,但其实他的测试点中是有百位数的,所以按两位数去处理数据显然会造成数组越界. 代码如下 #include <bits/std ...

  4. 刘汝佳《算法竞赛入门经典》---总结

    刘汝佳:<算法竞赛入门经典> 三步: 基本的数据结构+算法知识: 数论等数学基本知识: 锻炼联想建模能力.知识与实际相结合,解决实际问题! 第一章:程序设计入门 1.a/b 当a.b为整数 ...

  5. 算法竞赛入门经典(刘汝佳)——代码笔记

    Reference: <算法竞赛入门经典>(刘汝佳)第一版.第二版 ------------------------------------------------------------ ...

  6. (转)刘汝佳书上出现的一些题目

    推荐一些题目,希望对参与ICPC竞赛的同学有所帮助. POJ上一些题目在 http://162.105.81.202/course/problemSolving/   可以找到解题报告.        ...

  7. [转]ACM-ICPC比赛随想——刘汝佳

    自己接触acm也这么久了,到底我们acmer这般为acm废寝忘食值不值得???个人觉得刘汝佳的这篇文章讲的非常好... 刘汝佳,1982年12月生,毕业于重庆外国语学校,清华大学计算机科学与技术系20 ...

  8. 刘汝佳《算法竞赛入门经典(第二版)》习题(六)

    刘汝佳<算法竞赛入门经典(第二版)>第四章习题(4-1~4-3) 习题4-1 象棋(Xiangai,ACM/ICPC Fuzhou 2011,UVa1589) 考虑一个象棋残局,其中红方有 ...

  9. 刘汝佳《算法竞赛入门经典(第二版)》习题(二)

    刘汝佳<算法竞赛入门经典(第二版)>第二章习题 目录 刘汝佳<算法竞赛入门经典(第二版)>第二章习题 习题2-1 水仙花数 习题2-2 韩信点兵 习题2-3 倒三角形 习题2- ...

最新文章

  1. php中的核心函数有哪些,PHP内核探索:函数的分类
  2. RedisTemplate
  3. CAN 总线 之一 总线拓扑、物理电平、发展史 详解
  4. 一致性hash算法原理
  5. 以表达式作为参数传入SQL的存储过程中去
  6. Nature、Science、Cell全加入!80家学术机构新冠研究全部免费
  7. java设计模式—工厂模式
  8. 为何马云“惧怕”沃尔玛
  9. python简单程序实例-python实现的简单窗口倒计时界面实例
  10. 简单易懂的PHP的命名空间以及配合use的使用
  11. 谷粒商城:02. 数据库初始化以及SQL语句
  12. 使用Groovy将一段代码动态构造成一个类的方法
  13. OpenvSwitch实现简单VLAN
  14. NXP JN5169 使用 ADC 模数转换器和比较器
  15. mysql在线检测文件是否损坏,mysql数据文件损坏后的修复方法
  16. 如何实现Spark SQL 字段血缘?
  17. 紫光收购武汉新芯后长江存储成立 赵伟国任董事长
  18. 自动上传视频到B站和西瓜视频
  19. binlog2sql 安装使用
  20. 计算机二级试题word,计算机二级考试word试题及答案.doc

热门文章

  1. 读书寄语:慎独自律,学思并重
  2. 把树莓派变身无线AP
  3. 视频服务器与流媒体服务器的区别和应用介绍
  4. Linux基础系列修炼---笔记1
  5. fzu-1607-Greedy division
  6. 类unix系统中启动脚本记录
  7. 目标检测经典算法和API详解(笔记)
  8. 随机过程 更新过程(上)
  9. 微信朋友圈评论/回复/cell/键盘谈起
  10. 国开计算机组成原理边学边练,国家开放大学-计算机组成原理-形考任务-2017全部答案.docx...