摘要:
Time Limit: 2000MSMemory Limit: 65536KTotal Submissions: 1015Accepted: 391DescriptionOrganizing a programming contest is not an easy job. To avoid making the problems too difficult, the organizer usua... 阅读全文
摘要:
Hash Tablehash function1. for(int j=0; j<K; ++j) key=((key<<2)+(cnt[j]>>4))^(cnt[j]<<10);2. z = cnt.size()for(int j=0; j < K; ++j) z = 3179(质数)* z + cn... 阅读全文
摘要:
hash tableDescriptionYou may have heard that no two snowflakes are alike. Your task is to write a program to determine whether this is really true. Your program will read information about a collectio... 阅读全文
摘要:
并查集DescriptionThere are so many different religions in the world today that it is difficult to keep track of them all. You are interested in finding out how many different religions students in your u... 阅读全文
摘要:
Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 2236Accepted: 1038DescriptionThe Global Aerial Research Centre has been allotted the task of building the fifth generation of mobile phone nets... 阅读全文
摘要:
Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 4468Accepted: 2319DescriptionBessie wants to navigate her spaceship through a dangerous asteroid field in the shape of an N x N grid (1 <= N... 阅读全文
摘要:
拓扑排序DescriptionAn ascending sorted sequence of distinct values is one in which some form of a less-than operator is used to order the elements from smallest to largest. For example, the sorted sequenc... 阅读全文
摘要:
Time Limit: 7000MSMemory Limit: 65536KTotal Submissions: 12873Accepted: 4518DescriptionIn this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n dist... 阅读全文
摘要:
brute force用第一个字符串从长到短生成所有的子串, 并和其他字符串匹配。DescriptionThe Genographic Project is a research partnership between IBM and The National Geographic Society that is analyzing DNA from hundreds of thousands o... 阅读全文
摘要:
brutal force1. 生成字典, 并按长度排序。2. 对于给定单词, 取得区间 [单词长度 - 1, 单词长度 + 1], 并匹配。3. 如果存在完全匹配的单词, 打印输出, 否则把可能的单词放到集合中。DescriptionYou, as a member of a development team for a new spell checking program, are to wri... 阅读全文