上一页 1 ··· 3 4 5 6 7
摘要: Time Limit: 1 Sec Memory Limit: 128 MB Description 你的任务是编写一个程序实现简单的字符宽度编码方法。规则如下:将任何2~9个相同字符的序列编码成2个字符:第1个字符是序列的长度,用数字字符2~9表示,第2个字符为这一串相同字符序列中的字符。超过9个 阅读全文
posted @ 2016-01-27 19:54 ACMSaga 阅读(330) 评论(0) 推荐(0)
摘要: 题目链接 题解:将每个单词倒置,可以用char数组,然后用空格分隔,这里用的是string和stringstream。 #include <cstdio> #include <iostream> #include <string> #include <sstream> #include <cstri 阅读全文
posted @ 2016-01-26 15:57 ACMSaga 阅读(137) 评论(0) 推荐(0)
摘要: 题目链接 Problem Description We know that some positive integer x can be expressed as x=A^2+B^2(A,B are integers). Take x=10 for example, 10=(-3)^2+1^2.We 阅读全文
posted @ 2016-01-26 15:44 ACMSaga 阅读(145) 评论(0) 推荐(0)
摘要: 题目链接 Problem Description The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shak 阅读全文
posted @ 2016-01-26 15:40 ACMSaga 阅读(138) 评论(0) 推荐(0)
摘要: 题目链接 Problem Description Given two integers n and m, count the number of pairs of integers (a,b) such that 0 < a < b < n and (a^2+b^2 +m)/(ab) is an i 阅读全文
posted @ 2016-01-26 15:37 ACMSaga 阅读(190) 评论(0) 推荐(0)
摘要: 题目链接 Problem Description “连连看”相信很多人都玩过。没玩过也没关系,下面我给大家介绍一下游戏规则:在一个棋盘中,放了很多的棋子。如果某两个相同的棋子,可以通过一条线连起来(这条线不能经过其它棋子),而且线的转折次数不超过两次,那么这两个棋子就可以在棋盘上消去。不好意思,由于 阅读全文
posted @ 2016-01-25 21:38 ACMSaga 阅读(226) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7