自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 1028

Excel can sort records according to any column. Now you are supposed to imitate this function.InputEach input file contains one test case. For each case, the first line contains two integers N (<=10000

2018-03-31 15:56:10 164

原创 1027

People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle 2 digi

2018-03-31 14:58:53 225

转载 1026

加油加油加油

2018-03-30 17:31:40 91

原创 1025

Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run simultaneously in several places, and the ranklists wi

2018-03-29 16:20:25 502

原创 equals 和 ==

java中的数据类型,可分为两类: 1.基本数据类型,也称原始数据类型。byte,short,char,int,long,float,double,boolean 他们之间的比较,应用双等号(==),比较的是他们的值。 2.复合数据类型(类) 当他们用(==)进行比较的时候,比较的是他们在内存中的存放地址,所以,除非是同一个new出来的对象,他们的比较后的结果为true,否则比较后结

2018-03-29 09:06:43 92

原创 MySQL

win+R:services.msc->启动MySQL57

2018-03-29 08:22:02 121

原创 1024

A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number. All single digit numbers are palindromic numbers.

2018-03-27 17:15:21 9154

原创 1023

Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplication. Double it we will obtain 246913578, which happens to be another 9-digit number cons

2018-03-27 16:04:05 189

转载 1022

A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is assigned an unique 7-digit number a...

2018-03-26 15:56:25 212

转载 c++getline()、get()等

此文转自在学习C++的过程中,经常会遇到输入输出的问题,以下总结一下下面几个函数的用法: 1)、cin 2)、cin.get() 3)、cin.getline() 4)、getline() 5)、gets()1、cin>>   用法1:最基本,也是最常用的用法,输入一个数字:     #include <iostream>  using namespace std;  main (

2018-03-26 15:09:25 39320 10

原创 备战1

递归:结束条件+子递归多项式直接暴力数组,index为指数,值为系数输入时尽量把要输出的信息都采集到而结构体中(时间、排名…)时间用int表示(秒),计算设置相对0起点结构体定义struct xx{…} s[1000];直接初始化了结构体数组string比较用strcmp()&lt;0 (#include ...

2018-03-24 19:47:00 115

原创 1021

A graph which is connected and acyclic can be considered a tree. The height of the tree depends on the selected root. Now you are supposed to find the root that results in a highest tree. Such a root i

2018-03-24 16:43:00 155

原创 备战2

–round()、floor()、ceil 2.1 2.6 -2.1 -2.6 floor : 不大于自变量的最大整数 2 2 ...

2018-03-23 21:46:15 158

转载 (普通)二叉树知前中序求后序,后中序求前序,(二叉搜索树的)前序求后序

来自柳婼 输出层序的话可以用数组每层遍历存储,参考PAT甲级1020已知后序中序输出前序#include &lt;iostream&gt;using namespace std;int post[] = {3, 4, 2, 6, 5, 1};int in[] = {3, 2, 4, 1, 6, 5};void pre(int root, int start, int end)...

2018-03-23 21:20:43 159

转载 1020

Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to output the level order traversal sequence of the corr

2018-03-23 21:03:53 143

原创 1019

A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number. All single digit numbers are palindromic numbers.

2018-03-23 19:19:23 147

原创 1018

There is a public bike service in Hangzhou City which provides great convenience to the tourists from all over the world. One may rent a bike at any station and return it to any other stations in the c

2018-03-22 21:13:06 165

原创 c++STL

vector: - v(n,ele) : 创建长度n,并且全部初始化为ele(只有在创建时可以vector&lt; type &gt; xx (n,ele)) - v(v1) : 拷贝v1 - v.resize(n,val) : 重新设置长度,并每个填上val值(可选),若超出capacity,自动内存分配list: - l.push_front(ele):ele压入头 -...

2018-03-21 21:17:21 113

原创 1017

Suppose a bank has K windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. All the customers have to wait in line behind the yellow lin

2018-03-21 21:02:43 182

原创 1016

A long-distance telephone company charges its customers by the following rules:Making a long-distance call costs a certain amount per minute, depending on the time of day when the call is made. When a

2018-03-20 21:05:41 155

转载 c++结构体

转自下面第二种定义后,可这样初始化:Stu={"xxx", 1.0, 1.0};//定义一个结构体,类型为struct Student struct Student { string name; double eng; double ch; }; //定义了一个结构体,类型为struct Student;且定义了一个结...

2018-03-20 19:01:42 299

原创 1015

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...

2018-03-18 15:57:18 130

原创 1014

Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules for the customers to wait in line are:The space...

2018-03-17 21:49:31 178

原创 1013

It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are closed. We must know immediately if we nee...

2018-03-16 16:15:51 125

原创 1012

To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mathematics (Calculus or Linear Algebra), and E - Eng...

2018-03-15 16:38:53 93

原创 1011

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...

2018-03-14 19:55:52 285

原创 1010

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 in...

2018-03-14 18:29:52 118

原创 1009

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 informa...

2018-03-12 17:11:28 104

原创 1008

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...

2018-03-12 15:16:51 232

原创 1007

Given a sequence of K integers { N1, N2, …, NK }. A continuous subsequence is defined to be { Ni, Ni+1, …, Nj } where 1 &lt;= i &lt;= j &lt;= K. The Maximum Subsequence is the continuous subsequence w...

2018-03-11 20:22:04 100

原创 1006

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

2018-03-10 16:38:18 190

原创 1005

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. Each cas

2018-03-10 15:01:47 122

原创 1004

A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child.InputEach input file contains one test case. Each case starts with a line co...

2018-03-09 17:25:27 107

原创 1003

As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some roads. Amount of rescue teams in each city and the l...

2018-03-08 16:49:28 119

原创 1002

This time, you are supposed to find A+B where A and B are two polynomials.InputEach input file contains one test case. Each case occupies 2 lines, and each line contains the information of a polyn...

2018-03-05 21:14:45 112

原创 1001

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).InputEach input file contains ...

2018-03-04 16:10:08 94

空空如也

空空如也

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

TA关注的人

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