Topcoder
文章平均质量分 85
fcbruce
Veni,Vidi,Vici
展开
-
Topcoder SRM 628 DIV 2
被自己蠢哭了。。。。 250-point problem 国际象棋棋盘上给出两个坐标,问象从一个走到另一个最少要几步。 黑格象只能走黑格,白格象只能走白格,只要判断两个坐标的颜色是否相同就能判断是否可达,观察棋盘可以发现坐标的奇偶性决定了格子的颜色;可达的情况下最多两步就能达到,所以只要判断格子是否在同一条斜线上就行了。 #include #include #include #incl原创 2014-07-23 19:36:00 · 1661 阅读 · 8 评论 -
TopCoder SRM 144 DIV2 550points
Problem Statement Let's say you have a binary string such as the following: 011100011 One way to encrypt this string is to add to each digit the sum of its adjacent digits. For exampl原创 2014-02-11 21:34:36 · 829 阅读 · 0 评论 -
TopCoder SRM 609 DIV2 500points
Problem Statement We have R red, G green, and B blue balls. We want to divide them into as few packages as possible. Each package must contain 1, 2, or 3 balls. Additionally, each package m原创 2014-02-16 13:38:38 · 1025 阅读 · 0 评论 -
TopCoder SRM 446 DIV2 500points
Problem Statement Consider the 3x3x3 cube shown above. There are nine squares on each of its six faces, and each face is colored using the following pattern: The four corner squares原创 2014-02-14 10:58:40 · 794 阅读 · 0 评论