2017-2018 ACM-ICPC Latin American Regional Programming Contest

From EOJ Wiki
Revision as of 11:12, 10 October 2018 by Zerol (talk | contribs) (→‎Problem G)
Jump to navigation Jump to search

Problem A

Solved by kblack. 03:24 (+2)

题意:一堆高度相同(有固定平行边)的凸多边形,要求找到最好的顺序把所有多边形卡在一起最短。

题解:枚举多边形对,从下到上判断边对之间卡在一起的距离,然后状压 DP 求最短的排列,搞一个 (0, 0) 到 (0, H) 的“多边形”后面写起来会方便点。

Problem B

Solved by kblack. 00:54 (+)

题意:一个 CodeBlocks,输入元音会导致已经输入的倒置,求输入指定串的方案数。

题解:发现多余一个元音的时候上一个输入的字符都是唯一的,只有最初的元音后面的辅音是可以有多解的,找到就好。

Problem C

Solved by zerol. 00:38 (+)

Problem D

Solved by zerol. 02:00 (+)

Problem E

Solved by ultmaster. 01:24 (+)

Problem F

Solved by ultmaster. 00:29 (+1)

Problem G

Solved by zerol. 02:15 (+)

题解:有树形的与非门组成的电路,有些门坏了,会一直输出 0 或 1,求有多少种不同的输入能使输出结果错误。

题解:树形 dp。状态 2×2,表示预测值和实际值分别为 0 或 1 的情况。

Problem H

Solved by kblack. 00:08 (+)

温暖的签到。

Problem I

Solved by zerol. 01:13 (+)

Problem J

Solved by ultmaster. 00:44 (+)

Problem K

Solved by kblack. 04:23 (+2)

Problem L

Upsolved by zerol. (-1)

题意:给一个网格图,相邻的平行边之间的距离为 1 或 5,求两点间的最短路,要求每个路口必须拐弯。

题解:一通观察,乱搞。如果横向和纵向之间的格子数不一样就需要绕远路,最好是在 1 的地方绕,注意 1 的地方可能在起点和终点构成的矩形外侧。

Problem M

Solved by ultmaster. 03:47 (+1)