- 博客(112)
- 收藏
- 关注
转载 算法的力量——李开复
算法的力量2006年5月算法是计算机科学领域最重要的基石之一,但却受到了国内一些程序员的冷落。许多学生看到一些公司在招聘时要求的编程语言五花八门,就产生了一种误解,认为学计算机就是学各种编程语言,或者认为,学习最新的语言、技术、标准就是最好的铺路方法。其实,大家被这些公司误导了。编程语言虽然该学,但是学习计算机算法和理论更重要,因为计算机语言和开发平台日新月异,但万变不离其宗的是那些算法和理论,...
2018-02-26 05:31:27 545
原创 π-Algorithmist分类题目(3)
原题网站:Algorithmist,http://www.algorithmist.com/index.php/Main_Pageπ-Algorithmist分类题目(3)Probability TheoryUVA 10288 CouponsUVA 10491 Cows and CarsUVA 10900 So you want to be a 2n-aire?Numerical MethodUV...
2018-02-25 22:02:00 643
原创 π-Algorithmist分类题目(2)
原题网站:Algorithmist,http://www.algorithmist.com/index.php/Main_Pageπ-Algorithmist分类题目(2)Set TheoryUVA 1262 PasswordUVALive 3524 The Cow DoctorUVA 10158 WarUVA 10583 Ubiquitous ReligionsUVA 10608 Friends...
2018-02-25 22:00:13 553
原创 π-Algorithmist分类题目(1)
原题网站:Algorithmist,http://www.algorithmist.com/index.php/Main_Pageπ-Algorithmist分类题目(1)SortingUVALive 2724 EurodiffusionUVALive 3527 Find the ClonesSPOJ SBANK Sorting Bank AccountsTopCoder 7585 Changin...
2018-02-25 21:57:16 846
原创 杭电OJ分类题目(4)-Graph
原题出处:HDOJ Problem Index by Type,http://acm.hdu.edu.cn/typeclass.php杭电OJ分类题目(4)HDU Graph Theory - Union-Find SetsHDU 1116 Play on WordsHDU 1142 A Walk Through the ForestHDU 1213 How Many TablesHDU 1232...
2018-02-25 12:09:15 685
原创 杭电OJ分类题目(3)
原题出处:HDOJ Problem Index by Type,http://acm.hdu.edu.cn/typeclass.php杭电OJ分类题目(3)HDU Computational GeometryHDU 1086 You can Solve a Geometry Problem tooHDU 1115 Lifting the StoneHDU 1140 War on WeatherHD...
2018-02-25 12:07:57 731
原创 杭电OJ分类题目(2)
原题出处:HDOJ Problem Index by Type,http://acm.hdu.edu.cn/typeclass.php杭电OJ分类题目(2)HDU Water~~~HDU 1004 Let the Balloon RiseHDU 1005 Number SequenceHDU 1008 ElevatorHDU 1012 u Calculate eHDU 1013 Digital R...
2018-02-25 12:05:37 860
原创 杭电OJ分类题目(1)
原题出处:HDOJ Problem Index by Type,http://acm.hdu.edu.cn/typeclass.php杭电OJ分类题目(1)HDU IntroductionHDU 1000 A + B ProblemHDU 1001 Sum ProblemHDU 1089 A+B for Input-Output Practice (I)HDU 1090 A+B for Input...
2018-02-25 12:01:26 2928
原创 POJ1503 UVA424 UVALive5399 Integer Inquiry【大数】
Integer InquiryTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 35421 Accepted: 13811DescriptionOne of the first users of BIT's new supercomputer was Chip Diller. He extended his exploration ...
2018-02-25 01:16:32 490
原创 POJ1083 HDU1050 ZOJ1029 UVALive2326 Moving Tables【序列+最值】
Moving TablesTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 33026 Accepted: 11063DescriptionThe famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is ...
2018-02-24 18:03:31 501
原创 HDU2084 数塔【DP】
数塔Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 51530 Accepted Submission(s): 30346Problem Description在讲述DP算法的时候,一个经典的例子就是数塔问题,它是这样描述的:有如下所...
2018-02-24 09:27:23 867
原创 HDU2039 三角形【水题】
三角形Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 103864 Accepted Submission(s): 34070Problem Description给定三条边,请你判断一下能不能组成一个三角形。 Input输入数据第一...
2018-02-24 08:54:08 1646
原创 HDU2055 An easy problem【水题】
An easy problemTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 28633 Accepted Submission(s): 18657Problem Descriptionwe define f(A) = 1, f(a)...
2018-02-24 08:38:47 606
原创 HDU1060 Leftmost Digit【取对数+数学】
Leftmost DigitTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 19168 Accepted Submission(s): 7584Problem DescriptionGiven a positive integer N...
2018-02-23 22:05:11 410
原创 UVA10110 Light, more light【数学】
There is man named ”mabu” for switching on-off light in our University. He switches on-off the lightsin a corridor. Every bulb has its own toggle switch. That is, if it is pressed then the bulb turns ...
2018-02-23 18:41:55 429
原创 UVA10089 Repackaging【数学】
Coffee cups of three different sizes (identified as size 1, size 2 and size 3 cups) are produced in factories under ACM (Association of Cup Makers) and are sold in various packages. Each type of packa...
2018-02-23 17:51:55 484
原创 HDU1170 Balloon Comes!【水题】
Balloon Comes!Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 33004 Accepted Submission(s): 12441Problem DescriptionThe contest starts now! H...
2018-02-23 17:22:36 619
原创 UVA10090 Marbles【扩展欧几里得算法】
I have some (say, n) marbles (small glass balls) and I am going to buy some boxes to store them. The boxes are of two types:Type 1: each box costs c1 Taka and can hold exactly n1 marblesType 2: each b...
2018-02-23 17:06:52 795
原创 POJ2649 ZOJ1850 UVA10139 Factovisors【筛选法+勒让德定理】
FactovisorsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4511 Accepted: 1116DescriptionThe factorial function, n! is defined thus for n a non-negative integer: 0! = 1 n! = n * (n-1)...
2018-02-23 12:00:44 590
原创 UVA120 Stacks of Flapjacks【排序模拟】
Stacks and Queues are often considered the bread and butter of data structures and find use in architecture, parsing, operating systems, and discrete event simulation. Stacks are also important in the...
2018-02-23 06:19:16 614
原创 ZOJ1881 Interpreter【模拟】
InterpreterTime Limit: 2 Seconds Memory Limit: 65536 KBA certain computer has 10 registers and 1000 words of RAM. Each register or RAM location holds a 3-digit integer between 0 and 999. Instruct...
2018-02-22 20:23:53 432
原创 POJ2577 Interpreter【模拟】
InterpreterTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2186 Accepted: 742DescriptionA certain computer has 10 registers and 1000 words of RAM. Each register or RAM location holds a 3-dig...
2018-02-22 20:20:41 463
原创 UVA10033 Interpreter【模拟】
A certain computer has 10 registers and 1000 words of RAM. Each register or RAM location holds a 3-digit integer between 0 and 999. Instructions are encoded as 3-digit integers and stored in RAM. The ...
2018-02-22 19:48:36 578
原创 UVA10267 Graphical Editor【模拟】
The simple graphical editor deals with a rectangular table M × N (1 ≤ M, N ≤ 250). Each pixel of the table has its colour. The picture is formed from this square pixels. The problem is to write a pro...
2018-02-22 09:12:06 1046
原创 UVA12004 Bubble Sort【数学】
Check the following code which counts the number of swaps of bubble sort.int findSwaps( int n, int a[] ){ int count = 0, i, j, temp, b[100000]; for( i = 0; i < n; i++ ) { b[i] = a[i]; ...
2018-02-22 02:17:29 485
原创 AOJ-ALDS1_2_A Bubble Sort【冒泡排序】
Bubble Sort Aizu - ALDS1_2_A Write a program of the Bubble Sort algorithm which sorts a sequence A in ascending order. The algorithm should be based on the following pseudocode:BubbleSort(A)1 for i =...
2018-02-21 08:50:40 779
原创 ICPC程序设计题解书籍系列之八:(美)斯基纳等:《挑战编程-程序设计竞赛训练手册》
1 Getting StartedUVA100 POJ1207 HDU1032 The 3n + 1 problem【水题】 - 海岛Blog - CSDN博客UVA10189 Minesweeper【Ad Hoc】 - 海岛Blog - CSDN博客POJ2646 ZOJ1847 UVA10137 The Trip【数学】 - 海岛Blog - CSDN博客POJ1102 LC-...
2018-02-21 07:43:20 781
转载 POJ2246 HDU1082 ZOJ1094 UVA442 Matrix Chain Multiplication题解
代码来源:DeathYmzAC的C++语言程序如下:#include<iostream>#include<cstdio>#include<cstring>#include<stack>using namespace std;struct matrix{ int r,c;};stack<matrix> s;int main...
2018-02-20 23:49:32 378
转载 POJ2260 ZOJ1949 UVA541 Error Correction题解
代码来源:DeathYmzAC的C++语言程序如下:#include<iostream>#include<cstdio>#include<cstring>using namespace std;const int N=100;int matrix[N][N];int row[N],col[N];int main(){ int n; while...
2018-02-20 23:45:33 394
原创 SPOJ-CODESPTB Insertion Sort【插入排序】
Insertion Sort SPOJ - CODESPTBInsertion Sort is a classical sorting technique. One variant of insertion sort works as follows when sorting an array a[1..N] in non-descending order:for i <- 2 to N ...
2018-02-20 17:13:54 500
原创 AOJ-ALDS1_1_A Insertion Sort【插入排序】
Insertion Sort Aizu - ALDS1_1_AWrite a program of the Insertion Sort algorithm which sorts a sequence A in ascending order. The algorithm should be based on the following pseudocode:for i = 1 to A.len...
2018-02-20 12:18:18 801
原创 UVA583 UVALive5406 Prime Factors【素数因子+筛选法】
Webster defines prime as:prime (pr¯im) n. [ME, fr. MF, fem. of prin first, L primus; akin to L prior] 1: first in time: original 2 a: having no factor except itself and one ⟨3 is a ∼ number⟩ b : havin...
2018-02-20 08:59:44 686
原创 POJ2407 ZOJ1906 UVA10229 Relatives【欧拉函数+数论】
RelativesTime Limit:1000MSMemory Limit:65536KTotal Submissions:15625Accepted:7932DescriptionGiven n, a positive integer, how many positive integers less than n are relatively prime to n? Two int...
2018-02-19 17:27:03 512
原创 UVA355 UVALive5249 The Bases Are Loaded【进制】
Write a program to convert a whole number specified in any base (2..16) to a whole number in any other base (2..16). “Digits” above 9 are represented by single capital letters; e.g. 10 by A, 15 by F, ...
2018-02-19 07:16:49 679
原创 AOJ-ALDS1_1_D Maximum Profit【最值+水题】
Maximum Profit Aizu - ALDS1_1_D You can obtain profits from foreign exchange margin transactions. For example, if you buy 1000 dollar at a rate of 100 yen per dollar, and sell them at a rate of 108 ye...
2018-02-19 06:35:43 1065
原创 CCF201712-1 最小差值(100分)
试题编号: 201712-1 试题名称: 最小差值 时间限制: 1.0s 内存限制: 256.0MB 问题描述: 问题描述 给定n个数,请找出其中相差(差的绝对值)最小的两个数,输出它们的差值的绝对值。 输入格式 输入第一行包含一个整数n。 第二行包含n个正整数,相邻整数之间使用一个空格分隔。...
2018-02-18 18:11:23 22029 9
原创 UVA900 Brick Wall Patterns【递推】
If we want to build a brick wall out of the usual size of brick which has a length twice as long as its height, and if our wall is to be two units tall, we can make our wall in a number of patterns, d...
2018-02-18 08:12:22 547
原创 UVA12578 10:6:2【数学】
The national flag of Bangladesh is bottle green in color and rectangular in size with the length (L) to width ratio of 10:6. It bears a red circle on the background of green. It maintains the length (...
2018-02-18 07:48:33 740
原创 UVA944 Happy Numbers【数学】
Let the sum of the squares of the digits of a positive integer s0 be represented by s1. In a similar way, let the sum of the squares of the digits of s1 be represented by s2, and so on. If si = 1 for ...
2018-02-17 23:11:02 658
原创 UVA913 Joana and the Odd Numbers【数学】
Joana loves playing with odd numbers. In the other day, she started writing, in each line, an odd number of odd numbers. It looked as follows:13 5 79 11 13 15 1719 21 23 25 27 29 31...On a certain lin...
2018-02-17 18:58:23 570
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人