結果
| 問題 |
No.172 UFOを捕まえろ
|
| コンテスト | |
| ユーザー |
0yuduki0
|
| 提出日時 | 2016-08-28 00:36:25 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 351 bytes |
| コンパイル時間 | 649 ms |
| コンパイル使用メモリ | 67,584 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-08 20:07:09 |
| 合計ジャッジ時間 | 1,457 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 WA * 11 |
ソースコード
#include <iostream>
#include <cmath>
using namespace std;
int main(int argc, char** argv) {
int x, y, r;
cin >> x >> y >> r;
if (x < 0) x = -x;
if (y < 0) y = -y;
double tmp;
int ans;
if (x == 0 && y == 0) tmp = sqrt(2) * r;
else tmp = (x + y) * (1 + r / sqrt(x * x + y * y));
ans = (int)tmp + 1;
cout << ans << endl;
return 0;
}
0yuduki0