UVA10215The Largest/Smallest Box(小数精度)
2024-10-08 00:56:47
本身很容易却因为评测机有毒的一道题,,,看网上题解说最后一个答案要加一个很小的数才能AC,据说是因为没有speci judge
#include <iostream>
#include <string.h>
#include <cstdio>
#include <math.h> #define SIGMA_SIZE 26
#pragma warning ( disable : 4996 )
using namespace std; inline int Max(int a,int b) { return a>b?a:b; }
inline int Min(int a,int b) { return a>b?b:a; }
const int inf = 0x3f3f3f3f;
const int maxn = 1e3+;
const int mod = ; double l, w, mm = 1e-; int main()
{
while ( ~scanf("%lf%lf", &l, &w) )
{
double tmp = ( (l+w) - sqrt( l*l + w*w - l*w ) )/;;
double m = (l>w?w:l)/;
//ans = ( l-2*tmp )*( w-2*tmp )*tmp;
printf( "%.3lf %.3lf %.3lf\n", tmp, (double)0.0, m+mm );
}
}
最新文章
- SDWebImage总结
- JavaScript判断字符串能否转化为数字
- CSS: word-wrap和word-break
- 关于php一些数组函数
- ORM中去除反射,添加Expression
- 如何使用Git上传项目代码到代码服务器
- 如何测试 Android 中的定时事件
- phpcms源码跟踪(1)
- 四句话表明JSON格式定义
- django 带參数的 url
- oc 是否允许远程通知
- shell实现centos7双网卡修改网卡名eth0,eth1,并设置网络
- bzoj3124: [Sdoi2013]直径 树形dp two points
- Windows Server 2016-系统安装软硬件要求
- SQLALCHEMY_TRACK_MODIFICATIONS adds significant异常的解决方法
- Navicat Premium for Mac的破解教程
- BZOJ3211 花神游历各国 并查集 树状数组
- 不规则形状的Mask动画
- linux mongodb数据库的安装
- android onSaveInstanceState()及其配对方法。
热门文章
- sql server2014显示sa无法登录的错误
- LeetCode 14.最长公共前缀(Python3)
- inux下tcpdump命令的使用
- JavaScript特效源码(3、菜单特效)
- python2 和Python3 转unicode占位。
- lvs + keepalived + nginx + tomcat高可用负载反向代理服务器配置(一) 简介
- Spring MVC(八)--控制器接受简单列表参数
- day 40 MySQL之视图、触发器、事务、存储过程、函数
- CentOS 编译golang
- 第一周课堂笔记2th