HDU 3903 Trigonometric Function

这题真难,并不会推理。。。
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std; long long a, b, c;
int p; int main()
{
int T;
scanf("%d", &T);
while (T--)
{
scanf("%lld%lld%lld", &a, &b, &c);
scanf("%d%d%d", &p, &p, &p);
long long x = (a + b + c)*(b + c - a)*(a + c - b)*(a + b - c);
long long z = (long long)sqrt(x);
if (z*z == x) printf("YES\n");
else printf("NO\n");
}
return ;
}
HDU 3903 Trigonometric Function的更多相关文章
- HDU 3903 Trigonometric Function(数学定理)
Trigonometric Function Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 125536/65536 K (Java/Oth ...
- HDU 6156 - Palindrome Function [ 数位DP ] | 2017 中国大学生程序设计竞赛 - 网络选拔赛
普通的数位DP计算回文串个数 /* HDU 6156 - Palindrome Function [ 数位DP ] | 2017 中国大学生程序设计竞赛 - 网络选拔赛 2-36进制下回文串个数 */ ...
- HDU 6050 - Funny Function | 2017 Multi-University Training Contest 2
/* HDU 6050 - Funny Function [ 公式推导,矩阵快速幂 ] 题意: F(1,1) = F(1, 2) = 1 F(1,i) = F(1, i-1) + 2 * F(1, i ...
- HDU 4423 Simple Function(数学题,2012长春D题)
Simple Function Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)T ...
- HDU 6156 Palindrome Function
http://acm.hdu.edu.cn/showproblem.php?pid=6156 题意:$f(n,k)$表示判断n在k进制下是否是回文串,如果是,则返回k,如果不是,则返回1.现在要计算$ ...
- 2017ACM暑期多校联合训练 - Team 2 1006 HDU 6050 Funny Function (找规律 矩阵快速幂)
题目链接 Problem Description Function Fx,ysatisfies: For given integers N and M,calculate Fm,1 modulo 1e ...
- HDU 5875 H - Function 用单调栈水过了
http://acm.hdu.edu.cn/showproblem.php?pid=5875 单调栈,预处理to[i]表示第一个比a[i]小的数字,一直跳就可以. 这题是数据水而已. 这里学习下单调栈 ...
- 【数位DP】HDU 6156 Palindrome Function
http://acm.hdu.edu.cn/showproblem.php?pid=6156 [AC] #include<bits/stdc++.h> using namespace st ...
- 2017 Multi-University Training Contest - Team 2 &&hdu 6050 Funny Function
Funny Function Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)To ...
随机推荐
- POJ 2115 C Looooops (扩展欧几里德 + 线性同余方程)
分析:这个题主要考察的是对线性同余方程的理解,根据题目中给出的a,b,c,d,不难的出这样的式子,(a+k*c) % (1<<d) = b; 题目要求我们在有解的情况下求出最小的解,我们转 ...
- android activity四种启动模式
1.standard <activity android:name=".MainActivity" android:launchMode="standard&quo ...
- Mie散射 文献图片
Technorati 标签: Mie Scattering,遥感,Remote Sensing
- 转:loadrunner ---循环输出关联数组
web_reg_save_param,将Ord参数值设定为ALL,则关联函数将自动把符合条件的关联值保存到参数数组里.在本例中,假设关联值返回三条记录,则LR分别将值保存到sor_1,sor_2,so ...
- Chapter 1 First Sight——22
The girls were opposites. The tall one was statuesque. 女生却相反,高的像雕像一般 She had a beautiful figure, the ...
- PHP资源类型
在PHP中,我们经常使用到资源类型变量.例如:mysql连接.文件句柄等. 这些变量无法使用标量来表示,那么在Zend内核中是如何将PHP中的资源变量与C语言中的资源衔接的呢? 一.资源变量在PHP中 ...
- sphinx分域搜索
http://stackoverflow.com/questions/2526407/complex-query-with-sphinx 比如要实现和如下sql代码相同的功能: SELECT * FR ...
- 条形图(diagrams)
条形图(diagrams) 题目描述 小 虎刚上了幼儿园,老师让他做一个家庭作业:首先画3行格子,第一行有3个格子,第二行有2个格子,第三行有3个格子.每行的格子从左到右可以放棋子,但要 求除第一行外 ...
- rowcommand事件中获取控件
//根据当前按钮生成命名空间 protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) ...
- 用批处理文件删除n天前的文件
原文:http://blog.csdn.net/leehq/archive/2007/08/03/1723743.aspx 公司服务器用来备份数据的硬盘过段时间就会被备份文件占满,弄得我老是要登录到服 ...