
无算法
soundwave_
Talk is cheap. Show me the code.
展开
-
[字符串操作]poj 1274 展开字符串
poj 1274 展开字符串题意:给一个字符串,讲简单紧凑的表达式展开,比如2(abc)表示abcabc思路:字符串的操作,这道题不涉及算法,但是这类题都是需要你仔细一点,将所有情况都考虑到仔细读题,发现字符串只有数字、括号、小写字母括号前遇到数字就记录,遇到前括号"("就找到相匹配的后括号")",然后一层层递归;其实只需要输出字母,数字是限制,括号就递归;但是wa原创 2017-03-22 19:29:54 · 559 阅读 · 0 评论 -
[暴力搜索]poj1231 The Alphabet Game
The Alphabet GameTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 1442 Accepted: 586DescriptionLittle Dara has recently learned how to write a few lett原创 2016-08-17 19:31:11 · 337 阅读 · 0 评论 -
[暴力搜索]poj 1083 Moving Tables
DescriptionThe famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor has 200 rooms each on the north side and south原创 2016-07-22 14:27:13 · 339 阅读 · 0 评论 -
[水题]poj 1280 前m大的数
poj 1280 前m大的数题意:给一串数字,他们两两相加后,输出前m大的数思路:本来以为范围这么大会超时,但是数据比较水……注意一下数组范围即可,3000*(3000-1)/2 = 450w, 所以至少要开450w的数组代码:#include #include #include #include #include #include using names原创 2017-03-22 19:58:27 · 603 阅读 · 0 评论 -
[水题]hdu 1262 寻找素数对
hdu 1262 寻找素数对题意:任意取出一个偶数,来寻找两个值最相近的素数,其和等于该偶数思路:水题,判断素数但还是wa了一次,这两个素数可以是一样的……比如 6 = 3 + 3;代码:#include #include #include #include #include #include using namespace std;bool judg原创 2017-03-22 20:06:10 · 507 阅读 · 0 评论