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

From EOJ Wiki
Jump to navigation Jump to search
(Created page with "== Problem A == Solved by zerol. 02:10 (+) == Problem C == Upsolved by zerol. == Problem D == Upsolved by ultmaster. == Problem E == Solved by kblack. 00:28 (+) == Pro...")
 
Line 18: Line 18:
  
 
Solved by ultmaster. 01:08 (+5)
 
Solved by ultmaster. 01:08 (+5)
 +
 +
题意:你在键盘上打字,偶尔还会按按退格键。每次操作之后,问你最少需要敲几次键盘,才能使得给定串中的至少一个作为你当前串的后缀出现。
 +
 +
题解:大概就是建个 AC 自动机,然后反向 BFS 求距离。用个栈维护一下当前状态。
 +
 +
一开始 BFS 写错了。WA1。
 +
 +
改好了 BFS。WA2。
 +
 +
发现其实 0 的边也要加入。遂修复。WA3。通过数据 40%。
 +
 +
突然发现是出现串。我的算法只能判后缀。然后改改改。WA4。40% 变成了 0%。
 +
 +
发现有个地方还是写错了。WA5。20%?
 +
 +
开始怀疑人生,刚才的 40% 呢。。。。咦?难道?AC 之后报了个警。题意遂修改。
  
 
== Problem H ==
 
== Problem H ==
  
 
Solved by kblack. 01:10 (+)
 
Solved by kblack. 01:10 (+)

Revision as of 12:23, 16 August 2018

Problem A

Solved by zerol. 02:10 (+)

Problem C

Upsolved by zerol.

Problem D

Upsolved by ultmaster.

Problem E

Solved by kblack. 00:28 (+)

Problem F

Solved by ultmaster. 01:08 (+5)

题意:你在键盘上打字,偶尔还会按按退格键。每次操作之后,问你最少需要敲几次键盘,才能使得给定串中的至少一个作为你当前串的后缀出现。

题解:大概就是建个 AC 自动机,然后反向 BFS 求距离。用个栈维护一下当前状态。

一开始 BFS 写错了。WA1。

改好了 BFS。WA2。

发现其实 0 的边也要加入。遂修复。WA3。通过数据 40%。

突然发现是出现串。我的算法只能判后缀。然后改改改。WA4。40% 变成了 0%。

发现有个地方还是写错了。WA5。20%?

开始怀疑人生,刚才的 40% 呢。。。。咦?难道?AC 之后报了个警。题意遂修改。

Problem H

Solved by kblack. 01:10 (+)