PTA
然哥的日常
这个作者很懒,什么都没留下…
展开
-
PTA A1001
//// main.cpp// test//// Created by Jacky Roth on 2019/2/22.// Copyright © 2019 Jacky Roth. All rights reserved.//#include <iostream>#include <stdio.h>#include <string.h&g...原创 2019-02-22 10:00:24 · 140 阅读 · 0 评论 -
PTA A1095 stl库的使用和排序
//// main.cpp// test 5//// Created by Jacky Roth on 2019/2/26.// Copyright © 2019 Jacky Roth. All rights reserved.//#include <iostream>#include <stdio.h>#include <math....原创 2019-02-27 16:51:43 · 197 阅读 · 0 评论 -
PTA A1098
堆排序的一趟是对堆进行建造的一趟,而不是交换堆顶和数组尾部的序列。。//// main.cpp// test 5//// Created by Jacky Roth on 2019/2/26.// Copyright © 2019 Jacky Roth. All rights reserved.//#include <iostream>#include ...原创 2019-02-27 20:15:02 · 114 阅读 · 0 评论 -
PTA A1111
丢雷。。#include <iostream>#include <stdio.h>#include <math.h>#include <string.h>#include <algorithm>#include <vector>using namespace std;const int maxn=505;...原创 2019-02-28 17:15:38 · 153 阅读 · 0 评论 -
PTA A1115
DFS(用并查集也可以做)//// main.cpp// test6//// Created by Jacky Roth on 2019/2/28.// Copyright © 2019 Jacky Roth. All rights reserved.//#include <iostream>#include <stdio.h>#inclu...原创 2019-02-28 20:07:38 · 140 阅读 · 0 评论 -
PTA A1119
用二叉树的先序和后序构造出任意一颗二叉树:判断是否唯一的条件(在构建二叉树中,若出现了一个区间为2,则不能判断该分枝上的孩子节点是左节点还是右节点,则将flag置为0)//// main.cpp// test6//// Created by Jacky Roth on 2019/2/28.// Copyright © 2019 Jacky Roth. All right...原创 2019-03-01 16:06:34 · 161 阅读 · 0 评论 -
PTA A1123
AVL模版题+判断是否是层序遍历//// main.cpp// test6//// Created by Jacky Roth on 2019/2/28.// Copyright © 2019 Jacky Roth. All rights reserved.//#include <iostream>#include <stdio.h>#inc...原创 2019-03-01 17:31:05 · 126 阅读 · 0 评论 -
PTA. A1125
优先队列或者sort一遍都能解决第一次AC://// main.cpp// A1125//// Created by Jacky Roth on 2019/2/17.// Copyright © 2019 Jacky Roth. All rights reserved.//#include <iostream>#include <st...原创 2019-03-01 19:57:36 · 138 阅读 · 0 评论 -
PTA A1127
树的层次遍历(反转那一部分用一个栈保存,等这一层输入完成后就可将栈中保存的数据输出以达到反转的效果)//// main.cpp// test6//// Created by Jacky Roth on 2019/2/28.// Copyright © 2019 Jacky Roth. All rights reserved.//#include <iostream...原创 2019-03-01 20:51:31 · 142 阅读 · 0 评论 -
PTA A1011
//// main.cpp// test//// Created by Jacky Roth on 2019/2/22.// Copyright © 2019 Jacky Roth. All rights reserved.//#include <iostream>#include <stdio.h>#include <string.h&g...原创 2019-02-22 14:47:39 · 186 阅读 · 0 评论 -
PTA A1002
//// main.cpp// test//// Created by Jacky Roth on 2019/2/22.// Copyright © 2019 Jacky Roth. All rights reserved.//#include <iostream>#include <stdio.h>#include <string.h&g...原创 2019-02-22 10:12:41 · 212 阅读 · 0 评论 -
PTA A1003
题目意思最开始看错了。。Dij+DFS//// main.cpp// test//// Created by Jacky Roth on 2019/2/22.// Copyright © 2019 Jacky Roth. All rights reserved.//#include <iostream>#include <stdio.h>...原创 2019-02-22 10:55:45 · 215 阅读 · 0 评论 -
PTA A1004
树的层序遍历://// main.cpp// test//// Created by Jacky Roth on 2019/2/22.// Copyright © 2019 Jacky Roth. All rights reserved.// #include <iostream>#include <stdio.h>#in...原创 2019-02-22 11:11:25 · 181 阅读 · 0 评论 -
PTA A1005
比read number in chinese简单的多。。//// main.cpp// test//// Created by Jacky Roth on 2019/2/22.// Copyright © 2019 Jacky Roth. All rights reserved.// #include <iostream>#includ...原创 2019-02-22 11:27:14 · 132 阅读 · 0 评论 -
PTA A1006
//// main.cpp// test//// Created by Jacky Roth on 2019/2/22.// Copyright © 2019 Jacky Roth. All rights reserved.// #include <iostream>#include <stdio.h>#include <...原创 2019-02-22 11:47:11 · 212 阅读 · 0 评论 -
PTA A1007
dp问题//// main.cpp// A1007//// Created by Jacky Roth on 2019/2/10.// Copyright © 2019 Jacky Roth. All rights reserved.// #include <iostream>#include <stdio.h>#incl...原创 2019-02-22 12:06:00 · 159 阅读 · 0 评论 -
PTA A1008
//// main.cpp// test//// Created by Jacky Roth on 2019/2/22.// Copyright © 2019 Jacky Roth. All rights reserved.//#include <iostream>#include <stdio.h>#include <string.h&g...原创 2019-02-22 12:13:59 · 117 阅读 · 0 评论 -
PTA A1009
//// main.cpp// test//// Created by Jacky Roth on 2019/2/22.// Copyright © 2019 Jacky Roth. All rights reserved.//#include <iostream>#include <stdio.h>#include <string.h&g...原创 2019-02-22 14:34:21 · 1314 阅读 · 0 评论 -
PTA A1130
set结构体中<号的重载(参考某位博主的方法完成)//// main.cpp// test6//// Created by Jacky Roth on 2019/2/28.// Copyright © 2019 Jacky Roth. All rights reserved.//#include <iostream>#include <stdi...原创 2019-03-02 08:52:41 · 153 阅读 · 0 评论