結果
| 問題 |
No.172 UFOを捕まえろ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-11-30 03:58:28 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 242 bytes |
| コンパイル時間 | 463 ms |
| コンパイル使用メモリ | 59,100 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-15 14:34:10 |
| 合計ジャッジ時間 | 1,099 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
#include <iostream>
#include <cmath>
using namespace std;
int main(){
ios::sync_with_stdio(false);
int x, y, r;
cin >> x >> y >> r;
x = (x<0) ? -x : x;
y = (y<0) ? -y : y;
cout << x+y+floor(r*sqrt(2))+1 << "\n";
return 0;
}