Difference between revisions of "CCPC-Wannafly Winter Camp Day2 (Div 1)"
Jump to navigation
Jump to search
Xiejiadong (talk | contribs) |
Xiejiadong (talk | contribs) |
||
Line 49: | Line 49: | ||
== Problem K == | == Problem K == | ||
− | + | Solved. | |
+ | |||
+ | 这题目也太卡常了。 | ||
+ | |||
+ | 题意:$12$根火柴,分成四组,最多能有给足可以构成三角形。 | ||
+ | |||
+ | 题解:直接暴力,TLE。我们只能先把所有的集合情况预处理出来。 | ||
+ | |||
+ | 处理的方法是,用$12$的阶乘,默认$3$个$3$个分组,为了保证不重不漏,要求$3$个内部有序,而且每组的第一个有序,即$a[k]<a[k+1]<a[k+2](k\equiv 0(mod\; 3))$而且$a[1]<a[4]<a[7]<a[10]$。 | ||
+ | |||
+ | 然后每一组数据,都是根据预处理出来的集合情况来枚举所有火柴的分组情况。 | ||
+ | |||
+ | 这样的时间复杂度正好贴着时限。 | ||
== Problem L == | == Problem L == | ||
Unsolved. | Unsolved. |
Revision as of 02:59, 4 February 2019
CCPC-Wannafly Winter Camp Day2 (Div 1)
Problem A
Unsolved.
Problem B
Unsolved.
Problem C
Unsolved.
Problem D
Unsolved.
Problem E
Unsolved.
Problem F
Unsolved.
Problem G
Unsolved.
Problem H
Solved.
温暖的签到题。
题意:给出$n$个互不相交的球,求出每个球与大球交集的体积之和。
题解:对于每个球,只需要保存半径和距离大球的距离。可以通过积分求出交集部分体积公式,特判并求和即可。
Problem I
Unsolved.
Problem J
Unsolved.
Problem K
Solved.
这题目也太卡常了。
题意:$12$根火柴,分成四组,最多能有给足可以构成三角形。
题解:直接暴力,TLE。我们只能先把所有的集合情况预处理出来。
处理的方法是,用$12$的阶乘,默认$3$个$3$个分组,为了保证不重不漏,要求$3$个内部有序,而且每组的第一个有序,即$a[k]<a[k+1]<a[k+2](k\equiv 0(mod\; 3))$而且$a[1]<a[4]<a[7]<a[10]$。
然后每一组数据,都是根据预处理出来的集合情况来枚举所有火柴的分组情况。
这样的时间复杂度正好贴着时限。
Problem L
Unsolved.