PAT-甲级-题解目录

甲级题目目录

编号题目分数类型日期
1004Counting Leaves30树的遍历→保存每层叶子节点数19-07-18
1053Path of Equal Weight30 19-07-24
1079Total Sales of Supply Chain25 19-07-25
1086Tree Traversals Again25 19-07-26
1090Highest Price in Supply Chain25 19-07-26
1094The Largest Generation25 19-07-26
1102Invert a Binary Tree25 19-07-26
1106Lowest Price in Supply Chain25 19-07-26
1115Counting Nodes in a BST30二叉搜索树19-07-27
1043Is It a Binary Search Tree25(*) 随机序列 → 建立BST二叉搜索树19-07-27
1064Complete Binary Search Tree 30 19-07-27
1099Build A Binary Search Tree30二叉搜索树19-07-28
1110Complete Binary Tree25(*) BFSBST完全二叉树19-07-29
1020Tree Traversals25(*) 后序+中序→层序19-08-02
1127ZigZagging on a Tree30(*) 中序+后序层序19-07-29
1130Infix Expression25(*) 中序+dfs→中缀表达式19-07-29
1138 Postorder Traversal25(*) 前序+中序后序19-07-29
1143Lowest Common Ancestor30(*) BST中找LCA19-07-30
1151LCA in a Binary Tree30(*) 中序+先序中找LCA19-07-30
1066Root of AVL Tree25(*) AVL平衡二叉树的模板19-07-31
1123Is It a Complete AVL Tree 30AVL+BFS+BST的判断 
1135Is It A Red-Black Tree30二叉搜索树+计算二叉树的高度 
1147Heaps30(*) CBT完全二叉树+层序堆的判断 
1155Heap Paths30(*) CBT完全二叉树的路径 
------------------------图相关题目---------------------------------------------------------------------------------
1018Public Bike Management30<#> 双标尺(边权+点权)→最短路径dijkstra+dfs19-08-03
1030Travel Plan30<#> 双标尺(边权+边权)→最短路径dijkstra+dfs19-08-04
1087All Roads Lead to Rome30<#> 双标尺(边权+点权)→最短路径dijkstra+dfs19-08-04
1111Online Map30<#> 两次Dijkstra+dfs19-08-05
1131Subway Map30<#> 图的最短路径 
1013Battle Over Cities25<#> 计算图的连通分量19-08-05
1021Deepest Root25  
1003Emergency25<#> Dijkstra 
1034Head of a Gang30<#> 计算连通分量+找子图中边权最大点 
1072Gas Station30<#> 多源最短路径dijkstra 
1076Forwards on Weibo30<#> 图的遍历→BFS 
1122Hamiltonian Cycle25<#> 图判断路径→哈密顿回路 
1126Eulerian Path25<#> 图判断路径→欧拉路径
1114Family Property25<#> 并查集 
1118Birds in Forest25<#> 并查集 
     

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

编号题目分值类型ACday
1001A+B Format20字符串7.16
1002A+B for Polynomials25map的应用7.16
1003Emergency25最短路径、Dijkstra的应用7.18
1004Counting Leaves 30vector建树+DFS深搜7.19
1005Spell It Right20字符串7.16
1006Sign In and Sign Out25map的应用7.17
1007Maximum Subsequence Sum25最大子序列7.17
1008Elevator20模拟题7.19
1009Product of Polynomials25数学模拟7.19
1010Radix25进制转换、二分法7.20
1013Battle Over Cities25图论-计算连通分量7.20

 

 

 

 

 

 

 

 

 

 

 

 

 

 

解题常用空白模板

#include <iostream>
#include <cstring>
#include <sstream>
#include <algorithm>
#include <map>
#include <cmath>
#include <set>
#include <vector>
#include <queue>
#include <stack>
using namespace std;

#define rep(i,j,k) for(int i=j;i<k;i++)

void read(){
    freopen("in.txt","r",stdin);
    freopen("out.txt","w",stdout);
}
int main(){
    read();
    std::ios::sync_with_stdio(false);
    return 0;
}

 

 

 


  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值