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 · 182 阅读 · 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 · 90 阅读 · 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 · 88 阅读 · 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 · 132 阅读 · 0 评论