
PAT
文章平均质量分 80
Belous
这个作者很懒,什么都没留下…
展开
-
PAT : PAT (Basic Level) Practice(中文)答案(1001 ~ 1095)(纯C编写)
题目集地址报名了12月的PAT-B,先试试水。已完成:2018/10/22 — 2018/11/14更新:(2018/12/09)PAT乙级考试100分!考试代码已更新冬天坐火车跑去考试冻懵了,来年对战PAT甲级考试!目录目录题目集地址目录1001害死人不偿命的(3n+1)猜想1002写出这个数1003我要通过!1004成绩排名1...原创 2018-10-22 23:56:44 · 25080 阅读 · 11 评论 -
PAT : Data Structures and Algorithms (English)7-8 File Transfer
#include <cstring>#include <iostream>#include <string>#include <vector>using namespace std;int getdigit(void){ int digit{0}, symbol{1}; bool isp{true}; while...原创 2019-02-12 13:51:57 · 240 阅读 · 0 评论 -
PAT : 数据结构与算法题目集(中文)7-6 列出连通集
C++11:#include <iostream>#include <string>#include <array>#include <vector>#include <cstring>#include <queue>using namespace std;class graph{ private:...原创 2019-02-24 01:17:23 · 433 阅读 · 0 评论 -
PAT : 数据结构与算法题目集(中文)7-8 哈利·波特的考试
#include <iostream>#include <cstring>#include <vector>#include <queue>using namespace std;const auto INF = 0x3F3F3F3F;int getdigit(void){ int temp{0}; char ch;...原创 2019-02-28 14:16:20 · 349 阅读 · 0 评论 -
PAT : 数据结构与算法题目集(中文)7-9 旅游规划
#include <iostream>#include <cstring>#include <vector>#include <queue>using namespace std;const int INF = 0x3F3F3F3F;struct ints{ int Aim, length, cost;};int getd...原创 2019-02-28 19:31:50 · 459 阅读 · 0 评论 -
PAT : 数据结构与算法题目集(中文)7-7 六度空间
目录DFSBFS(邻接表+vector)BFS(邻接矩阵)DFS:#include <iostream>#include <vector>#include <cstring>#include <queue>#define MaxIndex 10001using namespace std;int getdigit(v...原创 2019-02-24 23:06:42 · 768 阅读 · 1 评论 -
PAT : 数据结构与算法题目集(中文)7-10 公路村村通
#include <iostream>#include <vector>#include <queue>#include <cstring>using namespace std;int UnionF[1001];struct Heapstruct{ int head, tail, value;};bool Compare...原创 2019-02-28 21:31:27 · 692 阅读 · 0 评论 -
PAT : 数据结构与算法题目集(中文)7-11 关键活动
#include <algorithm>#include <iostream>#include <queue>#include <set>#include <vector>using namespace std;using pairint = pair<int, int>;const int INF = 0x3...原创 2019-03-01 23:02:50 · 541 阅读 · 0 评论 -
PAT : Data Structures and Algorithms (English)7-10 Saving James Bond - Easy Version
#include <iostream>#include <string>#include <vector>#include <queue>using namespace std;const auto MaxIndex = 100;struct pa{ int x, y;};pa Q[MaxIndex];bool book...原创 2019-02-26 16:24:28 · 239 阅读 · 0 评论 -
PAT : PAT (Advanced Level) Practice 1154 Vertex Coloring
A proper vertex coloring is a labeling of the graph's vertices with colors such that no two vertices sharing the same edge have the same color. A coloring using at most k colors is called a (proper) k...原创 2019-02-26 19:10:06 · 315 阅读 · 0 评论 -
PAT : 团体程序设计天梯赛-练习集 L1 答案
鉴定完毕!全是水题!补::2019-03-31 :参加了昨天的天梯赛,只得了153分,队伍勉强得的国三省二…第一阶段的最后一题太难了啊啊啊啊,直接爆炸! 说好的第一阶段全是水题呐?目录L1-001Hello World(lua)L1-002打印沙漏(C)L1-003个位数统计(C)L1-004计算摄氏温度(C)L1-005考试座位号(...原创 2019-03-17 15:45:14 · 12529 阅读 · 2 评论 -
PAT : 团体程序设计天梯赛-练习集 L2 答案
2019/03/18 完成01-022019/03/19完成032019/03/20 完成042019/03/21完成05(unordered_set)2019/03/22完成05(手写哈希),062019/03/23完成07L2-001紧急救援(C++11)#include <iostream>#include <stack>#...原创 2019-03-18 21:48:21 · 2658 阅读 · 0 评论 -
PAT : 数据结构与算法题目集(中文)7-52 两个有序链表序列的交集
目录1.结构体指针构建(C ++ 11)2.结构体数组构建(C)1.结构体指针构建(C ++ 11)#include <iostream>#include <string>#include <vector>using namespace std;using Link = struct LinkNode *;struct LinkNod...原创 2019-02-12 01:18:55 · 883 阅读 · 0 评论 -
PAT : 数据结构与算法题目集(中文)7-51 两个有序链表序列的合并
目录1.结构体指针构建(C++11)2.结构体数组构建(C)1.结构体指针构建(C++11)#include <iostream>#include <string>#include <vector>using namespace std;using Link = struct LinkNode *;struct LinkNode{...原创 2019-02-11 22:24:54 · 503 阅读 · 0 评论 -
PAT : 中国大学MOOC-陈越、何钦铭-数据结构-起步能力自测题答案(自测-1 ~ 自测-5)(纯C编写)
题目地址自测-1#include<stdio.h>int main(int argc,char** argv){ int sum; char ch; scanf("%d %c",&sum,&ch); int i=1,msum=1,fk=sum-msum; while(fk>=(i+2)*2) { i+=2; msum+=2*i;...原创 2018-08-06 16:46:06 · 862 阅读 · 0 评论 -
PAT : 基础编程题目集_编程题答案(7-1 ~ 7-38)(纯C编写)
题目地址7-1#include<stdio.h>int main(int argc,char** argv){ int cm; scanf("%d",&cm); float x=cm/0.3048/100; float a=(x-(int)x)*12.0; int b=(int)x; printf("%d %d\n",b,(int)a); ...原创 2018-08-04 14:58:48 · 14160 阅读 · 3 评论 -
PAT : 基础编程题目集_函数题答案(6-1 ~ 6-13)(纯C编写)
水题使我快乐_(:зゝ∠)_半个暑假过去了,是时候刷点水题恢复一下了,哈哈哈。题目地址总结:1~9,12~13水题;10大数乘法,11希尔排序或归并排序等(除快速排序)6-1void PrintN(int N){ int x=1; while(x<=N) printf("%d\n",x++);}6-2double f( int n, d...原创 2018-07-31 23:52:43 · 6361 阅读 · 4 评论 -
PAT : 数据结构与算法题目集(中文)7-23 还原二叉树
#include <array>#include <iostream>#include <string>#include <vector>using namespace std;class BinTreeString{ public: int buildtree(int, int, int = 0, int = 0, int...原创 2019-02-21 15:42:16 · 324 阅读 · 0 评论 -
PAT : 数据结构与算法题目集(中文)7-1 最大子列和问题
经典算法,时间复杂度O(n) 。因为输入数据量庞大,读取用getchar() 函数优化。#include <math.h>#include <stdbool.h>#include <stdio.h>#include <stdlib.h>#include <string.h>int getdigit(void){ ...原创 2019-02-11 14:37:48 · 404 阅读 · 0 评论 -
PAT : 数据结构与算法题目集(中文)7-2 一元多项式的乘法与加法运算
#include <stdbool.h>#include <stdio.h>#include <stdlib.h>typedef struct linkst *linkstp;typedef struct linkst{ int n; int value; linkstp p;} linkst;int getdigi...原创 2019-02-11 14:39:39 · 572 阅读 · 0 评论 -
PAT : 数据结构与算法题目集(中文)7-3 树的同构
#include <ctype.h>#include <stdbool.h>#include <stdio.h>#include <stdlib.h>struct treenode{ char alpha; int left, right;};struct treenode tree1[11], tree2[11];...原创 2019-02-11 14:55:24 · 396 阅读 · 0 评论 -
PAT : 数据结构与算法题目集(中文)7-53 两个有序序列的中位数
深坑!题目中说的并集是两组数简简单单的一起,并不需要去重?!!去重的话最后一个测试点是过不去的。。。2333采用增序读取生成链表,输出中间值即可。#include <stdbool.h>#include <stdio.h>#include <stdlib.h>typedef struct Node *Nodep;typedef struct N...原创 2019-02-11 14:57:58 · 677 阅读 · 0 评论 -
PAT : 数据结构与算法题目集(中文)7-4 是否同一棵二叉搜索树
#include <cmath>#include <iostream>#include <string>#include <vector>using namespace std;using Tree = struct TreeNode *;struct TreeNode{ Tree Left, Right; int v...原创 2019-02-11 15:14:02 · 455 阅读 · 0 评论 -
PAT : 数据结构与算法题目集(中文)7-5 堆中的路径
#include <iostream>#include <string>#include <vector>using namespace std;using Heap = struct HeapST *;struct HeapST{ int *array; int HeapTop;};int getdigit(void){ ...原创 2019-02-11 16:07:08 · 391 阅读 · 0 评论 -
PAT : 团体程序设计天梯赛-练习集 L1-064 估值一亿的AI核心代码
这次天梯赛L1就卡住的题…情况比较复杂的模拟每日反思自己怎么这么菜...回家调了快一上午才做对。C++11:#include <cstring>#include <iostream>#include <string>#include <vector>using namespace std;bool check(const st...原创 2019-03-31 13:15:00 · 1852 阅读 · 0 评论