![](https://img-blog.csdnimg.cn/20200125232416157.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
PAT
PAT甲级练习题
一只略略怪
很懒,就不介绍了
展开
-
【C++】PAT甲级 1012 The Best Rank
难受.jpg #include <iostream> #include <algorithm> using namespace std; class Node { public: int id, best, sub, grades[4], rank[4]; Node() { id=0;best=0;sub=0; for(int i=0; i<4...原创 2020-02-11 19:31:00 · 122 阅读 · 0 评论 -
【C++】PAT甲级 1019 General Palindromic Number
要点主要是转化进制。 #include <iostream> #include <stack> using namespace std; int main() { int n, b; cin>>n>>b; //转化数制 stack<int> MyStack; while(n) { MyStack...原创 2020-02-09 22:14:52 · 131 阅读 · 0 评论 -
【C++】PAT甲级 1006 Sign In and Sign Out
总体来讲思路就是把时间转为秒然后排序来确定是谁 #include <iostream> #include <map> #include <string.h> #include <algorithm> using namespace std; map<int, string> the_in; map<int, string&...原创 2020-02-09 19:19:00 · 120 阅读 · 0 评论 -
【C++】PAT甲级 1004 Counting Leaves
v[i]的size为0说明它没有子节点。 #include <iostream> #include <vector> #include <algorithm> using namespace std; vector<int> v[100]; int book[100], maxdepth = -1; void dfs(int index...原创 2020-02-08 14:01:41 · 126 阅读 · 0 评论 -
【C++】PAT甲级 1023 Have Fun with Numbers
PS:多出来的一位拼在前面即可 #include <iostream> #include <string.h> using namespace std; int book[10];//全零说明数字出现一样 bool flag = true; int main() { char num[20]; cin>>num; int numlen = st...原创 2020-02-08 13:56:55 · 163 阅读 · 0 评论 -
【C++】PAT甲级题目实现
为了记录我在准备PAT甲级的练习,特开此页。 在练习的过程中吸收了大量博主的经验,特别是大神柳婼:https://blog.csdn.net/liuchuo。 但是由于代码风格的不同,我在学习他们的想法的同时也在努力形成自己的C++代码风格。 题号 名字 链接 1004 Counting Leaves https://blog.csdn.net/weixin_42...原创 2020-02-08 13:54:38 · 180 阅读 · 0 评论