PAT甲级1100——1155题总结】的更多相关文章

刷题链接:https://www.patest.cn/contests/pat-a-practise 1001 #include <iostream> #include <stdio.h> using namespace std; ]; int main() { int a,b,sum,index; while(scanf("%d%d",&a,&b)!=EOF){ sum=a+b; ){ printf("-"); sum=-s…
Dijkstra PAT (Advanced Level) Practice Dijkstra 相关题 目录 <算法笔记>重点摘要 1003 Emergency (25) <算法笔记> 10.4.1 Dijkstra 重点摘要 对任意给出的图 G(V,E) 和 起点 S,终点 T,求 S 到 T 的最短路径 1. 简介 解决单源最短路问题 只能处理所有边权均非负的情况 若出现负数,最好使用 SPFA 算法 2. 邻接矩阵 const int MAXV = 1000; const i…
散列 PAT (Advanced Level) Practice 散列题 目录 <算法笔记> 重点摘要 1002 A+B for Polynomials (25) 1009 Product of Polynomials (25) 1084 Broken Keyboard (20) 1092 To Buy or Not to Buy (20) 1116 Come on! Let's C (20) 1121 Damn Single (25) <算法笔记> 4.2 散列 重点摘要 1.…
二叉树 PAT (Advanced Level) Practice 二叉树 相关题 目录 <算法笔记> 重点摘要 1020 Tree Traversals (25) 1086 Tree Traversals Again (25) 1102 Invert a Binary Tree (25) 1119 Pre- and Post-order Traversals (30) 1127 ZigZagging on a Tree (30) 1138 Postorder Traversal (25) 1…
二叉查找树 PAT (Advanced Level) Practice 二叉查找树 相关题 目录 <算法笔记> 重点摘要 1099 Build A Binary Search Tree (30) 1115 Counting Nodes in a BST (30) 1143 Lowest Common Ancestor (30) <算法笔记> 9.4 二叉查找树 重点摘要 二叉查找树静态实现 ⭐ (1) 定义 struct Node{ typename data; int level…
本文同步发布在CSDN:https://blog.csdn.net/weixin_44385565/article/details/90678474 1100 Mars Numbers (20 分)   People on Mars count their numbers with base 13: Zero on Earth is called "tret" on Mars. The numbers 1 to 12 on Earth is called "jan, feb,…
字符串处理题 目录 <算法笔记> 重点摘要 1001 A+B Format (20) 1005 Spell It Right (20) 1108 Finding Average (20) 1132 Cut Integer (20) 1140 Look-and-say Sequence <算法笔记> 3.6 字符串处理 重点摘要 注意分析输入输出格式 注意细节和边界情况 1001 A+B Format (20) #include<iostream> using names…
堆 目录 <算法笔记>重点摘要 1147 Heaps (30) 1155 Heap Paths (30) <算法笔记> 9.7 堆 重点摘要 1. 定义 堆是完全二叉树,树中每个结点的值不小于(或不大于)其左右子结点的值,称之为大顶堆(或小顶堆) const int maxn = 100; int heap[maxn], n = 10; // heap 为堆,n 为元素个数 2. 向下调整 // 对 heap 数组在 [low,high] 范围进行向下调整 // 其中 low 为欲…
图 PAT (Advanced Level) Practice 用到图的存储方式,但没有用到图的算法的题目 目录 1122 Hamiltonian Cycle (25) 1126 Eulerian Path (25) 1134 Vertex Cover (25) 1142 Maximal Clique (25) 1154 Vertex Coloring (25) 1122 Hamiltonian Cycle (25) 题目思路 用 n != queryV.size() 检查是否 query 覆盖…