自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

qq_34946324的博客

算法练习

  • 博客(19)
  • 收藏
  • 关注

原创 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 121

原创 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 123

原创 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 125

原创 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 96

原创 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 150

原创 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 131

原创 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 133

原创 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 104

原创 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 184

原创 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 166

原创 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 1281

原创 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 104

原创 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 149

原创 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 &lt...

2019-02-22 11:47:11 183

原创 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 106

原创 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 164

原创 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 183

原创 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 172

原创 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 124

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除