摘要: 题目链接 题解:将每个单词倒置,可以用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)