- 博客(176)
- 收藏
- 关注
原创 Codeforces Round #576 (Div. 2) D (线段树+lazy-tag & 模拟)
D. Welfare Statetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere is a country with n citizens. The i-th of them initially has ai money. ...
2019-08-02 10:16:09
320
原创 ros/pcl 点云分割——分离地面
代码 #include <ros/ros.h>// PCL specific includes#include <sensor_msgs/PointCloud2.h>#include <pcl_conversions/pcl_conversions.h>#include <pcl/ros/conversions.h>#include ...
2018-10-18 16:25:59
3669
转载 如何在ROS中使用PCL—数据格式
原博https://www.cnblogs.com/li-yao7758258/p/6651326.html 如何在ROS中使用PCL—数据格式(1)在ROS中点云的数据类型在ROS中表示点云的数据结构有: sensor_msgs::PointCloud sensor_msgs::PointCloud2 pcl::PointCloud<T>关于PC...
2018-10-18 16:06:55
986
原创 L2-012. 关于堆的判断(数据结构)
L2-012. 关于堆的判断时间限制400 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者陈越将一系列给定数字顺序插入一个初始为空的小顶堆H[]。随后判断一系列相关命题是否为真。命题分下列几种:“x is
2018-03-16 21:02:28
707
原创 L2-011. 玩转二叉树
L2-011. 玩转二叉树时间限制400 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者陈越给定一棵二叉树的中序遍历和前序遍历,请你先将树做个镜面反转,再输出反转后的层序遍历的序列。所谓镜面反转,是指将所有非叶结点的左
2018-03-15 19:56:22
313
原创 PAT-L2-004. 这是二叉搜索树吗?(数据结构)
L2-004. 这是二叉搜索树吗?时间限制400 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者陈越一棵二叉搜索树可被递归地定义为具有下列性质的二叉树:对于任一结点,其左子树中所有结点的键值小于该结点的键值
2018-03-11 19:16:25
342
转载 Python语法第3讲:数组
原博:http://blog.youkuaiyun.com/qzc70919700/article/details/72983513###;1、数组的创建 [python] view plain copyintArr = [1, 4, 2, 5, 3, 7, 9, 0] #整型数组 strArr = ["北京", "上海", "杭州", "深圳"] #字符串数组 mixArr = [1, 3...
2018-03-10 12:01:52
544
1
原创 codeforces 893E Counting Arrays (组合数学)
E. Counting Arraystime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given two positive integer numbe
2017-12-21 11:43:17
529
原创 codeforces 900D Unusual Sequences (数论)
D. Unusual Sequencestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputCount the number of distinct sequences
2017-12-21 11:35:25
786
原创 codeforces 901B GCD of Polynomials (数论+构造)
B. GCD of Polynomialstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSuppose you have two polynomials and
2017-12-21 11:27:37
862
原创 磁盘调度算法(FCFS,SSTF,SCAN)
#includeusing namespace std;int a[2000]; //磁道位置 int n; //磁道数量 int begin; //初始位置 void init(){ srand(time(0)); n=(rand()%20)+1; // 0-1000 for(int i=0;i<n;i++) a[i]=(rand()%20)+1; //0-1000 be
2017-12-21 11:25:24
1788
原创 最佳淘汰算法(OPT) 先进先出的算法(FIFO) 最近最久未使用算法(LRU)
#include#define Del(a,b) memset(a,b,sizeof(a))using namespace std;int a[4000]; //随机生成的页 int c;//用户页面容量 void init() //生成页 { srand(time(0)); for(int i=1;i<=320;i++) { int q=rand()%317; //a
2017-12-15 02:24:50
9301
原创 银行家算法
银行家算法是用于解决死锁问题。相当于动态的模拟一个资源分配的过程,判断哪些可以运行,而后回收资源 重复上两个过程直到所有进程都能完成。这里用队列模拟,先将所有进程放进队列,当满足条件出队同时回收资源当不满足,继续入队如果在资源未更新的情况下扫到一个进程两次,那么不存在安全序列。#include#define Del(a,b) memset(a,b,size
2017-12-15 02:18:26
548
转载 例析Alpha-Beta剪枝
本文使用三子棋问题简单描述Alpha-Beta剪枝的原理。顺序是:先描述三子棋问题,接着描述三子棋问题的极小极大算法,最后描述三子棋问题的Alpha-Beta剪枝算法。对三子棋问题描述如下:下棋的一方是计算机(记为“MAX",执棋子“X”),另一方是人(记为”MIN“,执棋子“O”);机器先手,双方轮流在九宫格中落子;先取得三子一线的一方胜,可以是横向、
2017-12-06 15:46:58
2520
原创 hdu 1824 Let's go home (2-sate)
Let's go homeTime Limit: 10000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2141 Accepted Submission(s): 925Problem Description小时候,乡愁是一枚小小的
2017-11-22 15:42:21
364
原创 poj 1741 Tree (点分治)
TreeTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 24493 Accepted: 8161DescriptionGive a tree with n vertices,each edge has a length(positive integer l
2017-10-09 16:26:45
325
原创 开关灯类问题 (高斯消元)
POJ 1222EXTENDED LIGHTS OUT#include#include#includeusing namespace std;int a[35][35];int x[35];void gauss(int n,int m){ int r=0,c=0; while(r<n&&c<m) { int t=r; for(int i=r+1;
2017-10-08 22:38:53
545
原创 lca 离线模板
struct node{ int v,w; node(){} node(int vv,int ww) { v=vv;w=ww; }};struct edge{ int u,v,lca; edge(){} edge(int uu,int vv,int ll) { u=uu,v=vv,lca=ll; }};vectorG;vectorv[50000];vec
2017-10-08 22:33:54
370
原创 强联通 tarjan (模板)
struct tarjan{ const int maxn=50050; vectorv[maxn]; stackS; int dfn[maxn],low[maxn],viss[maxn]; int index,cnt; void init(int n) { for(int i=0;i<=n;i++) v[i].clear(); memset(dfn,0,sizeof(
2017-10-08 22:31:58
362
原创 树状数组 (模板)
struct szsz{ int c[maxn]; int lowbit(int x) { return x&(-x); } int getadd(int x) { int ans=0; while(x>0) { ans+=c[x]; x-=lowbit(x); } return ans; } void update(int x,int n,
2017-10-08 22:29:33
271
原创 HDU 4992 Primitive Roots (求原根)
Primitive RootsTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 949 Accepted Submission(s): 239Problem DescriptionWe say that
2017-09-22 00:23:09
560
原创 HDU - 2255 奔小康赚大钱 (KM图) (KM图模板)
奔小康赚大钱Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10674 Accepted Submission(s): 4723Problem Description传说在遥远的地方有一个非常富裕的村落
2017-09-22 00:14:10
440
原创 HDU - 4005 The war (双联通+缩点)
The warTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 2815 Accepted Submission(s): 673Problem DescriptionIn the war, the int
2017-09-22 00:04:05
468
原创 HDU - 3594 Cactus (强联通判断仙人掌树)
CactusTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2194 Accepted Submission(s): 1034Problem Description1. It is a Strongly
2017-09-21 23:56:34
492
原创 CodeForces - 219D Choosing Capital for Treeland (树型dp)
D. Choosing Capital for Treelandtime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe country Treeland consi
2017-09-21 23:35:40
383
原创 HDU 2196 Computer (树型dp/树直径)
ComputerTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 31005 Accepted Submission(s): 3895Problem DescriptionA school bought
2017-09-21 23:24:19
331
原创 HDU - 1520 Anniversary party (树dp)
Anniversary partyTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12633 Accepted Submission(s): 5100Problem DescriptionThere i
2017-09-21 10:48:00
298
原创 poj 3321 Ultra-QuickSort (树状数组)
Apple TreeTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 30850 Accepted: 9235DescriptionThere is an apple tree outside of kaka's house. Every autumn, a
2017-09-19 00:15:25
581
原创 HDU - 4348 To the moon (主席树)
To the moonTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 6186 Accepted Submission(s): 1421Problem DescriptionBackgroundTo
2017-09-01 02:26:48
486
原创 SPOJ - COT Count on a tree (树上路径第K小,树上主席树)
Count on a tree SPOJ - COT You are given a tree with N nodes.The tree nodes are numbered from 1 to N.Each node has an integer weight.We will ask you to perform the following operation:u
2017-09-01 02:14:10
589
原创 ZOJ - 3195 Design the city(倍增法求解,tarjan离线求解)
Design the cityTime Limit: 1 Second Memory Limit: 32768 KBCerror is the mayor of city HangZhou. As you may know, the traffic system of this city is so terrible, that there are traffic jam
2017-09-01 02:00:38
556
原创 HDU - 2586 How far away ?(tarjan离线做法求lca)
How far away ?Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 17653 Accepted Submission(s): 6836Problem DescriptionThere are
2017-08-28 21:53:18
470
原创 HDU 6154 CaoHaha's staff
CaoHaha's staffTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 677 Accepted Submission(s): 400Problem Description"You shall n
2017-08-21 22:36:40
327
原创 HDU-6153 A Secret (扩展KMP)
A SecretTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 256000/256000 K (Java/Others)Total Submission(s): 1855 Accepted Submission(s): 687Problem DescriptionToday is the bir
2017-08-21 22:30:55
454
原创 HDU-6152 Friend-Graph (思维+暴力)
Friend-GraphTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1274 Accepted Submission(s): 657Problem DescriptionIt is well kn
2017-08-21 22:19:27
383
原创 HDU - 3861 The King’s Problem(强联通分量+最小路径覆盖)
The King’s ProblemTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3156 Accepted Submission(s): 1111Problem DescriptionIn the
2017-08-14 03:24:41
571
原创 HDU - 3836 Equivalent Sets(强联通分量)
Equivalent SetsTime Limit: 12000/4000 MS (Java/Others) Memory Limit: 104857/104857 K (Java/Others)Total Submission(s): 4781 Accepted Submission(s): 1720Problem DescriptionTo prov
2017-08-14 01:35:43
423
原创 HDU 6106 (2017 多校训练赛6 1011)Classes
2017 Multi-University Training Contest - Team 6 1011ClassesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 0 Accepted Submission(s)
2017-08-10 17:29:42
548
原创 HDU 6105 (2017 多校训练赛6 1010)Gameia(博弈)
2017 Multi-University Training Contest - Team 6 1010GameiaTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 0 Accepted Submission(s):
2017-08-10 17:23:12
802
原创 HDU 4417 Super Mario(主席树)
Super MarioTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6955 Accepted Submission(s): 2997Problem DescriptionMario is world
2017-08-09 20:39:38
417
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人