题目来源:http://community.topcoder.com/stat?c=problem_statement&pm=12580

比较简单,代码如下:

#include <iostream>
#include <string>
#include <cmath> using namespace std; class SemiPerfectSquare
{
public:
string check(int N);
}; string SemiPerfectSquare::check(int N)
{
int sq = (int)sqrt((double)N); for (int i = 0; i <= sq; i++) {
for (int j = 0; j < i; j++) {
if (j * i * i == N) {
return "Yes";
}
}
} return "No";
}

SRM 582 Div II Level One: SemiPerfectSquare的更多相关文章

  1. SRM 582 Div II Level Three: ColorTheCells, Brute Force 算法

    题目来源:http://community.topcoder.com/stat?c=problem_statement&pm=12581 Burte Force 算法,求解了所有了情况,注意  ...

  2. SRM 582 Div II Level Two SpaceWarDiv2

    题目来源:http://community.topcoder.com/stat?c=problem_statement&pm=12556 #include <iostream> # ...

  3. SRM 583 Div II Level One:SwappingDigits

    题目来源:http://community.topcoder.com/stat?c=problem_statement&pm=12609 #include <iostream> # ...

  4. SRM 583 Div II Level Three:GameOnABoard,Dijkstra最短路径算法

    题目来源:http://community.topcoder.com/stat?c=problem_statement&pm=12556 用Dijkstra实现,之前用Floyd算法写了一个, ...

  5. SRM 223 Div II Level Two: BlackAndRed,O(N)复杂度

    题目来源:http://community.topcoder.com/stat?c=problem_statement&pm=3457&rd=5869 解答分析:http://comm ...

  6. SRM 207 Div II Level Two: RegularSeason,字符串操作(sstream),多关键字排序(操作符重载)

    题目来源:http://community.topcoder.com/stat?c=problem_statement&pm=2866&rd=5853 主要是要对字符串的操作要熟悉,熟 ...

  7. SRM 219 Div II Level One: WaiterTipping,小心约分

    题目来源:http://community.topcoder.com/stat?c=problem_statement&pm=12609&rd=15503 这题目看上去so easy, ...

  8. SRM 212 Div II Level One: YahtzeeScore

    题目来源:http://community.topcoder.com/stat?c=problem_statement&pm=1692&rd=5858 比较简单. 代码如下: #inc ...

  9. SRM 212 Div II Level Two: WinningRecord,Brute Force

    题目来源:http://community.topcoder.com/stat?c=problem_statement&pm=3003&rd=5858 比较简单. 代码如下: #inc ...

随机推荐

  1. HDU 3060 多边形面积并

    Area2 Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Subm ...

  2. 同时支持多家云平台的管理工具HybridFox

    偶然间发现了这个firefox上的开元插件 号称支持AWS,Eucalyptus,OpenStack,OpenNebula 目的是通过一个入口实现异种云平台的管理 主要功能包括: Manage Ima ...

  3. poj1742 多重背包的可行性问题

    http://poj.org/problem? id=1742 Description People in Silverland use coins.They have coins of value ...

  4. ftp上传错误

    明明设置好了权限,但是在上传的时候提示如下错误,但在使用的过程当中,发现有的时候是可以上传的,很奇怪的问题. baidu 了一下,发现是下面的这个设置导致的.改过来后,果然正常. 这个设置只是一个字符 ...

  5. 安装帝国CMS遇到“修改php.ini,将:short_open_tag 设为 On”的解决方法+“建立目录不成功!请检查目录权限”问题

    想用安装个帝国CMS来做个网站,于是下载了程序,上传到服务器上,但是在输入安装路径的时候却给出了如下图示: 您的PHP配置文件php.ini配置有问题,请按下面操作即可解决: 1.修改php.ini, ...

  6. CPU自制入门——笔记

    最近在看日本人的那本书<CPU自制入门>就开始自己捣鼓.把工程方到QuartusII 里面后发现编译不通过,总是提示找不到头文件.工程的目录架构是这个样子的 而.v文件中的.h 是这么包含 ...

  7. RunLoop学习总结

    开始 很久之前就看了一次YY的文章,没看懂.后来又看了sunny的视频和叶孤城的直播的视频,找了很多资料,对RunLoop也越来越清晰,然后又看了两三次YY的文章,虽然还没完全看懂,不得不说写的非常好 ...

  8. AzureDev 社区活动获奖者公布

    今天,我们高兴地宣布 AzureDev社区活动的获奖者,并向这 5 个非盈利技术教育组织发放 10 万美元奖金.在 2013 年的Build大会上宣布的 AzureDev 活动专注于通过代码改变世界, ...

  9. 凡客副总裁被曝离职:或因IPO受阻|凡客|王春焕|离职_互联网_新浪科技_新浪网

    凡客副总裁被曝离职:或因IPO受阻|凡客|王春焕|离职_互联网_新浪科技_新浪网 凡客副总裁被曝离职:或因IPO受阻 2013年05月07日 00:56   每日经济新闻    我有话说     每经 ...

  10. 【C#、csharp】HTTPGET,POST请求

    HTTP定义了与服务器交互的不同方法,基本方法有GET,POST,PUT,DELETE,分别对于查,该,增,删.一般情况下我们只用到GET和POST,其他两种都也可以用GET和POST来实现,很多浏览 ...