摘要:
【题目背景】 小奇飞船的钻头开启了无限耐久+精准采集模式!这次它要将原矿运到泛光之源的矿石交易市场,以便为飞船升级无限非概率引擎。 【问题描述】 现在有m+1个星球,从左到右标号为0到m,小奇最初在0号星球。 有n处矿体,第i处矿体有ai单位原矿,在第bi个星球上。 由于飞船使用的是老式的跳跃引擎, 阅读全文
摘要:
A straight dirt road connects two fields on FJ's farm, but it changes elevation more than FJ would like. His cows do not mind climbing up or down a si 阅读全文
摘要:
Bessie is such a hard-working cow. In fact, she is so focused on maximizing her productivity that she decides to schedule her next N (1 ≤ N ≤ 1,000,00 阅读全文
摘要:
题目描述 Farmer John wants to set up a telephone line at his farm. Unfortunately, the phone company is uncooperative, so he needs to pay for some of the c 阅读全文
摘要:
Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea 阅读全文
摘要:
题目链接:https://vjudge.net/problem/UVA-1416 题解: 这是一个最短路的好题,首先我们考虑如果暴力弗洛伊德,显然时间复杂度不对,如果做n次spfa好像复杂度也不对,所以考虑优化这个暴力。 我们考虑对于一个单源最短路,只有改变了最短路树中的某条边,才需要重新做一次最短 阅读全文
摘要:
Description C 国有 n 个大城市和 m 条道路,每条道路连接这 n 个城市中的某两个城市。任意两个城市之间最多只有一条道路直接相连。这 m 条道路中有一部分为单向通行的道路,一部分为双向通行的道路,双向通行的道路在统计条数时也计为 1 条。 C 国幅员辽阔,各地的资源分布情况各不相同, 阅读全文
摘要:
N (3 ≤ N ≤ 20000) ping pong players live along a west-east street(consider the street as a line segment). Each player has a unique skill rank. To impr 阅读全文
摘要:
In a small city called Iokh, a train service, Airport-Express, takes residents to the airport more quickly than other transports. There are two types 阅读全文
摘要:
Once upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem. The shores of Rellau Creek in central Loowater had always 阅读全文