Difference between revisions of "2018 Multi-University, Nowcoder Day 7"

From EOJ Wiki
Jump to navigation Jump to search
(Created page with "== Problem A == Solved by zerol. 00:22 (+) == Problem B == == Problem C == Solved by ultmaster. 02:14 (+3) == Problem D == Unsolved. (-1) == Problem E == Solved by ult...")
 
Line 8: Line 8:
  
 
Solved by ultmaster. 02:14 (+3)
 
Solved by ultmaster. 02:14 (+3)
 +
 +
题意:给一个长度为 $2^n$ 的字符串,每次用 AND, OR, XOR 中的一种操作把相邻的两个合并。求最后合并结果是 1 的操作方案数。
 +
 +
题解:暴力就好了,维护一个可选的集合,和集合中每个产生的方案数。复杂度是 $\sum_{x=0}^{18} 2^{18 - x} \cdot \min(3^x, 2^{18-x}) \approx 1.4 \times 10^7$。由于还要带上数据结构的常数 / log,可能时限很紧。需要常数优化,能少开的地方尽量少开,unordered_map 可以卡过。
  
 
== Problem D ==
 
== Problem D ==

Revision as of 12:23, 9 August 2018

Problem A

Solved by zerol. 00:22 (+)

Problem B

Problem C

Solved by ultmaster. 02:14 (+3)

题意:给一个长度为 $2^n$ 的字符串,每次用 AND, OR, XOR 中的一种操作把相邻的两个合并。求最后合并结果是 1 的操作方案数。

题解:暴力就好了,维护一个可选的集合,和集合中每个产生的方案数。复杂度是 $\sum_{x=0}^{18} 2^{18 - x} \cdot \min(3^x, 2^{18-x}) \approx 1.4 \times 10^7$。由于还要带上数据结构的常数 / log,可能时限很紧。需要常数优化,能少开的地方尽量少开,unordered_map 可以卡过。

Problem D

Unsolved. (-1)

Problem E

Solved by ultmaster. 03:07 (+1)

Problem F

Problem G

Problem H

Unsolved. (-2)

Problem I

Unsolved. (-13)

Problem J

Solved by kblack. 01:38 (+2)