
pat
文章平均质量分 67
cfcf0517
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
最大子列和问题
给定K个整数组成的序列{ N1, N2, ..., NK },“连续子列”被定义为{ Ni, Ni+1, ..., Nj },其中 1 输入格式: 输入第1行给出正整数 K ( 输出格式: 在一行中输出最大子列和。如果序列中所有整数皆为负数,则输出0。 输入样例: 6 -2 11 -4 13 -5 -2 输出样例: 20 #include #define原创 2015-03-30 15:54:10 · 499 阅读 · 0 评论 -
1010. Radix
Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is "yes", if 6 is a decimal number and 110 is a binary number. Now for any pair of positive原创 2015-04-06 11:59:00 · 377 阅读 · 0 评论 -
1011. World Cup Betting
With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South Africa. Si原创 2015-04-06 10:25:26 · 386 阅读 · 0 评论 -
1008.Elevator
The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 sec原创 2015-04-04 19:37:50 · 380 阅读 · 0 评论 -
1009. Product of Polynomials
This time, you are supposed to find A*B where A and B are two polynomials. Input Specification: Each input file contains one test case. Each case occupies 2 lines, and each line contains the inf原创 2015-04-04 21:45:18 · 335 阅读 · 0 评论 -
Sign In and Sign Out
时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue At the beginning of every day, the first person who signs in the computer ro原创 2015-04-03 22:25:03 · 702 阅读 · 0 评论 -
A+B format
Calculate a + b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less than four digits). Input Each input file cont原创 2015-04-01 21:27:46 · 3353 阅读 · 0 评论 -
Reversing Linked List
Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6, if K = 3, then you must output 3→2→1→6→5→4; if K原创 2015-04-01 10:38:14 · 284 阅读 · 0 评论 -
Spell It Right
Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English. Input Specification: Each input file contains one test case.原创 2015-04-03 21:56:04 · 416 阅读 · 0 评论 -
A+B for Polynomials
Input Each input file contains one test case. Each case occupies 2 lines, and each line contains the information of a polynomial: K N1 aN1 N2 aN2 ... NK aNK, where K is the number of nonzero term原创 2015-04-02 12:04:20 · 700 阅读 · 0 评论 -
大数加法
题目描述 求两个非负整数(1000位以内)的和。 输入 两个非负整数(1000位以内),以空格分隔。 输出 两个非负整数的和。 样例输入 111111111111 222222222222 样例输出 333333333333 #include #include using namespace std; void Sum原创 2015-03-31 10:37:57 · 441 阅读 · 0 评论 -
Pop Sequence
Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, ..., N and pop randomly. You are supposed to tell if a given sequence of numbers is a possible pop sequence of t原创 2015-04-01 20:52:21 · 444 阅读 · 0 评论 -
一元多项式求导
设计函数求一元多项式的导数。(注:xn(n为整数)的一阶导数为n*xn-1。) 输入格式:以指数递降方式输入多项式非零项系数和指数(绝对值均为不超过1000的整数)。数字间以空格分隔。 输出格式:以与输入相同的格式输出导数多项式非零项的系数和指数。数字间以空格分隔,但结尾不能有多余空格。注意“零多项式”的指数和系数都是0,但是表示为“0 0”。 输入样例: 3 4 -5 2 6 1原创 2015-03-30 22:04:47 · 1122 阅读 · 0 评论 -
1015. Reversible Primes
A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a reversible prime because its reverse 37 is also a pr原创 2015-04-07 16:47:19 · 311 阅读 · 0 评论