![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PAT甲级
文章平均质量分 85
linjiayina
hello world!
展开
-
PAT甲级——搜索总结
1004 Counting Leaves (30 分)题目大意给出一棵树,问每一层各有多少个叶子结点。方法一:bfs#include<bits/stdc++.h>using namespace std;int n, m, k, mx, cnt[105], mp[105];vector<int> v[105];queue<int> q;void bfs(){ q.push(1); while(!q.empty()){ int p = q.fro原创 2021-02-26 19:27:19 · 321 阅读 · 0 评论 -
PAT甲级——最短路总结
1004 Counting Leaves (30 分)题目大意给出一棵树,问每一层各有多少个叶子结点。方法一:bfs#include<bits/stdc++.h>using namespace std;int n, m, k, mx, cnt[105], mp[105];vector<int> v[105];queue<int> q;void bfs(){ q.push(1); while(!q.empty()){ int p = q.fro原创 2021-02-25 14:05:04 · 288 阅读 · 0 评论 -
PAT甲级——1001 A+B Format (20分)
PAT甲级——1001 A+B Format (20分)Calculate a+b and output the sum in standard format – that is, the digits must be separated into groups of three by commas (unless there are less than four digits).Input Specification:Each input file contains one test case. E原创 2020-08-06 19:32:03 · 120 阅读 · 0 评论