2019冬季PAT甲级第二题】的更多相关文章

#define HAVE_STRUCT_TIMESPEC #include<bits/stdc++.h> using namespace std; typedef struct{ int add,data,nex; }Node; Node node[],ans[],ans2[]; map<int,int>mp; int main(){ //ios::sync_with_stdio(false); //cin.tie(NULL); //cout.tie(NULL); int s,n,…
#define HAVE_STRUCT_TIMESPEC #include<bits/stdc++.h> using namespace std; ][]; ][]; ]; string t; int main(){ ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); ;i<=;++i) ;j<=;++j) cin>>s[i][j]; cin.ignore(); getline(cin,t); ,cnt…
#define HAVE_STRUCT_TIMESPEC #include<bits/stdc++.h> using namespace std; typedef struct node{ int data; node *lchild,*rchild; }tree; ]; tree *build(int l,int r){ if(l>r) return NULL; ,pos=; for(int i=l;i<=r;++i) if(a[i]<mn) mn=a[i],pos=i;…
#define HAVE_STRUCT_TIMESPEC #include<bits/stdc++.h> using namespace std; ]; ]; ]; int main(){ ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n,m; cin>>n>>m; ;i<=m;++i){ int x,y; cin>>x>>y; v[x].insert(y);…
2019 秋季 PAT 甲级 备考总结 在 2019/9/8 的 PAT 甲级考试中拿到了满分,考试题目的C++题解记录在这里,此处对备考过程和考试情况做一个总结.如果我的方法能帮助到碰巧点进来的有缘人那就更好了Orz 目录 一.备考内容 1.  <算法笔记>(←阅读内容目录在这里) 2. PAT 题库刷题 3. 题型总结 + 刷题笔记 (←笔记目录在这里) 二.考试情况 1. 考前准备 2. 考试过程 3. 对这次考试的总结(碎碎念,可忽略) 一.备考内容 1.  <算法笔记>…
2019 秋季 PAT (Advanced Level) C++题解 考试拿到了满分但受考场状态和知识水平所限可能方法不够简洁,此处保留记录,仍需多加学习.备考总结(笔记目录)在这里 7-1 Forever (20 分) "Forever number" is a positive integer A with K digits, satisfying the following constrains: the sum of all the digits of A is m; the…
1080 Graduate Admission--PAT甲级练习题 It is said that in 2013, there were about 100 graduate schools ready to proceed over 40,000 applications in Zhejiang Province. It would help a lot if you could write a program to automate the admission procedure. Eac…
准备每天刷两题PAT真题.(一句话题解) 1001 A+B Format  模拟输出,注意格式 #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; string ans = ""; int main() { ; cin >> a >> b; c = a + b; ) {…
链表处理 PAT (Advanced Level) Practice 链表题 目录 <算法笔记> 重点摘要:静态链表 1032 Sharing (25) 1052 Linked List Sorting (25) 1097 Deduplication on a Linked List (25) 1133 Splitting A Linked List (25) 附: 动态链表 <算法笔记> 7.3 链表 重点摘要 静态链表 ⭐ (1) 定义 结构体类型名和结构体变量名尽量不同 st…
2019/4/3 1063 Set Similarity n个序列分别先放进集合里去重.在询问的时候,遍历A集合中每个数,判断下该数在B集合中是否存在,统计存在个数(分子),分母就是两个集合大小减去分子. // 1063 Set Similarity #include <set> #include <map> #include <cstdio> #include <iostream> #include <algorithm> using name…