摘要: 题目描述 Description trs喜欢滑雪。他来到了一个滑雪场,这个滑雪场是一个矩形,为了简便,我们用r行c列的矩阵来表示每块地形。为了得到更快的速度,滑行的路线必须向下倾斜。 例如样例中的那个矩形,可以从某个点滑向上下左右四个相邻的点之一。例如24-17-16-... 阅读全文
posted @ 2016-03-26 08:10 Loi_Vampire 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Description Welcome to the Hungary Games! The streets of Budapest form a twisted network of one-way streets. 欢迎来到匈牙利游戏!布达佩斯(匈牙利首都... 阅读全文
posted @ 2016-03-26 06:26 Loi_Vampire 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Description Alice和Bob现在要乘飞机旅行,他们选择了一家相对便宜的航空公司。该航空公司一共在n个城市设有业务,设这些城市分别标记为0到n-1,一共有m种航线,每种航线连接两个城市,并且航线有一定的价格。Alice和Bob现在要从一个城市沿着航线到达另一个... 阅读全文
posted @ 2016-03-24 21:22 Loi_Vampire 阅读(119) 评论(0) 推荐(0) 编辑
摘要: #include#include#includeusing namespace std;const int MAXN = 110000;struct Edge{ int f, t, d;}es[MAXN];int n, m, fa[MAXN];int find(int x){... 阅读全文
posted @ 2016-03-23 21:43 Loi_Vampire 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Description 小S 想要从某地出发去同学k的家中参加一个party,但要有去有回。他想让所用的时间尽量的短。但他又想知道从不同的点出发,来回的最短时间中最长的时间是多少,这个任务就交给了你 输入描述 Input Description 第一行三... 阅读全文
posted @ 2016-03-23 20:15 Loi_Vampire 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 屠龙宝刀点击就送 题目描述 Description 在一个神奇的小镇上有着一个特别的电车网络,它由一些路口和轨道组成,每个路口都连接着若干个轨道,每个轨道都通向一个路口(不排除有的观光轨道转一圈后返回路口的可能)。在每个路口,都有一个开关决定着出去的轨道,每个开关都有一个默认... 阅读全文
posted @ 2016-03-21 11:47 Loi_Vampire 阅读(103) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#includeusing namespace std;const int MAXN = 5000, MAXE = 21474836;struct Edge{ int from, to, cost;}es[MAXN q; vo... 阅读全文
posted @ 2016-03-20 21:31 Loi_Vampire 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 屠龙宝刀点击就送 题目描述 Description YYX家门前的街上有N(2 OOXX -> OXOO -> 询问1~3 -> OOXX -> 询问1~4线段树裸题, 代码↓#include#includeusing namespace std;typedef long ... 阅读全文
posted @ 2016-03-19 06:30 Loi_Vampire 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 各位神犇,这里是lwyz的蒟蒻李传越的博客,目前高二。欢迎各位前来交流(打脸)。 阅读全文
posted @ 2016-03-18 20:39 Loi_Vampire 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 啊哈!第一篇文章~屠龙宝刀点击就送树状数组 ↓#include#includeusing namespace std;const int MAXN = 100010;int n, num[MAXN], c[MAXN];void add(int loc, int value){ ... 阅读全文
posted @ 2016-03-18 19:51 Loi_Vampire 阅读(132) 评论(0) 推荐(0) 编辑