
图论
文章平均质量分 56
CatDsy
一只慵懒的喵
展开
-
Codeforces Round #408 /Mcvi Round #8 C Bank Hacking
题目大意: n家银行有n-1条网线相连,最初第i家银行的实力为a[i],且所有银行都在线。如果i和j有一条网线直接相连,则相邻;若i和k相邻,k和j相邻,则称i和j次相邻。当银行被攻击后,立即断线,与其相邻、次相邻的银行实力加1。现在Inzane开始他hack所有银行的计划,他选择hack的银行,需要满足3个条件:这家银行仍在线;它的相邻银行已经被hack;自己的实力需不低于银行实力。问:Inza原创 2017-05-19 23:09:59 · 319 阅读 · 0 评论 -
HDU1531(差分约束)
King Once, in one kingdom, there was a queen and that queen was expecting a baby. The queen prayed: “If my child was a son and if only he was a sound king.” After nine months her child was born, a...原创 2018-07-31 09:15:45 · 284 阅读 · 0 评论 -
HDU 3666 (差分约束)
Probelm You have been given a matrix C N*M, each element E of C N*M is positive and no more than 1000, The problem is that if there exist N numbers a1, a2, … an and M numbers b1, b2, …, bm, which ...原创 2018-07-31 09:45:41 · 378 阅读 · 0 评论 -
Biridian Forest(BFS)
题目链接:[http://codeforces.com/problemset/problem/329/B]分析:其它的训练师都是坏人,想和你打架,如果你是他们,你会怎么做? 肯定是在必经之路等着,可是必经之路有很多,他们没有瞬移能力,但是有一个位置你必然要到达,就是出口,所以他们只要在出口等你就好了。 也就是说,只要能在你之前或与你同时到达的训练师,都会和你发生战斗。 以终点开始...原创 2018-08-11 15:36:10 · 405 阅读 · 0 评论 -
HDU3592 World Exhibition
problem Nowadays, many people want to go to Shanghai to visit the World Exhibition. So there are always a lot of people who are standing along a straight line waiting for entering. Assume that the...原创 2018-07-30 10:40:46 · 322 阅读 · 0 评论 -
HDU 1384 Intervals(差分约束)
problem You are given n closed, integer intervals [ai, bi] and n integers c1, …, cn. Write a program that: reads the number of intervals, their endpoints and integers c1, …, cn from the st...原创 2018-07-30 10:14:38 · 291 阅读 · 0 评论