結果
| 問題 |
No.172 UFOを捕まえろ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-01-18 22:00:00 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 396 bytes |
| コンパイル時間 | 998 ms |
| コンパイル使用メモリ | 101,956 KB |
| 最終ジャッジ日時 | 2025-01-18 02:15:55 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
#include <algorithm>
#include <array>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <numeric>
#include <optional>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
int main() {
int32_t x, y, r;
cin >> x >> y >> r;
x = abs(x);
y = abs(y);
r = (int32_t)ceil(sqrt(2) * r);
cout << x + y + r << endl;
return 0;
}