
PAT刷题
Kylincommander
这个作者很懒,什么都没留下…
展开
-
分块思想与计数排序
p465原创 2020-04-27 21:46:30 · 194 阅读 · 0 评论 -
PAT 甲 1057 Stack(30分) 分块思想与树形数组
一、题目描述tack is one of the most fundamental data structures, which is based on the principle of Last In First Out (LIFO). The basic operations include Push (inserting an element onto the top position) ...原创 2020-03-30 09:46:19 · 143 阅读 · 0 评论 -
PAT甲 1064 Complete Binary Tree(30)
一、指针实现这题拿到手想都不想直接采用了指针实现的二叉树进行递归求解。但实际上却忽略了完全二叉树可以采用静态数组来实现的特点,代码量大大加大。在第二部分附上简便做法。#include<cstdio>#include<vector>#include<algorithm>#include<queue>#include<cmath>...原创 2020-03-19 18:56:40 · 97 阅读 · 0 评论 -
PAT 甲级 1103 Integer Factorization (30分) 动态规划解法 (附DFS解法参考代码)
一、题目描述The K−P factorization of a positive integer N is to write N as the sum of the P-th power of K positive integers. You are supposed to write a program to find the K−P factorization of N for any p...原创 2020-03-17 11:20:19 · 219 阅读 · 0 评论 -
类C PAT甲乙刷题常见问题总结
一,数据类型范围 int 占4B 补码表示的范围为 [-2^31,2^31-1] (约为-2*10^9~2*10^9这个量级) 大于int 范围考虑使用unsigne int 或 long long //输入输出格式为%lld 常见10^10这个范围的两个数相加减就可能超过int这个范围。二,scanf printf输入输出 1. printf 输出字符串的问题 prin...原创 2020-02-15 11:08:22 · 214 阅读 · 0 评论