Difference between revisions of "2018 CCPC Jilin Onsite Contest"
Jump to navigation
Jump to search
Xiejiadong (talk | contribs) (Created page with "== Problem A == Solved by Weaver_zhu. 00:07:11 (+) == Problem B == Solved by Xiejiadong. 00:45:37 (+2) 题意:要求在四个城市之间完成时区转换计算。 题...") |
Xiejiadong (talk | contribs) |
||
Line 35: | Line 35: | ||
== Problem H == | == Problem H == | ||
− | + | Upsolved by Xiejiadong. (-3) | |
+ | |||
+ | 题意:要求支持两个操作: | ||
+ | |||
+ | * 对于区间 $[l,r]$ 所有的数 $s_i$ 变成 $xs_ix$ ; | ||
+ | |||
+ | * 询问一个区间的和。 | ||
+ | |||
+ | 题解: | ||
+ | |||
+ | 如果当前区间的答案是 $sum$ ,现在对区间整体进行操作 $1$ ,此时代价变成 | ||
+ | |||
+ | $xs_lx+xs_{l+1}x+\cdots xs_rx\\ | ||
+ | =$ | ||
+ | |||
+ | 用线段树维护这些操作,为了快速的 Pushdown ,需要下列信息: | ||
+ | |||
+ | * tagl 当前区间左边需要一起加上的数 | ||
+ | * tagr 当前区间右边需要一起加上的数 | ||
+ | * taglen 当前区间左/右边需要加上的数的长度 | ||
+ | * sum 当前区间的和 | ||
+ | * sumlen | ||
== Problem I == | == Problem I == |
Revision as of 05:21, 26 September 2019
Problem A
Solved by Weaver_zhu. 00:07:11 (+)
Problem B
Solved by Xiejiadong. 00:45:37 (+2)
题意:要求在四个城市之间完成时区转换计算。
题解:注意 `12:00 AM` 表示的是凌晨一点就能做了。
if 有一个地方没写 else 于是 zbl 好久。
Problem C
Solved by Weaver_zhu. 00:43:55 (+)
Problem D
Solved by Kilo_5723. 00:28:20 (+)
Problem E
Upsolved by Kilo_5723. 02:13:13 (+)
Problem F
Solved by Weaver_zhu. 01:04:38 (+)
Problem G
Solved Kilo_5723. 04:50:07 (+1)
Problem H
Upsolved by Xiejiadong. (-3)
题意:要求支持两个操作:
- 对于区间 $[l,r]$ 所有的数 $s_i$ 变成 $xs_ix$ ;
- 询问一个区间的和。
题解:
如果当前区间的答案是 $sum$ ,现在对区间整体进行操作 $1$ ,此时代价变成
$xs_lx+xs_{l+1}x+\cdots xs_rx\\ =$
用线段树维护这些操作,为了快速的 Pushdown ,需要下列信息:
- tagl 当前区间左边需要一起加上的数
- tagr 当前区间右边需要一起加上的数
- taglen 当前区间左/右边需要加上的数的长度
- sum 当前区间的和
- sumlen
Problem I
Solved by Weaver_zhu. 01:52:36 (+)
Problem J
Unsolved.
Problem K
Unsolved.
Problem L
Unsolved.