- 博客(37)
- 资源 (2)
- 问答 (1)
- 收藏
- 关注
原创 A - Hire and Fire(8.1.2)
DescriptionIn this problem, you are asked to keep track of the hierarchical structure of an organization's changing staff. As the first event in the life of an organization, the Chief Executive
2014-07-29 17:02:14 1216
原创 A - Nearest Common Ancestors(8.1.1)
DescriptionA rooted tree is a well-known data structure in computer science and engineering. An example is shown below:In the figure, each node is labeled with an integer from {1, 2,...,16
2014-07-28 15:29:57 549
原创 C - Maya Calendar(4.7.4)
DescriptionDuring his last sabbatical, professor M. A. Ya made a surprising discovery about the old Maya calendar. From an old knotted message, professor discovered that the Maya civilization used a
2014-07-24 11:36:24 573
原创 A - Babelfish(6.1.2)(6.1使用词典解题实验范例)
DescriptionYou have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have a dictionary to help you understand the
2014-07-24 09:41:34 825
原创 C - Ultra-QuickSort(7.2.2)
DescriptionIn this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence elements until the seq
2014-07-23 14:28:19 710
转载 递归算法学习---归并排序
分而治之的概念 分而治之是一种使用递归解决问题的算法,主要的技巧是将一个大的复杂的问题划分为多个子问题,而这些子问题可以作为终止条件,或者在一个递归步骤中得到解决,所有子问题的解决结合起来就构成了对原问题的解决 2. 分而治之的优点和缺点 分而治之算法通常包括一个或者多个递归方法的调用,当这些调用将数据分隔成为独立的集合从而处理较小集合
2014-07-23 10:31:55 2326
原创 B - Who's in the Middle(7.1.2)
DescriptionFJ is surveying his herd to find the most average cow. He wants to know how much milk this 'median' cow gives: half of the cows give as much or more than the median; half give as much o
2014-07-23 09:17:20 713
转载 C++ STL 中 map 容器的说明和使用技巧
Map是c++的一个标准容器,她提供了很好一对一的关系,在一些程序中建立一个map可以起到事半功倍的效果,总结了一些map基本简单实用的操作! 1、map简介map是一类关联式容器。它的特点是增加和删除节点对迭代器的影响很小,除了那个操作节点,对其他的节点都没有什么影响。对于迭代器来说,可以修改实值,而不能修改key。 2、map的功能自动
2014-07-22 10:04:02 17050 3
原创 B - Moscow Time(4.7.2)
/*DescriptionIn e-mail the following format for date and time setting is used:EDATE::=Day_of_week, Day_of_month Month Year Time Time_zoneHere EDATE is the name of date and time format, t
2014-07-21 15:18:03 904
原创 A - Oulipo(4.6.2)
DescriptionThe French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter'e'. He was a member of the Oulipo group. A quote from the book:Tout avait Pair
2014-07-20 18:18:13 687
原创 D - Blue Jeans(4.6.1)
题意:求最长公共字符串。如果最大长度小与3,则输出no significant commonalities.反之输出最长的这个串。 分析:枚举公共字符串的长度,然后再第2到N串中找是否存在字符串1中相应长度的子串。 知识点整理: 1、 包含文件:string.h 函数名: strstr 函数原型:extern char *strstr(c
2014-07-20 13:29:19 779
转载 经典排序算法总结(代码)
经典排序算法总结(代码)--fly分享目录/*冒泡法....2/*快速排序....3/*插入排序....4/*希尔(shell)排序....5/*选择排序/*堆排序/*归并排序 附:排序算法原理:http://zh.wikipedia.org/wiki/Category:%E6%8E%92%E5%BA%8F%E7%AE%97%E
2014-07-20 12:49:29 1013
原创 C - Modular multiplication of polynomials(4.3.2)
DescriptionConsider polynomials whose coefficients are 0 and 1. Addition of two polynomials is achieved by 'adding' the coefficients for the corresponding powers in the polynomials. The addition o
2014-07-20 11:44:32 742
原创 B - Adding Reversed Numbers(4.2.1)
DescriptionThe Antique Comedians of Malidinesia prefer comedies to tragedies. Unfortunately, most of the ancient plays are tragedies. Therefore the dramatic advisor of ACM has decided to transfigure
2014-07-18 18:10:08 763
原创 A - Calendar(4.1.1)
DescriptionA calendar is a system for measuring time, from hours and minutes, to months and days, and finally to years and centuries. The terms of hour, day, month, year and century are all units
2014-07-18 15:35:52 799
原创 D - Sticks(3.4.2)
#include #include #include using namespace std;int n, p[65];bool pj[65];bool cmp(int a,int b){ return a>b;}int solve( int per, int remain, int m ){ if( remain == 0 && m == 0)
2014-07-18 11:19:18 553
原创 C - Fractal(3.4.1)
DescriptionA fractal is an object or quantity that displays self-similarity, in a somewhat technical sense, on all scales. The object need not exhibit exactly the same structure at all scales, but
2014-07-17 19:22:17 702
原创 B - Symmetric Order(3.3.1)
DescriptionIn your job at Albatross Circus Management (yes, it's run by a bunch of clowns), you have just finished writing a program whose output is a list of names in nondescending order by lengt
2014-07-17 17:06:18 707
原创 A - Red and Black(3.2.1)
DescriptionThere is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent til
2014-07-17 16:44:56 619
原创 I - The 3n + 1 problem(2.4.2)
DescriptionProblems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property of an a
2014-07-17 09:44:42 600
原创 H - Gold Coins(2.4.1)
DescriptionThe king pays his loyal knight in gold coins. On the first day of his service, the knight receives one gold coin. On each of the next two days (the second and third days of service), th
2014-07-17 09:15:05 790
原创 G - Self Numbers(2.2.1)
DescriptionIn 1949 the Indian mathematician D.R. Kaprekar discovered a class of numbers called self-numbers. For any positive integer n, define d(n) to be n plus the sum of the digits of n. (The d
2014-07-16 20:50:15 611
原创 F - Ride to School(2.1.2)
DescriptionMany graduate students of Peking University are living in Wanliu Campus, which is 4.5 kilometers from the main campus – Yanyuan. Students in Wanliu have to either take a bus or ride a b
2014-07-16 20:03:06 769
原创 E - Speed Limit(2.1.1)
DescriptionBill and Ted are taking a road trip. But the odometer in their car is broken, so they don't know how many miles they have driven. Fortunately, Bill has a working stopwatch, so they can
2014-07-16 17:23:28 637
原创 C - 排列(1.5.9)
Description题目描述:大家知道,给出正整数n,则1到n这n个数可以构成n!种排列,把这些排列按照从小到大的顺序(字典顺序)列出,如n=3时,列出1 2 3,1 3 2,2 1 3,2 3 1,3 1 2,3 2 1六个排列。任务描述:给出某个排列,求出这个排列的下k个排列,如果遇到最后一个排列,则下1排列为第1个排列,即排列1 2 3…n。比如:n = 3,k
2014-07-16 15:40:30 856
原创 B - Ugly Numbers(1.5.8)
DescriptionUgly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence1, 2, 3, 4, 5, 6, 8, 9, 10, 12, ... shows the first 10 ugly numbers. By convention, 1 is included. G
2014-07-16 13:12:58 761
原创 J - Vertical Histogram(1.5.7)
DescriptionWrite a program to read four lines of upper case (i.e., all CAPITAL LETTERS) text input (no more than 72 characters per line) from the input file and print a vertical histogram that sho
2014-07-13 19:41:29 901
原创 I - Dirichlet's Theorem on Arithmetic Progressions(1.5.5)
DescriptionIf a and d are relatively prime positive integers, the arithmetic sequence beginning witha and increasing by d, i.e., a, a + d,a + 2d, a + 3d, a + 4d, ..., contains infinitely man
2014-07-13 18:51:14 548
原创 H - Quicksum(1.5.3)
DescriptionA checksum is an algorithm that scans a packet of data and returns a single number. The idea is that if the packet is changed, the checksum will also change, so checksums are often us
2014-07-13 18:14:13 492
原创 G - Specialized Four-Digit Numbers(1.5.2)
DescriptionFind and list all four-digit numbers in decimal notation that have the property that the sum of its four digits equals the sum of its digits when represented in hexadecimal (base 16) no
2014-07-13 17:27:23 535
原创 F - Humidex(1.4.2)
DescriptionAdapted from Wikipedia, the free encyclopediaThe humidex is a measurement used by Canadian meteorologists to reflect the combined effect of heat and humidity. It differs from the he
2014-07-13 16:49:53 568
原创 E - Hangover(1.4.1)
DescriptionHow far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card length. (We're assuming that the cards must be perpendic
2014-07-13 15:57:36 529
原创 D - I Think I Need a Houseboat(1.3.1)
D - I Think I Need a Houseboat(1.3.1)Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64uSubmitStatusDescriptionFred Mapper is considering purchasing some lan
2014-07-13 15:27:09 621
原创 C - Sum of Consecutive Prime Numbers(1.2.2)
C - Sum of Consecutive Prime Numbers(1.2.2)Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmitStatusDescriptionSome positive integers can be represented by
2014-07-13 15:25:51 1069
原创 B - Doubles(1.2.1)
B - Doubles(1.2.1)Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64uSubmitStatusDescriptionAs part of an arithmetic competency program, your students will be
2014-07-13 15:22:35 618
原创 A - Financial Management(1.1.1)
/*DescriptionLarry graduated this year and finally has a job. He's making a lot of money, but somehow never seems to have enough. Larry has decided that he needs to grab hold of his financial port
2014-07-13 15:15:39 1274
font-awesome-jquery-fontIconPicker-Demo.zip
2016-10-13
Mybatis 中文文档 3.4.CHM
2016-09-27
Ubuntu下Apache2+Mod_jk+WildFly8无法外网访问
2016-12-26
TA创建的收藏夹 TA关注的收藏夹
TA关注的人