![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PTA
文章平均质量分 83
你TB了
这个作者很懒,什么都没留下…
展开
-
1010 Radix@PTA甲级
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 number and 110 is a binary number.Now for any pa...原创 2018-09-03 17:48:57 · 261 阅读 · 0 评论 -
1051 Pop Sequence@PTA
Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, ..., N and pop randomly. You are supposed to tell if a given sequence of numbers is a possible pop sequence of ...原创 2018-10-23 17:18:48 · 184 阅读 · 0 评论 -
1043 Is It a Binary Search Tree@PTA
A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys less than the node's key. The right s...原创 2018-10-23 10:25:45 · 152 阅读 · 0 评论 -
1039 Course List for Student @PTA
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-10-17 19:11:01 · 100 阅读 · 0 评论 -
1025 PAT Ranking@PTA
先sort,再处理。final_rank和local_rank都是要根据前一个人的成绩得出,所以我们要额外定义记录前一个人成绩的变量;成绩相同,rank相同,反之,用已经计入排名的人数更新rank。#include <iostream>#include <cstdio>#include <cstring>#include <string&g...原创 2018-10-10 19:09:04 · 154 阅读 · 0 评论 -
1033 To Fill or Not to Fill @PTA
With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is limited, we have to find gas stations on the way from time to time. Different g...原创 2018-10-16 20:12:38 · 145 阅读 · 0 评论 -
1021 Deepest Root@PTA
A graph which is connected and acyclic can be considered a tree. The hight 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 ...原创 2018-10-10 11:33:40 · 144 阅读 · 0 评论 -
1020 Tree Traversals@PTA
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 co...原创 2018-10-09 19:44:22 · 143 阅读 · 0 评论 -
1017 Queueing at Bank@PTA
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 l...原创 2018-10-08 20:43:49 · 144 阅读 · 0 评论 -
1054 The Dominant Color@PTA
Behind the scenes in the computer's memory, color is always talked about as a series of 24 bits of information for each pixel. In an image, the color with the largest proportional area is called the ...原创 2018-10-23 19:36:24 · 99 阅读 · 0 评论