- 博客(22)
- 收藏
- 关注
原创 A ZJH and Monkeys 第十四届华中科技大学程序设计竞赛
链接:https://www.nowcoder.com/acm/contest/106/A来源:牛客网It’s universally acknowledged that there’re innumerable trees in the campus of HUST. One day, zjh is wandering in the campus,and he finds a t...
2018-04-29 18:09:39 361
原创 Gym - 101755F F. Tree Restoration
F. Tree Restorationtime limit per test2.0 smemory limit per test256 MBinputstandard inputoutputstandard outputThere is a tree of n vertices. For each vertex a list of all its successors is known (not ...
2018-04-28 22:23:16 340
原创 hdu 5927 ( 思维 + 树 )
Auxiliary SetTime Limit: 9000/4500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2254 Accepted Submission(s): 652Problem DescriptionGiven a rooted tree with n ve...
2018-04-28 20:03:13 181
原创 线段树+矩阵 zoj 3772
Calculate the FunctionTime Limit: 2 Seconds Memory Limit: 65536 KBYou are given a list of numbers A1 A2 .. AN and M queries. For the i-th query:The query has two parameters Li and Ri.The query wi...
2018-04-27 09:56:35 270
原创 zoj 3781 dfs缩点+ bfs 找最优解
Paint the Grid ReloadedTime Limit: 2 Seconds Memory Limit: 65536 KBLeo has a grid with N rows and M columns. All cells are painted with either black or white initially.Two cells A and B are calle...
2018-04-27 09:50:16 305
原创 多段决策问题 hdu 2059 zoj 2967
据说在很久很久以前,可怜的兔子经历了人生中最大的打击——赛跑输给乌龟后,心中郁闷,发誓要报仇雪恨,于是躲进了杭州下沙某农业园卧薪尝胆潜心修炼,终于练成了绝技,能够毫不休息得以恒定的速度(VR m/s)一直跑。兔子一直想找机会好好得教训一下乌龟,以雪前耻。 最近正值HDU举办50周年校庆,社会各大名流齐聚下沙,兔子也趁此机会向乌龟发起挑战。虽然乌龟深知获胜希望不大,不过迫于舆论压力,只能接受挑战。 ...
2018-04-18 22:32:37 166
原创 ZOJ - 2967 栈 计算几何
Colorful RainbowsTime Limit: 2 Seconds Memory Limit: 65536 KBEvelyn likes drawing very much. Today, she draws lots of rainbows on white paper of infinite size, each using a different color. Since...
2018-04-18 21:12:37 809
原创 poj 2117 判断删除一个点后的最大联通分支个数
ElectricityTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 6019 Accepted: 1919DescriptionBlackouts and Dark Nights (also known as ACM++) is a company that provides electricity. The company o...
2018-04-17 16:17:38 217
原创 fzu 2218 Simple String Problem 状压dp
Problem 2218 Simple String ProblemAccept: 250 Submit: 580Time Limit: 2000 mSec Memory Limit : 32768 KB Problem DescriptionRecently, you have found your interest in string theory. Here is an inte...
2018-04-15 20:27:53 165
原创 fzu 2216
Problem 2216 The Longest StraightAccept: 497 Submit: 1546Time Limit: 1000 mSec Memory Limit : 32768 KB Problem DescriptionZB is playing a card game where the goal is to make straights. Each car...
2018-04-15 20:12:55 155
原创 fzu 2219 很好的二分题呀
Problem 2219 StarCraftAccept: 278 Submit: 798Time Limit: 1000 mSec Memory Limit : 32768 KB Problem DescriptionZB loves playing StarCraft and he likes Zerg most!One day, when ZB was playing SC2,...
2018-04-15 17:05:14 210
原创 fzu 2273 几何学
Problem 2273 TrianglesAccept: 207 Submit: 701Time Limit: 1000 mSec Memory Limit : 262144 KB Problem DescriptionThis is a simple problem. Given two triangles A and B, you should determine they ar...
2018-04-11 22:01:08 219
原创 hdu 5512 博弈(数学)
PagodasTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2604 Accepted Submission(s): 1760Problem Descriptionn pagodas were standing erect in H...
2018-04-11 21:38:21 197
原创 hdu 5361 最短路+并查集优化
In TouchTime Limit: 8000/4000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 2878 Accepted Submission(s): 761Problem DescriptionThere are n soda living in a str...
2018-04-11 21:24:52 206
原创 zoj 2770 ( 差分约束 spfa )
It is well known that, in the period of The Three Empires, Liu Bei, the emperor of the Shu Empire, was defeated by Lu Xun, a general of the Wu Empire. The defeat was due to Liu Bei's wrong decision th...
2018-04-11 20:19:13 352
原创 hdu 4704 (费马小定理 )
传送门题意: 给你一个数n 你要找出他的最大 组成方案 就比如 3 那么一个数的时候 只有3 两个数的时候就有 1 2 和 2 1 两种三个数的时候就有 1 1 1 一种 , 那么找一下规律就是 n 的种类数就是2 的n-1 次方。数论基础: 费马小定理。a^(p-1) %p=1 注意 p 是素数!!!费马小定理的公式 ,我们知道 1e9+7 是一个...
2018-04-11 19:44:55 230
原创 Gym - 100269D(最短路 spfa,边权不固定的最短路 )
传送vj 传送这是一个很好的 最短路的问题 。 很好。题意: 给你n 个商品 m 中换法 a,b,c a可以用 b 或者c 来换 当然 也可以花钱买。 问你 想要得到1的最小花费。思路: 其实如果抽象一下 就是一个 边权 可以改变的最短路问题。 既然 c 和 b 可以换来a 那么如果我们知道 c和b 的花费比 a 的花费小的话 , 那么我们就可以 用b 和 c...
2018-04-11 19:17:11 577
原创 hdu 5438 Ponds 拓扑排序 + 并查集
PondsTime Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 5247 Accepted Submission(s): 1454Problem DescriptionBetty owns a lot of ponds, some of...
2018-04-11 19:04:22 252 2
原创 codefrcces 520c 思维
C. DNA Alignmenttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya became interested in bioinformatics. He's going to write an article about si...
2018-04-11 18:52:37 292
原创 poj 2777 Count Color
Count ColorTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 49183 Accepted: 14845DescriptionChosen Problem Solving and Program design as an optional course, you are required to solve all kind...
2018-04-02 22:23:24 96
原创 poj 3667 Hotel(线段树 区间合并 区间更新 )
HotelTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 18953 Accepted: 8254DescriptionThe cows are journeying north to Thunder Bay in Canada to gain cultural enrichment and enjoy a vacation on...
2018-04-02 22:13:53 168
原创 codeforces Riverside Curio
C. Riverside Curiotime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputArkady decides to observe a river for n consecutive days. The river's water level...
2018-04-02 18:35:53 284
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人