2 寻余

尚未进行身份认证

我要认证

暂无相关简介

等级
TA的排名 3w+

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, which gives in one line the two rational numbers i

2020-06-08 03:11:00

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 integer N (≤100), followed in the ne

2020-06-07 21:05:59

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 Algrbra), and E - English. At the mean time, we en

2020-05-26 13:19:11

1027 Colors in Mars (20分) 思路分析+测试点分析

文章目录题目题目大意分析测试点分析codecode1code2题目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 digits for Green, and th

2020-05-24 11:13:53

1031 Hello World for U (20分)

文章目录题目题目大意思路分析总结题目Given any string of N (≥5) characters, you are asked to form the characters into the shape of U. For example, helloworld can be printed as:h de ll rlowoThat is, the characters must be printed in the original order, star

2020-05-21 16:51:00

1046 Shortest Distance (20分)思路分析+测试点分析

文章目录题目题目大意分析代码总结题目The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair of exits.Input Specification:Each input file contains one test case. For each case, the

2020-05-20 22:19:07

1042 Shuffling Machine (20分) 思路分析

文章目录题目题目大意分析代码反思题目Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid “inside jobs” where employees collaborate with gamblers by performing inadequate shuffles,

2020-05-20 20:36:23

2020.5.10

文章目录今天解决了一个困扰我很久的1082,具体的写法见今天的博客。然后写了三个查找元素的题,没什么难度。最后写了一个模拟多项式相加的题,注意控制格式和只有非0的情况才输-出。。。今天写的都是开头的第一,第二个题,不难。感觉自己进度挺慢,心里难免有些焦灼o(╥﹏╥)o...

2020-05-10 19:44:37

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 Bai si Shi wu Wan liu Qian qi Bai ba Sh

2020-05-10 14:52:25

2020.5.7

今天刷pat写了几个简单的数学问题的题,难度不大1008 这个题没啥难的,只是注意一下,如果要到达的楼层就是当前楼层,是需要停留5秒的!1049 暴力解法会超时,这里需要用到是的左右数分离这个数学模型。其规律为:此处参考了1049 Counting Ones (30 分)数学建模——左右数分离...

2020-05-07 05:36:04

2020.5.6

今天开始二刷PAT今天从9.50写了几个字符串处理的题,难度小,属于pat第一个题。1001 注意的是字符串的位置,有些傻傻分不清,举了一个例才明白数量关系。1035 注意输出时单复数形式。。1061 坑点在于字符串根据大写输出时,注意分别对应的范围,一定要注意!...

2020-05-06 00:59:55

PAT 图的遍历总结

文章目录定义分类基本实现DFSBFS典型例题定义从图中的某个顶点出发访问遍图中的所有顶点,并且每个顶点仅仅被访问一次。分类♦ DFS♦ BFS基本实现DFSBFS典型例题DFS:1013 Battle Over Cities (25分)1034 Head of a Gang (30分)DFS+并查集1021 Deepest Root (25分)BFS:1076 For...

2020-05-02 04:30:31

1076 Forwards on Weibo (30分) BFS

文章目录问题解决方法题目大意解题思路BFS模板问题1076 Forwards on Weibo (30分)Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. Hence a so...

2020-05-02 03:54:10

PAT 甲级并查集总结

文章目录定义基本操作具体实现代码模板实战例题定义并查集(Disjoint-Set)是一种可以动态维护若干个不重叠的集合,并支持合并与查询两种操作的一种数据结构。基本操作init():初始化Union(int x,int y):合并两个元素findfather(int x):v找元素的所属集合具体实现我们建立一个数组father[]表示一个并查集,father[i]表示i的父节点。...

2020-05-01 13:28:31

1118 Birds in Forest (25分)

文章目录问题解决方法问题Some scientists took pictures of thousands of birds in a forest. Assume that all the birds appear in the same picture belong to the same tree. You are supposed to help the scientists to ...

2020-05-01 13:26:15

1021 Deepest Root (25分)

文章目录题目解决方法题目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...

2020-05-01 13:21:07

1107 Social Clusters (30分)

文章目录问题解决方法题目大意解决方法后记问题When register on a social network, you are always asked to specify your hobbies in order to find some potential friends with the same hobbies. A social cluster is a set of peop...

2020-05-01 11:41:48

1034 Head of a Gang (30分)DFS+并查集

文章目录解决方法题目大意解题方法DFS并查集后记One way that the police finds the head of a gang is to check people’s phone calls. If there is a phone call between A and B, we say that A and B is related. The weight of a re...

2020-04-30 11:29:08

1013 Battle Over Cities (25分)

文章目录问题解决方法题目大意dfs并查集问题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 kn...

2020-04-28 21:19:30

1040 Longest Symmetric String (25分)

文章目录问题解决方法题目大意思路暴力解法马拉车问题Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, given Is PAT&TAP symmetric?, the longest symmetric sub-string is ...

2020-04-25 17:13:15

查看更多

勋章 我的勋章
  • 持之以恒
    持之以恒
    授予每个自然月内发布4篇或4篇以上原创或翻译IT博文的用户。不积跬步无以至千里,不积小流无以成江海,程序人生的精彩需要坚持不懈地积累!
  • 勤写标兵Lv4
    勤写标兵Lv4
    授予每个自然周发布9篇以上(包括9篇)原创IT博文的用户。本勋章将于次周周三上午根据用户上周的博文发布情况由系统自动颁发。