- 博客(9)
- 收藏
- 关注
转载 !!! 博客已搬家 !!!!
http://hypexer.rf.gd/?i=1 转载于:https://www.cnblogs.com/Kvar-ispw17/p/8463797.html
2018-02-23 23:03:00
134
转载 [ NOIP ] SJZEZ五月小测笔记
树 【问题描述】 读入一颗 n个点的带权树,求 1. 直径长度。(距离最远的两点) 直径长度。(距离最远的两点) 2. 若删去任意一个点,原树会分裂成些连通块。求数最多的大小的最值。 3. 读入 Q个询问,每包括 (x,y) (x,y) ,表示查询从 ,表示查询从 x到 y路径上点权的最大值。【输入格式】 输入文件 tree.in。 ...
2017-05-16 20:25:00
123
转载 [ POJ ][ 高斯消元 ] 1222 EXTENDED LIGHTS OUT
EXTENDED LIGHTS OUT Time Limit:1000MS Memory Limit:10000K Total Submissions:10354 Accepted:6667 Description In an extended version of the game Lights Out, is a...
2017-04-27 20:38:00
164
转载 [ NOIP ][ NOIP_2014D1T3 ][ 动态规划 ] 飞扬的小鸟
飞扬的小鸟(Flappy Bird) 描述 Flappy Bird 是一款风靡一时的休闲手机游戏。玩家需要不断控制点击手机屏幕的频率来调节小鸟的飞行高度,让小鸟顺利通过画面右方的管道缝隙。如果小鸟一不小心撞到了水管或者掉在地上的话,便宣告失败。 为了简化问题,我们对游戏规则进行了简化和改编: 游戏界面是一个长为 n,高为 m 的二维平面,其中有k 个管道(忽略管道...
2017-04-27 20:05:00
133
转载 [ NOIP ][ LCA ] 倍增算法求最近公共祖先(LCA)
核心: pre[i][j] 为节点 i 向上2的j次方处的祖先。 pre[i][j] = pre[pre[i][j-1]][j-1] #include <bits\stdc++.h> const int maxn = 10000 + 10; using namespace std; int pre[maxn][50], n, root, dis[max...
2017-04-26 22:01:00
98
转载 [ POJ ][ 树形DP ] 2342 Anniversary party
Anniversary party Time Limit:1000MS Memory Limit:65536K Total Submissions:8261 Accepted:4742 Description There is going to be a party to celebrate the 80-th ...
2017-04-26 13:18:00
127
转载 [ POJ ][ 树HASH ] 1635 Subway tree systems
首先,对于一个树,我们可以有一种压缩表示: 0010011101001011 其中 0 表示向下走,1 表示向上走。于是: 00100111|01|001011 对于每一段的 0 1 出现次数相同,这种hash方法叫树的最小表示法。 1635 题目精简大意:给你n对01字符串,判断每一对儿表示的是不是同一个树,方法: 1.定义 cnt, start, end ...
2017-03-18 21:54:00
87
转载 [ CODEVS ][ MANACHER回文 ] 1568 奶牛回文
裸Manacher算法题,开一个rank[i]记录映射关系。 #include<cstdio> #include<iostream> #include<cstring> #include<cctype> #include<algorithm> #include<iterator> const ...
2017-03-18 16:43:00
89
转载 [ NOIP ] Maximum Xor Sum Problem
QUESTION Given n integers {a1, a2, ..., an}, n ≤ 100, 000. Select some, s.t. they have the maximum xor sum. For random numbers like 19, 44, 9, 33, they could be made into lines like: ...
2017-03-05 00:11:00
143
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人