自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(117)
  • 资源 (3)
  • 收藏
  • 关注

原创 1047. Student List for Course (25)

Zhejiang University has 40000 students and provides 2500 courses. Now given the registered course list of each student, you are supposed to output the student name lists of all the courses.Input Specif

2016-02-23 14:41:03 301

原创 1039. Course List for Student (25)

Zhejiang University has 40000 students and provides 2500 courses. Now given the student name lists of all the courses, you are supposed to output the registered course list for each student who comes f

2016-02-23 11:18:30 217

原创 1024. Palindromic Number (25)

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.

2016-02-23 10:37:12 459

原创 1023. Have Fun with Numbers (20)

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

2016-02-23 10:08:51 218

原创 B1017. A除以B (20)

本题要求计算A/B,其中A是不超过1000位的正整数,B是1位正整数。你需要输出商数Q和余数R,使得A = B * Q + R成立。输入格式:输入在1行中依次给出A和B,中间以1空格分隔。输出格式:在1行中依次输出Q和R,中间以1空格分隔。 输入样例:123456789050987654321 7输出样例:17636684150141093474 3#include<iostream>#incl

2016-02-23 09:15:05 189

原创 1096. Consecutive Factors (20)

Among all the factors of a positive integer N, there may exist several consecutive numbers. For example, 630 can be factored as 3*5*6*7, where 5, 6, and 7 are the three consecutive numbers. Now given a

2016-02-23 08:54:13 232

原创 1078. Hashing (25)

时间限制 100 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, YueThe task of this problem is simple: insert a sequence of distinct positive integers into a hash table, and output the positio

2016-02-22 17:04:32 306

原创 1088. Rational Arithmetic (20)

For two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, difference, product and quotient.Input Specification:Each input file contains one test case,

2016-02-22 15:53:46 400

原创 1015. Reversible Primes (20)

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 pri

2016-02-22 15:09:28 292

原创 1081. Rational Sum (20)

Given N rational numbers in the form “numerator/denominator”, you are supposed to calculate their sum.Input Specification:Each input file contains one test case. Each case starts with a positive intege

2016-02-22 11:08:20 336

原创 1049. Counting Ones (30)

The task is simple: given any positive integer N, you are supposed to count the total number of 1’s in the decimal form of the integers from 1 to N. For example, given N being 12, there are five 1’s in

2016-02-22 10:54:40 382

原创 b1003. 我要通过!(20)

“答案正确”是自动判题系统给出的最令人欢喜的回复。本题属于PAT的“答案正确”大派送 —— 只要读入的字符串满足下列条件,系统就输出“答案正确”,否则输出“答案错误”。得到“答案正确”的条件是:字符串中必须仅有P, A, T这三种字符,不可以包含其它字符;任意形如 xPATx 的字符串都可以获得“答案正确”,其中 x 或者是空字符串,或者是仅由字母 A 组成的字符串;如果 aPbTc 是正确的

2016-02-22 09:42:31 287

原创 1101. Quick Sort (25)

There is a classical process named partition in the famous quick sort algorithm. In this process we typically choose one element as the pivot. Then the elements less than the pivot are moved to its lef

2016-02-22 08:48:54 336

原创 1029. Median (25)

本题的输入应该使用scanf,否则会发送超时。在考场上,应当尽量使用scanf.时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, YueGiven an increasing sequence S of N integers, the median is the number at the middle

2016-02-21 16:41:17 314

原创 1085. Perfect Sequence (25)

Given a sequence of positive integers and another positive integer p. The sequence is said to be a “perfect sequence” if M <= m * p where M and m are the maximum and minimum numbers in the sequence, re

2016-02-21 14:36:43 180

原创 1038. Recover the Smallest Number (30)

时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, YueGiven a collection of number segments, you are supposed to recover the smallest number from them. For example, given {32, 321

2016-02-21 11:37:46 440

原创 1037. Magic Coupon (25)

The magic shop in Mars is offering some magic coupons. Each coupon has an integer N printed on it, meaning that when you use this coupon with a product, you may get N times the value of that product ba

2016-02-21 11:08:23 194

原创 1033. To Fill or Not to Fill (25)

To Fill or Not to Fill (25) 时间限制 10 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 ZHANG, GuochuanWith highways available, driving a car from Hangzhou to any other city is easy. But since

2016-02-21 10:29:17 197

原创 1104. Sum of Number Segments (20)

Given a sequence of positive numbers, a segment is defined to be a consecutive subsequence. For example, given the sequence {0.1, 0.2, 0.3, 0.4}, we have 10 segments: (0.1) (0.1, 0.2) (0.1, 0.2, 0.3) (

2016-02-20 19:35:46 234

原创 1048. Find Coins (25)

Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept all kinds of coins as payments. However,

2016-02-20 17:06:47 256

原创 1041. Be Unique (20)

Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a number chosen from [1, 104]. The first one who bets on a

2016-02-20 16:52:56 332

原创 1095. Cars on Campus (30)

Zhejiang University has 6 campuses and a lot of gates. From each gate we can collect the in/out times and the plate numbers of the cars crossing the gate. Now with all the information available, you ar

2016-02-20 16:26:46 317

原创 1080. Graduate Admission (30)

It is said that in 2013, there were about 100 graduate schools ready to proceed over 40,000 applications in Zhejiang Province. It would help a lot if you could write a program to automate the admission

2016-02-20 11:55:00 441

原创 1083. List Grades (25)

Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those student records of which the grades a

2016-02-19 10:38:13 369

原创 1075. PAT Judge (25)

PAT Judge (25) 时间限制 200 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, YueThe ranklist of PAT is generated from the status list, which shows the scores of the submittions. This time

2016-02-19 09:57:29 202

原创 1008. Elevator (20)

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 seco

2016-02-18 19:29:11 194

原创 1082. Read Number in Chinese (25)

Given an integer with no more than 9 digits, you are supposed to read it in the traditional Chinese way. Output “Fu” first if it is negative. For example, -123456789 is read as “Fu yi Yi er Qian san Ba

2016-02-18 11:49:16 289

原创 1012. The Best Rank (25)

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

2016-02-18 08:51:14 581

原创 1035. Password (20)

To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwords since it is hard to distinguish 1 (one) from l (L i

2016-02-17 10:58:22 235

原创 1007. Maximum Subsequence Sum (25)

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

2016-02-17 10:08:44 224

原创 1005. Spell It Right (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 sum in English.Input Specification:Each input file contains one test case. Each cas

2016-02-17 09:40:19 270

原创 1027. Colors in Mars (20)

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

2016-02-16 15:59:01 208

原创 1004. Counting Leaves (30)

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 contain

2016-02-16 15:33:28 392

原创 1019. General Palindromic Number (20)

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.

2016-02-16 15:12:14 296

原创 1031. Hello World for U (20)

时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, YueGiven any string of N (>=5) characters, you are asked to form the characters into the shape of U. For example, “helloworld” c

2016-02-16 10:45:03 335

原创 1044. Shopping in Mars (25)

Shopping in Mars is quite a different experience. The Mars people pay by chained diamonds. Each diamond has a value (in Mars dollars M).Whenmakingthepayment,thechaincanbecutatanypositionforonlyonceands

2016-02-16 10:09:49 278

原创 1036. Boys vs Girls (25)

Boys vs Girls (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, YueThis time you are asked to tell the difference between the lowest grade of all the male students and the

2016-02-15 09:23:15 206

原创 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

2016-02-14 09:29:38 416

原创 1011. World Cup Betting (20)

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

2016-02-12 22:11:47 442

原创 1002. A+B for Polynomials (25)

时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, YueThis time, you are supposed to find A+B where A and B are two polynomials.InputEach input file contains one test case. Each c

2016-02-12 16:50:09 209

单词及其释义的录入和读取

设计一个程序,该程序输入一个英语单词和它的释义(应考虑一个单词可以有多个释义)。将单词和它的释义分别存放在文件word.dat和meaning.dat中。文件word.dat中存储的数据的结构为:       class index       { public:        char word[20];        streampos offset;       }; 其中,数据成员offset用于记录单词word的释义在文件meaning.dat中的位置。用户输入一个单词,屏幕输出该单词的释义。

2015-07-06

八数码问题求解

八数码问题又称重排九宫问题,在一个33的棋盘上,随机放置1到8的数字棋子,剩下一个空位,如图所示。数字可以移动到空位(编程时,空位可用0代替,且可以理解为是空位的上、下、左、右移动),经过若干次移动后,棋局到达指定目标状态。   说明:重排九宫问题,对任意给定初始状态,可达下图所示两个目标之一,不可互换。

2015-07-06

小型自选商场商品管理系统

   要求:能对小型自选商场的商品进货、销售、库存等环节进行管理。主要有:    1)能记录每一笔进货,查询商品的进货记录,并能按月进行统计。    2)能记录每一笔售货,查询商品的销售情况,并能进行日盘存、月盘存。    3)在记录进货及售货的同时,必须动态刷新库存。    4)能查询某个厂商或供应商的信息。    5)设计收银台程序,能根据输入的商品编号、数量,显示某顾客所购商品的清单,并显示收付款情况。    所涉及的表建议如下: 库存(商品ID、名称、型号规格、产地、单位、定价、折扣率、库存数量、最低存量、供应商ID)    售货(售货ID、商品ID、售价、数量、金额、存根号、销售日期)    进货(进货ID、商品ID、进价、数量、金额、进货日期)    供应商(供应商ID、供应商名称、邮编、地址、电话、联系人、联系人电话)

2015-07-06

空空如也

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

TA关注的人

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