Ps:wa了两次....一次是从加法那边暴力,然而算法错误..应该从乘法那边暴力破解...然而又没算负数。。加上负数..直接暴力AC.

代码:

#include "stdio.h"
int abs(int a);
int main(){
int i,a,b,s,flag,flag1;
while(~scanf("%d%d",&a,&b) && (a || b)){
flag=;
for(i=-abs(b);i<=abs(b);i++){
if((a-i)*i==b){
flag=;
break;
}
}
if(flag==) printf("Yes\n");
else printf("No\n");
}
return ;
}
int abs(int a){
if(a<) a=-a;
return a;
}

hdu 2092的更多相关文章

  1. HDU 2092 (将表达式变成一元二次方程形式)

    传送门: http://acm.hdu.edu.cn/showproblem.php?pid=2092 整数解 Time Limit: 1000/1000 MS (Java/Others)    Me ...

  2. HDU 2092 整数解

    整数解 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submiss ...

  3. 整数解 (hdu 2092

    整数解 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submiss ...

  4. hdu 2092 整数解(一元二次方程解)

    题目: 思路: 1.两个整数的和和积容易联想到一元二次方程的两个根,只要证明有两个解,并都是整数就打印出Yes,否则打印出No 2.最后判断那步,为什么只需要判断一个整数存在就够了,因为和是整数,一个 ...

  5. HDU——PKU题目分类

    HDU 模拟题, 枚举1002 1004 1013 1015 1017 1020 1022 1029 1031 1033 1034 1035 1036 1037 1039 1042 1047 1048 ...

  6. [转] HDU 题目分类

    转载来自:http://www.cppblog.com/acronix/archive/2010/09/24/127536.aspx 分类一: 基础题:1000.1001.1004.1005.1008 ...

  7. HDU ACM 题目分类

    模拟题, 枚举1002 1004 1013 1015 1017 1020 1022 1029 1031 1033 1034 1035 1036 1037 1039 1042 1047 1048 104 ...

  8. HDU 5643 King's Game 打表

    King's Game 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5643 Description In order to remember hi ...

  9. 转载:hdu 题目分类 (侵删)

    转载:from http://blog.csdn.net/qq_28236309/article/details/47818349 基础题:1000.1001.1004.1005.1008.1012. ...

随机推荐

  1. 使用react native for android生成app

    参考文章 http://reactnative.cn/docs/getting-started.html http://www.lcode.org/react-native/ https://gith ...

  2. Java replace() 方法

    Java replace() 方法 Java String类 replace() 方法通过用 newChar 字符替换字符串中出现的所有 oldChar 字符,并返回替换后的新字符串. 语法 publ ...

  3. selenium+python笔记8

    #!/usr/bin/env python # -*- coding: utf-8 -*- """ @desc: 定制浏览器 """ imp ...

  4. CSDN中的Bug

    简述 在用CSDN的过程中,发现了许许多多的Bug.之前没有做记录,直接反馈给客服了,有时没图说得不太清楚,现在不都追求有图有真相么O(∩_∩)O~,所以在此记录一下. 作为程序员的一份子,Bug对我 ...

  5. NetworkShareAccesser: 远程PC1 文件 copy 到PC2 文件夹

    Usage: string strRepoBundlePath = @"\\at1-repo01\ATE\Bundles\SharePoint\Open\denyopen.zip" ...

  6. C++格式化输入输出

    要实现格式化输入输出,程序需要包含 iostreams 标准标头 <iomanip> 以定义几个各自采用单个参数的操控器. 备注: 其中每个操控器都返回重载 basic_istream&l ...

  7. iOS开发几年了,你清楚OC中的这些东西么!!!?

    iOS开发几年了,你清楚OC中的这些东西么!!!? 前言 几年前笔者是使用Objective-C进行iOS开发, 不过在两年前Apple发布swift的时候,就开始了swift的学习, 在swift1 ...

  8. 5月11日 ArrayList集合复习、特殊集合、枚举类型

    一.ArrayList集合复习 //定义 ArrayList al = new ArrayList(); //添加元素 al.Add(); //插入元素 al.Insert(,); //查看个数 in ...

  9. 5月5日 while、do{}while

    while .do{}while 一.while的死循环 while (1 == 1)//只要表达式里是true,就是死循环 { //循环内容 } 二.do{}while 不管while是否满足,首先 ...

  10. Installing a single-server IBM FileNet P8 Platform system with IBM Content Navigator

    Product documentation Abstract You can install all of the IBM FileNet P8 Platform components on a si ...