1010 Radix (25)(25 分)(完成度:24/25)

目录 题目: 分析: 反思: 代码: 题目: Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is "y...

2018-07-25 17:45:59

阅读数 195

评论数 2

1012 The Best Rank (25)(25 分)

目录 题目: 反思: 代码: 题目: To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Pro...

2018-07-29 15:38:04

阅读数 61

评论数 0

1011 World Cup Betting (20)(20 分)

  题目:  With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best tea...

2018-07-28 18:40:24

阅读数 22

评论数 0


转自:https://blog.csdn.net/fengbingchun/article/details/78006735 侵删 &amp;lt;functional&amp;gt;是C++标准库中的一个头文件,定义了C++标准中多个用于表示函数对象(function obj...

2018-07-23 10:57:50

阅读数 283

评论数 0


http://www.kuqin.com/shuoit/20140421/339376.html 2. C/C++库文件的数据类型边界 在C语言中的各数据类型的边界如下:  包含在头文件#include &amp;lt;limits.h&amp;gt;  c++包含在#incl...

2018-07-23 10:31:19

阅读数 62

评论数 0

1009 Product of Polynomials (25)(25 分)

目录 题目: 反思: 代码: 题目: This time, you are supposed to find A*B where A and B are two polynomials. Input Specification: Each input file contains o...

2018-07-21 19:14:25

阅读数 71

评论数 0

1003 Emergency (25)(25 分)

目录 题目: 代码: 题目: As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities...

2018-07-21 14:48:04

阅读数 41

评论数 0

1002 A+B for Polynomials (25)(25 分)

目录 题目: 代码: 题目: This time, you are supposed to find A+B where A and B are two polynomials. Input Each input file contains one test case. Each c...

2018-07-21 14:46:11

阅读数 54

评论数 0

1001 A+B Format (20)(20 分)

目录 题目:  代码: 题目: Calculate a + b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (u...

2018-07-21 14:44:17

阅读数 59

评论数 0


vector的=是深拷贝,可以用a的值覆盖b的值,而不是单纯的指针指向变化。 即vector&amp;lt;int&amp;gt; a(3),b(3); a[0]=0,b[0]=9; a[1]=1,b[1]=8; a[2]=2,b[2]=7; b=a; cout&...

2018-07-21 14:39:40

阅读数 33

评论数 0

1008 Elevator (20)(20 分)

目录 题目:  代码: 题目:  The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote a...

2018-07-20 20:33:40

阅读数 30

评论数 0


目录 问题描述: 1、穷举法,复杂度O(n^3) 2、穷举法改进,复杂度O(n^2) 3、分治法,复杂度O(nlgn) 4、联机算法,复杂度O(n) 问题描述: 输入一个数值数组,确定具有最大和的连续子序列 vector&amp;lt;int&amp;gt; a;用...

2018-07-19 15:03:46

阅读数 57

评论数 0

1007 Maximum Subsequence Sum (25)(25 分)

目录 题目: 分析:  反思: 代码: 题目: Given a sequence of K integers { N~1~, N~2~, ..., N~K~ }. A continuous subsequence is defined to be { N~i~, N~i+1~, .....

2018-07-19 09:37:31

阅读数 89

评论数 0

1006 Sign In and Sign Out (25)(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 o...

2018-07-18 15:05:13

阅读数 39

评论数 0

1005 Spell It Right (20)(20 分)

  目录   题目: 反思: 代码:  题目: 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...

2018-07-18 14:23:52

阅读数 66

评论数 0


使int型的1输出为00001 #include&amp;lt;iostream&amp;gt; using namespace std; int main() { int a = 1; printf(&quot;%05d\n&quot;, a); ret...

2018-07-18 08:55:33

阅读数 27

评论数 0


目录   map可以用于代替动态数组,增删查改非常方便 map中添加新元素: map可以用于代替动态数组,增删查改非常方便 map中添加新元素: Map[index]=value; Map.insert(pair&amp;lt;与Map相等&amp;gt...

2018-07-18 08:55:23

阅读数 22

评论数 0

1004 Counting Leaves (30)(30 分)

目录 题目: 分析: 反思: 代码: 题目: A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child...

2018-07-18 08:55:09

阅读数 151

评论数 0

取消 删除