![](https://img-blog.csdnimg.cn/20210114162300946.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
PAT训练
最近准备浙大的复试,重新再刷一遍PAT的题库
kevislin
这个作者很懒,什么都没留下…
展开
-
PAT 1013-1016 <Battle Over Cities> <Waiting in Line> <Reversible Primes> <Phone Bills>
1013 Battle Over Cities分析考察点:图的遍历、连通分支的计算基础题代码//// main.cpp// PAT-testcpp//// Created by hwl on 2021/1/15.//#include<bits/stdc++.h>using namespace std;int vis[1001] = {0};int lost_c;int n; //图中的节点数目void dfs(vector<vector<int&原创 2021-01-18 18:10:41 · 194 阅读 · 5 评论 -
PAT 1009-1012 <Product of Polynomials> <Radix> <World Cup Betting> <The Best Rank>
1009 Product of Polynomials分析基础题(模拟题),随便用什么办法,能做对就好代码//// main.cpp// PAT-testcpp//// Created by hwl on 2021/1/15.//#include<bits/stdc++.h>using namespace std;struct node{ double coef; //系数 int expo; //幂};int main(){原创 2021-01-15 15:31:49 · 99 阅读 · 0 评论 -
PAT 1005-1008 <Spell It Right> <Sign In and Sign Out> <Maximum Subsequence Sum> <Elevator>
小建议做PAT的时候每次四题 (三小时)一起做1005 Spell It Right分析基础题代码//// main.cpp// PAT-testcpp//// Created by hwl on 2021/1/14.//#include<bits/stdc++.h>using namespace std;int main(){ string mat[10]={"zero","one","two","three","four","five","six原创 2021-01-15 01:07:18 · 100 阅读 · 0 评论 -
PAT 1001-1004 <A+B Format><A+B for Polynomials ><Emergency><Counting Leaves>
1001 A+B Format分析:基础题在处理正负号问题上要注意下,可以借鉴计算机组成原理中浮点数符号的处理的思想——单独讨论符号代码:/* Author:HWL */#include<bits/stdc++.h>using namespace std;int main(){ int a,b; cin>>a>>b; int c = abs(a+b); //处理digits /* 1.转成字符串 使用string的相关函数 2.原创 2021-01-14 16:27:32 · 142 阅读 · 0 评论