自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4)
  • 收藏
  • 关注

原创 PAT甲级1068 Find More Coins (30分)(简单解法:贪心+哈希表+堆栈)

PAT甲级1068 Find More Coins (30分)(贪心+哈希表+堆栈)题目描述样例Sample Input 1:8 95 9 8 7 2 3 4 1Sample Output 1:1 3 5Sample Input 2:4 87 2 4 3Sample Output 2:No Solution解题思路1、由于要输出尽可能小的序列(如果序列存在),所以使用贪心的思路每步尽可能多的选取小面值硬币。2、题目中说明需支付的金额不超过100, 因此只需利用哈希表统计面额不

2020-11-26 17:51:51 188

原创 PAT甲级1064 Complete Binary Search Tree (30分)题解+AC代码

PAT甲级1064 Complete Binary Search Tree (30分)题解+AC代码题目描述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 subt

2020-11-26 15:52:39 78

原创 PAT甲级 1043 Is It a Binary Search Tree (25分) (不建树的解法)

PAT甲级 1043 Is It a Binary Search Tree (25分) (不建树的解法)题目描述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 su

2020-11-22 07:16:46 219

原创 PAT甲级 P1071 Speech Patterns(25分)题目详解,附AC代码

PAT 甲级 1071 Speech Patterns(25分) 1071 Speech Patterns (25分)People often have a preference among synonyms of the same word. For example, some may prefer “the police”, while others may prefer “the cops”. Analyzing such pa.

2020-11-19 10:47:21 140

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除