結果
問題 | No.419 直角三角形 |
ユーザー |
![]() |
提出日時 | 2016-09-20 00:16:37 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 718 bytes |
コンパイル時間 | 713 ms |
コンパイル使用メモリ | 83,168 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-17 10:05:38 |
合計ジャッジ時間 | 1,531 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <cstdio>#include <cstring>#include <string>#include <cmath>#include <cassert>#include <iostream>#include <algorithm>#include <stack>#include <queue>#include <vector>#include <set>#include <map>#include <bitset>using namespace std;#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)#define rep(i,n) repl(i,0,n)#define mp(a,b) make_pair(a,b)#define pb(a) push_back(a)#define all(x) (x).begin(),(x).end()#define dbg(x) cout<<#x"="<<x<<endl#define fi first#define se second#define INF 2147483600int main(){double a,b;cin>>a>>b;if(a==b) {printf("%.10f\n", sqrt(2*a*a)); return 0;}if(a<b) swap(a,b);// a is largerprintf("%.10f\n", sqrt(a*a - b*b));return 0;}