自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

原创 1002 Business (35 分)

As the manager of your company, you have to carefully consider, for each project, the time taken to finish it, the deadline, and the profit you can gain, in order to decide if your group should take this project. For example, given 3 projects as the follow

2022-01-23 12:56:45 207

原创 1007 Maximum Subsequence Sum (25 分)

1007 Maximum Subsequence Sum (25 分) Given a sequence ofKintegers {N1​,N2​, ...,NK​}. A continuous subsequence is defined to be {Ni​,Ni+1​, ...,Nj​} where1≤i≤j≤K. The Maximum Subsequence is the continuous subsequence which has the largest sum of...

2022-01-23 12:19:22 287

原创 1006 Sign In and Sign Out (25 分)

At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door. Given the records of signing in's and out's, you are supposed to find the ones who have unlocked and loc

2022-01-23 12:09:32 117

原创 1012 数字分类 (20 分)

给定一系列正整数,请按要求对数字进行分类,并输出以下 5 个数字: A1​= 能被 5 整除的数字中所有偶数的和; A2​= 将被 5 除后余 1 的数字按给出顺序进行交错求和,即计算n1​−n2​+n3​−n4​⋯; A3​= 被 5 除后余 2 的数字的个数; A4​= 被 5 除后余 3 的数字的平均数,精确到小数点后 1 位; A5​= 被 5 除后余 4 的数字中最大数字。 输入格式: 每个输入包含 1 个测试用例。每个测试用例先给出一个不超过 1000 的正整数 N,随后...

2022-01-23 12:01:33 56

原创 1011 A+B 和 C (15 分)

给定区间 [−231,231] 内的 3 个整数A、B和C,请判断A+B是否大于C。 输入格式: 输入第 1 行给出正整数T(≤10),是测试用例的个数。随后给出T组测试用例,每组占一行,顺序给出A、B和C。整数间以空格分隔。 输出格式: 对每组测试用例,在一行中输出Case #X: true如果A+B>C,否则输出Case #X: false,其中X是测试用例的编号(从 1 开始)。 输入样例: 4 1 2 3 2 3 4 2147483647 0...

2022-01-23 11:58:19 359

原创 1010 一元多项式求导 (25 分)

设计函数求一元多项式的导数。(注:xn(n为整数)的一阶导数为nxn−1。) 输入格式: 以指数递降方式输 项系数和指数(绝对值均为不超过 1000 的整数)。数字间以空格分隔。 输出格式: 以与输入相同的格式输出导数多项式非零项的系数和指数。数字间以空格分隔,但结尾不能有多余空格。注意“零多项式”的指数和系数都是 0,但是表示为 0 0。 输入样例: 3 4 -5 2 6 1 -2 0 输出样例: 12 3 -10 1 6 0 思路及代码 #include <iost.

2022-01-23 11:53:02 278

原创 【无标题】

1008 Elevator (20 分) The highest building in our city has only one elevator. A request list is made up withNpositive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 seconds to move the elevator up one f..

2022-01-09 17:46:28 125

原创 【无标题】

1005 Spell It Right (20 分) Given a non-negative integerN, your task is to compute the sum of all the digits ofN, and output every digit of the sum in English. Input Specification: Each input file contains one test case. Each case occupies one line whi..

2022-01-09 17:37:28 46

原创 1009 说反话 (20 分)

1009 说反话 (20 分) 给定一句英语,要求你编写程序,将句中所有单词的顺序颠倒输出。 输入格式: 测试输入包含一个测试用例,在一行内给出总长度不超过 80 的字符串。字符串由若干单词和若干空格组成,其中单词是由英文字母(大小写有区分)组成的字符串,单词之间用 1 个空格分开,输入保证句子末尾没有多余的空格。 输出格式: 每个测试用例的输出占一行,输出倒序后的句子。 输入样例: Hello World Here I...

2022-01-09 17:32:06 217

原创 【无标题】

1008 数组元素循环右移问题 (20 分) 一个数组A中存有N(>0)个整数,在不允许使用另外数组的前提下,将每个整数循环向右移M(≥0)个位置,即将A中的数据由(A0​A1​⋯AN−1​)变换为(AN−M​⋯AN−1​A0​A1​⋯AN−M−1​)(最后M个数循环移至最前面的M个位置)。如果需要考虑程序移动数据的次数尽量少,要如何设计移动的方法? 输入格式: 每个输入包含一个测试用例,第1行输入N(1≤N≤100)和M(≥0);第2行输入N个整数,之间用空格分隔。 ...

2022-01-09 17:28:08 299

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除