当前位置:网站首页>B. Cutting corners (simple geometry / sign in) (Game 5 of 2021 Training Alliance warm-up training competition)
B. Cutting corners (simple geometry / sign in) (Game 5 of 2021 Training Alliance warm-up training competition)
2022-04-22 07:30:00 【S atur】



The question : Let's find the difference between the sum of the two right sides of a right triangle and the hypotenuse , Tell you the value of two right angle sides .
Code implementation :
#include<bits/stdc++.h>
#define endl '\n'
#define null NULL
#define ll long long
#define int long long
#define pii pair<int, int>
#define lowbit(x) (x &(-x))
#define ls(x) x<<1
#define rs(x) (x<<1+1)
#define me(ar) memset(ar, 0, sizeof ar)
#define mem(ar,num) memset(ar, num, sizeof ar)
#define rp(i, n) for(int i = 0, i < n; i ++)
#define rep(i, a, n) for(int i = a; i <= n; i ++)
#define pre(i, n, a) for(int i = n; i >= a; i --)
#define IOS ios::sync_with_stdio(0); cin.tie(0);cout.tie(0);
const int way[4][2] = {
{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
using namespace std;
const int inf = 0x3f3f3f3f3f3f3f3f;
const double PI = acos(-1.0);
const double eps = 1e-6;
const ll mod = 1e9+7;
const int N = 2e5 + 5;
inline void read(int &x){
char t=getchar();
while(!isdigit(t)) t=getchar();
for(x=t^48,t=getchar();isdigit(t);t=getchar()) x=x*10+(t^48);
}
int a, b;
signed main()
{
// IOS;
cin >> a >> b;
double c = (a+b)*1.0-sqrt(a*a+b*b);
printf("%.10f\n", c);
return 0;
}
版权声明
本文为[S atur]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220616061176.html
边栏推荐
- Codeforces Round #588 (Div. 2) C D
- 278 · draw fill
- L2-001 emergency rescue (extension of shortest Dijkstra - number of shortest paths & maximum weight of paths)
- Redis Advanced
- P1095 [noip2007 popularity group] escape of the catcher
- 1005 Monopoly 同余求解(2021中国大学生程序设计竞赛CCPC-网络选拔赛重赛)
- Codeforces Round #779 (Div. 2)
- 323 · 字符串游戏
- 快排与归并排序
- Points for attention in Modelsim simulation acceleration
猜你喜欢

363 · 接雨水

LeetCode - 6 - (字符串相乘、下一個更大元素<ⅠⅡⅢ>、k個一組翻轉鏈錶)

C language | quick sorting

A. Binary seating (the fifth game of 2021 training League warm-up training competition)

E.Figure Skating (字符串排序/签到) (2021年度训练联盟热身训练赛第五场 )

链表习题详解

Win10 modify command line default font

指针 结构体 const 小结

内部类使用说明(静态、实例、局部)

LeetCode - 8 - (三数之和、Z字形变换、两数之和<链表>、盛最多水的容器、电话号码的字母组合)
随机推荐
LeetCode - 7 - (二叉树的最近公共祖先、轮转数组、二叉树的直接、下一个排列、组合总和)
Codeforces Round #588 (Div. 2) C D
L2-005 集合相似度(set判重)
Redis advanced
L2-002 链表去重(测试点1的坑)
C language | preprocessing
(4) Character set in SQL Server (collation)
F. Find 3-friendly Integers (特殊数字 / 找规律) (2021牛客暑期多校训练营1)
Educational Codeforces Round 122 (Rated for Div. 2)
L1-064 估值一亿的AI核心代码 (20 分) 格式错误
树+二叉树 详解 详解 +Top-k问题
Vivado generates and invokes EDF netlist files
P1095 [NOIP2007 普及组] 守望者的逃离
LeetCode -3 - (字符串相加、最大连续1的个数<ⅠⅢ>、考试的最大困扰度、删除链表的倒数第N个结点)
换根dp(啊啊啊啊啊)
Final关键字
L2-004 is this a binary search tree? (first order input & judgment search Binary Tree & second order output)
2021学习计划
Redis进阶
L2-001 emergency rescue (extension of shortest Dijkstra - number of shortest paths & maximum weight of paths)