发表评论取消回复
相关阅读
相关 PAT (Advanced Level) Practice 1117 Eddington Number (25分)
解题思路简单,哪怕暴力解都不会超时。但是有个坑,他自己题目没说清楚。 原题是:"Eddington number", E -- that is, the maximum i
相关 PAT (Advanced Level) Practice 1085 Perfect Sequence
最后一个测试点过不了,是因为m\p可能超过了int的范围,导致判断条件出错,所以将数据类型改成longlong就好了。 include <iostream>
相关 PAT (Advanced Level) Practice 1051 Pop Sequence
思路:遍历每个序列,遍历时维护一个值maxn(已遍历过的数中的最大数),maxn初始值为0。 对于每个数字 i: 1、若 i 大于maxn,则往栈中push 【maxn
相关 【PAT (Advanced Level) Practice】1051 Pop Sequence (25 分)
1051 Pop Sequence (25 分) Given a stack which can keep M numbers at most. Push N number
相关 【PAT (Advanced Level) Practice】1037 Magic Coupon (25 分)
题意: 给出两个集合,从这两个集合里面选出数量相同的元素进行一对一相乘,求能够得到的最大乘积之和。 题解: 对每个集合,将正数和负数分开考虑,将每个集合里的整数从大到小排
相关 【PAT (Advanced Level) Practice】1093 Count PAT‘s (25 分)
1093 Count PAT’s (25 分) The string APPAPT contains two PAT’s as substrings. The first
相关 【PAT (Advanced Level) Practice】1083 List Grades (25 分)
1083 List Grades (25 分) Given a list of N student records with name, ID and grade. You
相关 【PAT (Advanced Level) Practice】PAT (Advanced Level) Practice
1006 Sign In and Sign Out (25 分) At the beginning of every day, the first person who s
相关 1051. Pop Sequence (25)
Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3,
相关 (PAT) 1051 Pop Sequence
Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3,
还没有评论,来说两句吧...