結果
| 問題 |
No.172 UFOを捕まえろ
|
| コンテスト | |
| ユーザー |
cocomoff
|
| 提出日時 | 2019-09-19 23:15:33 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 335 bytes |
| コンパイル時間 | 1,814 ms |
| コンパイル使用メモリ | 158,552 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-21 15:52:26 |
| 合計ジャッジ時間 | 2,802 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
double x, y, r;
cin >> x >> y >> r;
x = abs(x);
y = abs(y);
// double large = max(x, y);
// double small = min(x, y);
// int term = ceil(large + 0.5 * r);
int ans = ceil(x + y + 1.4142 * r);
cout << ans << endl;
}
cocomoff