pat
文章平均质量分 71
minose
这个作者很懒,什么都没留下…
展开
-
pat 最大子列和问题
时间限制:50000ms内存限制:64MB代码长度限制:16kB判题程序:系统默认作者:DS课程组单位:浙江大学给定KKK个整数组成的序列{N1N_1N1,N2N_2N2, ..., NKN_KNK },“连续子列”被定义为{ NiN_iNi,Ni+1N_{i+1}Ni+1, ..., NjN_jNj },其中 1≤i≤j原创 2017-02-24 10:00:29 · 452 阅读 · 1 评论 -
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...原创 2018-09-19 19:53:25 · 597 阅读 · 0 评论 -
1039 Course List for Student (25)(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 ...原创 2018-08-13 21:33:12 · 471 阅读 · 0 评论 -
1020 Tree Traversals (25)(25 分)
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 cor...原创 2018-08-08 21:28:05 · 668 阅读 · 0 评论 -
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 Programming Language, M - Mathematics (Calculus or Linear Algebra), and E - Eng...原创 2018-08-08 21:02:57 · 330 阅读 · 0 评论 -
1025 PAT Ranking (25)(25 分)
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 w...原创 2018-08-13 14:50:35 · 199 阅读 · 0 评论 -
1017 Queueing at Bank (25)(25 分)
uppose 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-08-13 12:03:28 · 206 阅读 · 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 one test case. Each case occupies 2 lines, and each line contains the informa...原创 2018-08-08 15:05:06 · 102 阅读 · 0 评论 -
1032 Sharing (25)(25 分)
To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the words share the same sublist if they share the same suffix. For example,...原创 2018-08-14 10:48:44 · 455 阅读 · 0 评论 -
1035 Password (20)(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 ...原创 2018-08-01 10:12:23 · 255 阅读 · 0 评论 -
1050 String Subtraction (20)(20 分)
Given two strings S~1~ and S~2~, S = S~1~ - S~2~ is defined to be the remaining string after taking all the characters in S~2~ from S~1~. Your task is simply to calculate S~1~ - S~2~ for any given str...原创 2018-08-01 10:10:37 · 188 阅读 · 0 评论 -
1023 Have Fun with Numbers (20)(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 con...原创 2018-08-09 10:05:24 · 149 阅读 · 0 评论 -
5-10 树的遍历
时间限制:400ms内存限制:64MB代码长度限制:16kB判题程序:系统默认作者:陈越单位:浙江大学给定一棵二叉树的后序遍历和中序遍历,请你输出其层序遍历的序列。这里假设键值都是互不相等的正整数。 输入格式:输入第一行给出一个正整数NNN(≤30\le 30≤30),是二叉树中结点的个数。第二行给出其后序遍历序列。第三行给出其中序遍历序列。数字间以空格分隔。 输出格式:在一行中输出原创 2017-02-21 20:03:07 · 548 阅读 · 0 评论 -
1009 Product of Polynomials (25 分)
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 informati...原创 2018-09-19 20:20:36 · 324 阅读 · 0 评论