Difference between revisions of "CCPC-Wannafly Winter Camp Day1 (Div 1)"
Jump to navigation
Jump to search
Xiejiadong (talk | contribs) |
Xiejiadong (talk | contribs) |
||
Line 29: | Line 29: | ||
== Problem F == | == Problem F == | ||
− | + | solved. | |
+ | |||
+ | 签到 | ||
+ | |||
+ | 题意:爬山,一开始在1号山上,体力为k。每上升1m减少一点体力,下降1m增加一点体力。给出每个山的高度和它们之间的路径,可以减少山的高度,减少l花费l*l。总代价为路径长度和减少山高度的花费,求1到n的最少花费。 | ||
+ | |||
+ | 思路:显然体力和山的高度的和不变,所以体力根本不大需要关注。如果到点k体力不够就减少高度使得体力刚好够到k,这个花费应该加到终点为k的边的长度上。剩下的就是最短路了。 | ||
== Problem G == | == Problem G == |
Revision as of 08:31, 28 January 2019
CCPC-Wannafly Winter Camp Day1 (Div 1)
Problem A
Unsolved.
Problem B
Unsolved.
Problem C
solved.
温暖的签到
题意:给两个long long范围之内的数$A, B$,求一种拆分使得$\sum_{i=1}^{n}{a_i}=A,\sum_{i=1}^{n}{b_i}=B,gcd(a_i,b_i)=1$如果有多个输出n最小的一个
思路:随机就完事了。。特判完$n=1$就随机划分成两个数直到找到解为止,不可能无解
Problem D
Unsolved.
Problem E
Unsolved.
Problem F
solved.
签到
题意:爬山,一开始在1号山上,体力为k。每上升1m减少一点体力,下降1m增加一点体力。给出每个山的高度和它们之间的路径,可以减少山的高度,减少l花费l*l。总代价为路径长度和减少山高度的花费,求1到n的最少花费。
思路:显然体力和山的高度的和不变,所以体力根本不大需要关注。如果到点k体力不够就减少高度使得体力刚好够到k,这个花费应该加到终点为k的边的长度上。剩下的就是最短路了。
Problem G
Unsolved.
Problem H
Unsolved.
Problem I
Unsolved.
Problem J
Unsolved.
Problem K
Unsolved.