随笔分类 - PAT
摘要:Sample Input: 10 3 3 5 6 7 0 0 1 1 0 2 1 0 3 3 1 3 1 2 3 1 Sample Output: 3 0->2->3 0 题目大意 杭州市的自行车站管理系统,每个站点都有一定数量的自行车,数量处于最大值一半的状态是“perfect condition
阅读全文
摘要:For each test case, all dates will be within a single month. Each on-line record is paired with the chronologically next record for the same customer
阅读全文
摘要:1014 Waiting in Line (30分) Sample Input: 2 2 7 5 1 2 6 4 3 534 2 3 4 5 6 7 Sample Output: 08:07 08:06 08:10 17:00 Sorry 思路 这道题是一个银行队列的模拟,具体处理比较复杂,要想不超
阅读全文
摘要:1013 Battle Over Cities (25分) It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all t
阅读全文
摘要:暴力、打表(记忆已经查询过的学号对应的排名,防止反复查询同一学号) 因为题目中已经规定学号是6位数,所以用int表示方便打表。 1 #include <iostream> 2 #include <stdio.h> 3 #include <string> 4 #include <algorithm>
阅读全文
摘要:1010 Radix (25分) 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 nu
阅读全文
摘要: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 cont
阅读全文
摘要:1007 Maximum Subsequence Sum (25分) Given a sequence of K integers { N 1 , N 2 , ..., N K }. A continuous subsequence is defined to be { N
阅读全文
摘要: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
阅读全文
摘要: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. In
阅读全文
摘要:1003 Emergency (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
阅读全文