题目来源: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. 轻量级数据sqlite的C++调用示例

    原文地址:http://www.cnblogs.com/kfqcome/archive/2011/06/27/2136999.html #include "stdafx.h" #i ...

  2. 增进离岸Java开发效率的10个提示

    本文来源于我在InfoQ中文站原创的文章,原文地址是:http://www.infoq.com/cn/news/2013/12/10-tips-offshore-java-effective Cygn ...

  3. PHP学习笔记3-逻辑运算符

    逻辑运算符图解: 逻辑且&&: <?php /** * Created by PhpStorm. * User: Administrator * Date: 2015/6/26 ...

  4. html5 学习笔记

    一.ie8及以下对html5相关语义标签的支持 <!-[if lt IE9]> <script src="html5.js"></script> ...

  5. NET Core全新的开发体验

    NET Core全新的开发体验 2016年6月27日,这是一个特殊的日子,微软全新的.NET开发平台.NET Core的RTM版本正式发布.我个人将.NET Core的核心特性归结为三点,它们的首字母 ...

  6. HTTP 301 跳转和302跳转的区别

    常用的重定向方式有: 301 redirect, 302 redirect 与 meta fresh: 301 redirect::301代表永久性转移(Permanently Moved),301重 ...

  7. UNIX环境高级编程——进程管理和通信(总结)

    进程管理与通信 进程的管理 进程和程序的区别: 进程: 程序的一次执行过程   动态过程,进程的状态属性会发生变化 程序:存放在磁盘上的指令.数据的有序集合  是个文件,可直观看到 程序program ...

  8. 2015.7.17( NOI2015 day1 )

    今天早起做了NOI2015网络同步赛.... 最近NOI是越来越向NOIP靠拢了....但是我还是不会做..... 第一题:程序自动分析 先离散化一下..然后最多就剩20w个数 , 不等于就存起来.. ...

  9. [转]-bash: wget: command not found的两种解决方法

    wget 时提示 -bash:wget command not found,很明显没有安装wget软件包.一般linux最小化安装时,wget不会默认被安装,这里是CentOS 6.5 64位系统 解 ...

  10. 【译】在Asp.Net中操作PDF - iTextSharp - 使用字体

    原文 [译]在Asp.Net中操作PDF - iTextSharp - 使用字体 紧接着前面我对iTextSharp简介博文,iTextSharp是一个免费的允许Asp.Net对PDF进行操作的第三方 ...