10
7
2015
1

CF289 Div2 F. Progress Monitoring

F. Progress Monitoring
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Programming teacher Dmitry Olegovich is going to propose the following task for one of his tests for students:

You are given a tree T with n vertices, specified by its adjacency matrix a[1... n, 1... n]. What is the output of the following pseudocode?

Category: codeforces | Tags:
10
7
2015
0

3073: [Pa2011]Journeys

3073: [Pa2011]Journeys

Time Limit: 20 Sec  Memory Limit: 128 MB
Submit: 32  Solved: 17
[Submit][Status][Discuss]

Description

 
 
Seter建造了一个很大的星球,他准备建造N个国家和无数双向道路。N个国家很快建造好了,用1..N编号,但是他发现道路实在太多了,他要一条条建简直是不可能的!于是他以如下方式建造道路:(a,b),(c,d)表示,对于任意两个国家x,y,如果a<=x<=b,c<=y<=d,那么在xy之间建造一条道路。Seter保证一条道路不会修建两次,也保证不会有一个国家与自己之间有道路。
Seter好不容易建好了所有道路,他现在在位于P号的首都。Seter想知道P号国家到任意一个国家最少需要经过几条道路。当然,Seter保证P号国家能到任意一个国家。
 
 

	
注意:可能有重边

Category: BZOJ题解 | Tags:
9
29
2015
0

【9月】一条高一狗的颓废日记

    终于从新高一变成真正的高一新生感觉还是有一点小小的激动。。

    接下来就要过一中OI选手的生活了(野花:我们是一群特立独行的人)。。整天泡在机房里。。。然而才刚几天就感觉文化课无力。。果真是我太弱了吗。。

    感觉接下来就没有空闲的时间。。题目做的心烦了就来写写博客,记录一天中的事情。。也算是一种倾诉吧

Category: 杂文 | Tags:
9
29
2015
0

4151: [AMPPZ2014]The Cave

4151: [AMPPZ2014]The Cave

Time Limit: 5 Sec  Memory Limit: 256 MBSec  Special Judge
Submit: 101  Solved: 45
[Submit][Status][Discuss]

Description

给定一棵有n个节点的树,相邻两点之间的距离为1。
请找到一个点x,使其满足所有m条限制,其中第i条限制为dist(x,a[i])+dist(x,b[i])<=d[i]。
 

 

Category: BZOJ题解 | Tags:
9
29
2015
0

4149: [AMPPZ2014]Global Warming

4149: [AMPPZ2014]Global Warming

Time Limit: 20 Sec  Memory Limit: 256 MB
Submit: 112  Solved: 38
[Submit][Status][Discuss]

Description

给定一个序列a[1],a[2],...,a[n]。请从中选出一段连续子序列,使得该区间最小值唯一、最大值也唯一。
输出选出的子序列的长度的最大值以及取到最大值时左端点的最小值。
 

 

Category: BZOJ题解 | Tags:
9
28
2015
0

4144: [AMPPZ2014]Petrol

4144: [AMPPZ2014]Petrol

Time Limit: 10 Sec  Memory Limit: 256 MB
Submit: 266  Solved: 99
[Submit][Status][Discuss]

Description

给定一个n个点、m条边的带权无向图,其中有s个点是加油站。
每辆车都有一个油量上限b,即每次行走距离不能超过b,但在加油站可以补满。
q次询问,每次给出x,y,b,表示出发点是x,终点是y,油量上限为b,且保证x点和y点都是加油站,请回答能否从x走到y。
 

 

Category: BZOJ题解 | Tags:
9
28
2015
0

4145: [AMPPZ2014]The Prices

4145: [AMPPZ2014]The Prices

Time Limit: 20 Sec  Memory Limit: 256 MB
Submit: 175  Solved: 117
[Submit][Status][Discuss]

Description

你要购买m种物品各一件,一共有n家商店,你到第i家商店的路费为d[i],在第i家商店购买第j种物品的费用为c[i][j],
求最小总费用。
 
 
 

 

Category: BZOJ题解 | Tags:
9
28
2015
0

4152: [AMPPZ2014]The Captain

4152: [AMPPZ2014]The Captain

Time Limit: 20 Sec  Memory Limit: 256 MB
Submit: 342  Solved: 128
[Submit][Status][Discuss]

Description

给定平面上的n个点,定义(x1,y1)到(x2,y2)的费用为min(|x1-x2|,|y1-y2|),求从1号点走到n号点的最小费用。

 

Category: BZOJ题解 | Tags:
9
27
2015
0

4143: [AMPPZ2014]The Lawyer

4143: [AMPPZ2014]The Lawyer

Time Limit: 10 Sec  Memory Limit: 256 MBSec  Special Judge
Submit: 345  Solved: 189
[Submit][Status][Discuss]

Description

Byteasar要制订m天的会议计划,一共有n场会议,第i场会议开始于第d[i]天的第a[i]秒,结束于第d[i]天的第b[i]秒。
对于每一天,请找出这一天的两场会议i,j,使得它们不冲突,即不存在一个数k同时满足a[i]<=k<=b[i]以及a[j]<=k<=b[j]。
 

 

Category: BZOJ题解 | Tags:
9
25
2015
4

4260: Codechef REBXOR

4260: Codechef REBXOR

Time Limit: 10 Sec  Memory Limit: 256 MB
Submit: 89  Solved: 36
[Submit][Status][Discuss]

Description

 

Category: BZOJ题解 | Tags:

Host by is-Programmer.com | Power by Chito 1.3.3 beta | Theme: Aeros 2.0 by TheBuckmaker.com