![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
TopCoder
文章平均质量分 80
Batman_
这个作者很懒,什么都没留下…
展开
-
SRM 145 1A2A 2013.11.30
SRM 145 1A2A 2013.11.30DIV 1 250 Problem Statement You have a certain amount of money to giveout as a bonus to employees. The trouble is, who do you pick to receive whatbonus? You decide原创 2016-02-13 19:54:44 · 263 阅读 · 0 评论 -
SRM 599 1A 2013.12.6
SRM 599 1A 2013.12.6DIV 12501.学到了do-while语句写成这种样子更直观2.题目大意:X=1经过以下的多少次步骤可以得到A的B次方,令p= A的B次方。步骤一:乘以一个素数;步骤二:乘以一个自己的因数;求最小的步骤数。3.解题思路:(这道题是看了别人的代码写出来的,自己只想到了分解因数还有找多少个平原创 2016-02-13 20:05:21 · 263 阅读 · 0 评论 -
SRM 597 1A 2013.12.6
SRM 597 1A 2013.12.6DIV 1250题目大意:两个长度相同的字符串A和B,对A进行操作:从A中任意挑选一个字符,放在A的最开始,问最少经过多少次,可以变成B。解题思路:从B的最后一个字符开始,从后往前,看A能匹配的B的最长的连续的子串。用长度减去子串长度即可。错误原因:刚开始用了最长公共子序列,WA掉了最后一组数,突然想到其实就是选一个字符往前移动,那么只要原创 2016-02-13 20:06:56 · 378 阅读 · 0 评论 -
SRM 596 1A 2013.12.9
SRM 596 1A 2013.12.9DIV 1250 Problem Statement You have an array with N elements.Initially, each element is 0. You can perform the following operations:Increment operation: Choose one原创 2016-02-13 20:07:36 · 288 阅读 · 0 评论 -
SRM 595 1A 2013.12.9
SRM 595 1A 2013.12.9DIV 1250 Problem Statement Little Elephant from the Zoo of Lviv hassome balls arranged in a row. Each ball can be painted in one of two possiblecolors: black or whit原创 2016-02-13 20:08:16 · 255 阅读 · 0 评论 -
SRM 594 1A 2013.12.10
SRM 594 1A 2013.12.10DIV 1250 #include#include#include using namespace std; class AstronomicalRecords{public: int minimalPlanets(vector A, vector B) {原创 2016-02-13 20:08:47 · 289 阅读 · 0 评论 -
SRM 592 1A 2013.12.10
SRM 592 1A 2013.12.10DIV 13001.题目大意:有很多球,这些球只有三种颜色,按照给定的顺序插入,插入位置不同得分不同,得分=插入位置左右两边不同颜色球的个数之和。求最大得分。2.解题思路:(这道题是看了别人的代码,居然没有想到用集合set,因为是根据不同颜色的数量来计分的,应该用set啊,我真的笨死啦!)维护两个集合left和right,用于表示待原创 2016-02-13 20:09:46 · 339 阅读 · 0 评论 -
SRM 593 1A 2013.12.10
SRM 593 1A 2013.12.10DIV 1250 Problem Statement The pony Applejack has an N by N hexagonal board. The following picture shows the hexagonal board when N = 1, 2, 3,原创 2016-02-13 20:10:48 · 288 阅读 · 0 评论 -
SRM 591 1A 2014.5.26
SRM 591 1A 2014.5.26DIV1250Problem Statement Manao is working in the Tree Research Center. It may come as a surprise that the trees they research are not the ones yo原创 2016-02-13 20:11:39 · 292 阅读 · 0 评论 -
SRM 598 1A 2013.12.6
SRM 598 1A 2013.12.6DIV 1250 Problem Statement Fox Ciel has some items. The weight of thei-th (0-based) item is item[i]. She wants to put all items into bins. The capacity of each bin原创 2016-02-13 20:03:54 · 306 阅读 · 0 评论 -
SRM 153 1A 2013.12.5
SRM 153 1A 2013.12.5DIV 1250 Problem Statement Inventory control is an important part ofany business that maintains an inventory. On the one hand, businesses want tohave enough of a pro原创 2016-02-13 20:03:13 · 225 阅读 · 0 评论 -
SRM 152 1A 2013.12.5
SRM 152 1A 2013.12.5DIV1 250Problem Statement You and your friends are setting up afantasy TopCoder league, where you choose coders to be on your team and scorepoints in the league when原创 2016-02-13 20:02:25 · 228 阅读 · 0 评论 -
SRM 144 1AB2AB 2013.12.1
SRM 144 1AB2AB 2013.12.1SRM 144 DIV 1 300 Problem Statement Let's say you have a binary string such asthe following:011100011One way to encrypt this string is to add toeach digit the原创 2016-02-13 19:55:19 · 304 阅读 · 0 评论 -
SRM 146 1A2A 2013.12.1
SRM 146 1A2A 2013.12.1DIV 1 300Problem Statement Given the width and height of a rectangulargrid, return the total number of rectangles (NOT counting squares) that can befound on this grid.原创 2016-02-13 19:55:50 · 232 阅读 · 0 评论 -
SRM 217 1A 2013.12.2
SRM 217 1A 2013.12.2DIV1200 - Problem Statement You are playing a computer game and a bigfight is planned between two armies. You and your computer opponent will lineup your respective unit原创 2016-02-13 19:56:24 · 261 阅读 · 0 评论 -
SRM 147 1A2A 2013.12.2
SRM 147 1A2A 2013.12.2DIV 1350Problem Statement There are numMales males and numFemalesfemales arranged in a circle. Starting from a given point, you count clockwiseand remove the K'th pe原创 2016-02-13 19:58:54 · 309 阅读 · 0 评论 -
SRM 148 1A2A 2013.12.2
SRM 148 1A2A 2013.12.2DIV 1250 Problem Statement Tommy is learning a simple card game calledCircle. To play the game, the single player shuffles a deck of cards. He or shethen flips thr原创 2016-02-13 19:59:24 · 236 阅读 · 0 评论 -
SRM 149 1A2AB 2013.12.3
SRM 149 1A2AB 2013.12.3DIV1250Problem Statement BigBurger Inc. wants to see if having asingle person at the counter both to take orders and to serve them is feasible.At each BigBurger, cu原创 2016-02-13 19:59:56 · 358 阅读 · 0 评论 -
SRM 150 1A 2013.12.3
SRM 150 1A 2013.12.3DIV 1250Problem Statement The digits 3 and 9 share an interestingproperty. If you take any multiple of 3 and sum its digits, you get anothermultiple of 3. For example,原创 2016-02-13 20:00:36 · 240 阅读 · 0 评论 -
SRM 151 1A 2013.12.3
SRM 151 1A 2013.12.3DIV1250 Problem Statement The Greek mathematician Archimedes ofSyracuse (287-212 B.C.) was most likely the first in finding a way tosystematically (iteratively) appr原创 2016-02-13 20:01:12 · 225 阅读 · 0 评论 -
SRM 590 1A 2014.5.26
SRM 590 1A 2014.5.26DIV1250Problem Statement Fox Ciel is playing a game with some chess pawns and a strip of paper. The strip of paper is divided into a row of cells原创 2016-02-13 20:12:07 · 288 阅读 · 0 评论