2013-2014 Petrozavodsk Winter Training Camp, Saratov SU Contest

From EOJ Wiki
Revision as of 11:08, 14 February 2019 by Kblack (talk | contribs) (→‎Problem F)
Jump to navigation Jump to search

Problem A

Unsolved.

Problem B

Solved by kblack, translated by zerol. 03:51 (+)


题意:双倍汉诺塔,规定最后同大小饼的顺序。

题解:正常移动一堆需要两倍正常汉诺塔的时间,而且会导致移动的最下两个饼反向,多消耗一些操作可以修正,但小一号的饼会反向,往上逐层处理,注意特判最顶上的情况。

zerol: 没我啥事,就打了个暴力。

Problem C

Solved by ultmaster. 01:16 (+)

Problem D

Unsolved.

Problem E

Solved by zerol. 00:32 (+)

题意:给若干个字符串,要求两两配对,使得每一对的最长公共前缀的长度和最大。

题解:全部插入一棵 trie,如果某个结点有超过两个字符串,就两两一对用掉,如果剩下一个的话就丢给父节点。

Problem F

Solved by kblack. 01:33 (+)

题意:一堆点,可以对 $x = y$ 对称变换,要求变换后按横坐标是不降且纵坐标不升。

题解:先全部折到对称轴上方,然后从左上找一条符合要求的序列,剩下的再找一条,如果还剩那就完蛋了,两条的尾巴判断一下,如果两个可以共存那就构造好了,否则本来也是要完蛋的。

Problem G

Unsolved.

Problem H

Unsolved.

Problem I

Unsolved.

Problem J

Solved by kblack. 00:54 (+)

Problem K

Solved by ultmaster. 03:59 (+1)