pat
文章平均质量分 89
douglaslee01
这个作者很懒,什么都没留下…
展开
-
pat1045
1045. Favorite Color Stripe (30)时间限制200 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueEva is trying to make her own color stripe out of a given one. She would like to keep only her favorite colors...原创 2018-03-06 20:13:39 · 167 阅读 · 0 评论 -
与树相关的pat题目
1.1020:1020. Tree Traversals (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueSuppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder tr...原创 2018-03-14 12:59:26 · 306 阅读 · 0 评论 -
pat1043 数组实现
1043. Is It a Binary Search Tree (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The...原创 2018-03-05 15:39:20 · 171 阅读 · 0 评论 -
pat1038
这一问就是要将找出各个字符串如何组合才能使得组成的数字最小;首先我的思路是:关键在于如何寻找任何两个字符串的排列方式,写成一个cmp的bool类型函数,然后用sort,将其排序,然后将所有的字符串相连接成一个较长的字符串,最后输出来,注意去掉前面的0;在写cmp函数时,我的思路是:从前到后比较两个字符串的每一位,找到第一位不同的时候就返回这位数字的大小比较,如果直到一个字符串结束时都全部一样,...原创 2018-03-03 23:00:14 · 193 阅读 · 0 评论 -
pat中关于并查集的题目&&以及类似dfs解法
点击打开链接:https://www.patest.cn/contests/pat-a-practise/1013并查集:主要是find和union函数:void unionn(int a,int b){ int x=find(a); int y=find(b); if(x!=y){ pre[x]=y; } }int find(int k){ ...原创 2018-03-17 12:05:57 · 203 阅读 · 0 评论 -
pat中有关于排队模拟的问题
1017. Queueing at Bank (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueSuppose a bank has K windows open for service. There is a yellow line in front of the windows which devides the wai...原创 2018-03-15 09:39:16 · 376 阅读 · 0 评论 -
PAT1068
1068. Find More Coins (30)时间限制150 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueEva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a...原创 2018-04-18 09:49:57 · 264 阅读 · 0 评论