发表评论取消回复
相关阅读
相关 PAT(甲级)1118 Birds in Forest (25point(s))
题目题目链接思路题目大意:在同一张照片里的鸟属于一个树,所以用并查集就可以做了;至于鸟的数量,可以通过set去重存储;代码#include <iostream>...
相关 PAT(甲级)1021 Deepest Root (25point(s))
题目题目链接思路题目大意:给一张图,这个图有点特殊,没有环且边数等于节点数-1,即是一棵树;每个节点都可能是根节点,要求是输出那些作为根节点时树的深度最大的节点;首先要判...
相关 PAT(甲级)1047 Student List for Course (25point(s))
题目题目链接思路题目大意:给出每个人所选的科目,要求按科目输出选择的人有哪些;先来分析一下,我们肯定需要为每个科目开一个数组,存储有哪些人选择了这个科目,但有个问题,名字...
相关 PAT(甲级)1024 Palindromic Number (25point(s))
题目题目链接思路题目大意:判断一个字符串是不是回文串,如果不是可以翻转后相加在判断是不是回文串;本质是大数相加问题,大数相加需要先把数字翻转一下,将个位数字放到数组的第0...
相关 PAT(甲级)1078 Hashing (25point(s))
题目题目链接思路先判断原题hash位置有没有被占用,如果被占用,就进行二次平方探查;代码#include <iostream>#include <str...
相关 PAT(甲级)1101 Quick Sort (25point(s))
题目题目链接思路题目大意:判断一个数字是否大于他左边的任何数字且小于他右边的任何数字;先把每个数字左边的最大值和右边的最小值统计出来,分别用left 和 right 数组...
相关 PAT 甲级 1044 Shopping in Mars (25 分)
044 Shopping in Mars (25 分) Shopping in Mars is quite a different experience. The Ma...
相关 1118. Birds in Forest (25)
Some scientists took pictures of thousands of birds in a forest. Assume that all the bir
相关 (PAT 1118) Birds in Forest (并查集)
Some scientists took pictures of thousands of birds in a forest. Assume that all the bir
相关 1118 Birds in Forest (25 分) 并查集
Some scientists took pictures of thousands of birds in a forest. Assume that all the bir
还没有评论,来说两句吧...