首页 > TAG信息列表 > 甲级

pat甲级考试+pat1051+1056

同上一篇博客; 贪心题目我已经刷了将近30道了,由于那几天考驾照就没写,以后有空的时候补过来吧,都在codeblock里 pat的题也刷了点,acwing 的题也刷了点,基本都攒下了。以后也会慢慢补过来的 这几天都在备战四级,上午司机下午算法,有点忙不过来就一直没写博客,今天打完比赛就想趁热写一下吧,

PAT甲级刷题日记(三)

1031 Hello World for U Mon Jun 13 10:45 Link 20分 #include <iostream> #include <cstdio> #include <cstdlib> #include <algorithm> #include <string> #include <string.h> #include <vector> using namespace std; string s;

PAT甲级刷题日记(二)

1020 Tree Traversals Thu Jun 9 18:19 Link 25分 AC代码: #include <iostream> #include <cstdio> #include <cstdlib> #include <algorithm> #include <string> #include <string.h> #include <vector> #include <queue> usin

PAT甲级1004

代码参考漂流瓶大佬,以下是原文链接。[PAT甲级 1004.Counting Leaves (30) 题目翻译与答案]先传代码,明天再修改。(https://blog.csdn.net/qq278672818/article/details/54915636) #include <iostream> #include <algorithm> using namespace std; struct Node { int father;

PAT 甲级题解

PAT 甲级 1001 A+B Format PAT 甲级 1002 A+B for Polynomials PAT 甲级 1003 Emergency DFS PAT 甲级 1004 Counting Leaves PAT 甲级 1005 Spell It Right 模拟 字符串 PAT 甲级 1006 Sign In and Sign Out 字符串 PAT 甲级 1007 Maximum Subsequence Sum dp PAT 甲级 1008 Elev

PAT甲级2020秋季

PAT甲级2020秋季 //01 #include <iostream> #include <set> #include <algorithm> #include <vector> #include <unordered_map> #include <cmath> #include <cstring> using namespace std; int n, m, k; int lw[10009]; int milkl

PAT甲级2020冬季

PAT甲级2019春季 // 02 #include<iostream> #include<algorithm> #include<set> #include<unordered_map> #include<queue> #include<cstring> #include<vector> using namespace std; int n, m, k, cnt = 0; string str, tar; int m

PAT甲级1021

简单地说一下今天写这道题的感受吧. \(①\) \(:\) 审题时主观地默认了样例中的 \(1\) 是根,导致样例没看懂. \(②\) \(:\) 求连通块个数的时候只想到并查集,其实用 \(dfs\) 标记更好. \(③\) \(:\) 出现了fa[x] = x 的情况,其实是fa[x] == x ,查错了好久. \(④\) \(:\) 认为第一遍

2021PAT甲级秋季考试题解

7-1Arrays and Linked Lists #include<bits/stdc++.h> using namespace std; const int N = 1e4+10; struct L{ int address; int len; }link[N]; int sum[N]; int main() { int n,k; int total = 0; cin >> n >> k; for(int i =

【PAT甲级复习】 专题复习九:数学相关

文章目录 专题复习十(9.11):入门模拟与算法初步1 日期处理2 进制转换3 排序4 散列5 快速幂6 归并排序7 快速排序 专题复习十(9.11):入门模拟与算法初步 1 日期处理 主要注意平年闰年 int month[13][2] = { //第二维为0表示平年,为1表示闰年 {0,0},{31,31},{28,29},{31,31}

2021.9.12周六PAT甲级考试复盘与总结

周六PAT甲级考试复盘与总结 先说结论:仍未步入“高手”行列;现在的学习节奏与方法是对的,有十万分的必要坚持下去。 题目 知识点 分数 T1 前缀和、二分 11 / 20 T2 排序 25 / 25 T3 图论 17 / 25 T4 二叉树(根据中序遍历建树) 30 / 30 总分 // 83 / 100 题目很简单,总

2021.9.11周六PAT甲级考试复盘与总结

周六PAT甲级考试复盘与总结 先说结论:仍未步入“高手”行列;现在的学习节奏与方法是对的,有十万分的必要坚持下去。 题目知识点分数T1前缀和、二分11 / 20T2排序25 / 25T3图论17 / 25T4二叉树(根据中序遍历建树)30 / 30总分//83 / 100 题目很简单,总体来讲极其可惜: T1 和 T3 考试时

2021年9月(甲级)秋季PAT考试

2021.9.12号,终于考完了。92分,已经超出了我自己的预期成绩了,很开心。(弱弱的说,我考试前做PAT前几年的仿真模拟卷都没有上70的,最高60多分,虽然说这次应该算是这几年以来最简单的一次了吧,所以说考试前其实我是没啥信心的QAQ,可能对于大佬来说92仅此而已,但是对我来说是莫大的惊喜了,开始没

pat2021年秋季甲级题解

温馨提示:由于刚刚考完,我没弄到题目,之后有题目后再附上题目,这次先附上代码吧。本次代码使用c++来写 7-1:开数组,找地址,统计已开数组 #include<bits/stdc++.h> using namespace std; #pragma warning(disable:4996) int n,k; int arr[10001]; unordered_map<int, int> mp; int main

PAT 甲级 2016年秋季

1 PAT 甲级 1116 Come on! Let’s C #include <bits/stdc++.h> using namespace std; map<int,string> mp; bool is_prime[10010]; void Init(){ fill(is_prime,is_prime+10010,true); is_prime[0]=is_prime[1]=false; for(int i=2;i<10010;++i){

PAT 甲级 树(二)

PAT 甲级 树(二) 二叉搜索树最后两层节点数量题目思想自己的代码y总的代码 前序和后序遍历题目思想自己的代码y总的代码 Z字形遍历二叉树题目思想自己的代码y总的代码 后序遍历题目思想自己的代码y总的代码 AVL树的根题目思想自己的代码y总的代码 判断完全AVL树题目代码 判断

PAT甲级1042

solution #include <iostream> #include <algorithm> using namespace std; const int N = 55, M = 1000010; int a[N], b[M], c[N]; void solve(int x, int y) { swap(a[x], a[y]); } int main() { for (int i = 1; i < N; i++) a[i] = i;

PAT甲级1030

solution #include <iostream> #include <vector> #include <cstring> #include <algorithm> using namespace std; const int N = 510; vector<int> pre[N]; int vis[N]; int map[510][510], dis[510], money[510][510]; int n, m, s, d; cons

2019年冬季PAT甲级7-3

忘了当时怎么做了。。。 #include <bits/stdc++.h> using namespace std; int G[250][250]; vector<vector<int>> v; int main() { fill (G[0], G[0] + 250 * 250, 0); int n, m, a, b, k, len, now; scanf ("%d %d", &n, &m); v.resize(n + 1)

PAT甲级1022

solution #include <iostream> #include <cstring> #include <map> #include <set> using namespace std; map<string, set<int>> title, author, key, pub, year; void query(map<string, set<int>> &m, string &st

PAT甲级1012

solution #include <iostream> #include <cstring> #include <algorithm> using namespace std; const int N = 2010; int vis[1000010]; struct node { int id; int score[4], rank[4], best; } stu[N]; int flag = -1; bool cmp1(node x, node y

PAT甲级1004

#include <iostream> #include <algorithm> #include <vector> using namespace std; const int N = 110; int depth, maxdepth; int root[N]; vector<int> vec[N]; void dfs(int idx, int depth) { if (vec[idx].size() == 0) { max

PAT刷题经验(1),看此一遍文章就够了!

  目录 PAT乙级和甲级是什么 考PAT对学习 | 考研 | 工作的作用是什么   刷PAT乙级和甲级需要掌握哪些知识  关于PAT刷题中编程语言选择和开发环境IDE选择的⼀些愚见   PAT乙级和甲级是什么   和其他算法竞赛考试⽐起来,知道 PAT 的⼈确实不多~所以我在这⾥简单介绍⼀下~

算法训练:pat甲级训练(三道基础题)

第一题:1005 Spell It Right (20分) 我的AC代码:算法使用的是映射,难度:简单题 #include <iostream> #include <string> #include <stack> using namespace std; const int maxn = 105; int main() { char* Val = new char[maxn] {'\0'}; string Map[10] = { &q

PAT【甲级】1160

题目链接:PAT【甲级】1160 题目简述::给出两个数,问将它们写成保留N位小数的科学计数法后是否相等。如果相等,输出YES, 输出他们的科学记数法表示方法。如果不相等输出NO,分别输出他们的科学计数表示。 #include<bits/stdc++.h> using namespace std; string factory(string s, int