結果
問題 |
No.172 UFOを捕まえろ
|
ユーザー |
![]() |
提出日時 | 2018-02-21 03:04:23 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 281 bytes |
コンパイル時間 | 568 ms |
コンパイル使用メモリ | 73,156 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-13 19:23:31 |
合計ジャッジ時間 | 1,500 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
#include<iostream> #include<vector> #include<algorithm> #include<string> #include<cmath> #include<cstdio> using namespace std; int main(){ int x,y,r; cin >> x >> y >> r; if(x<0) x*=-1; if(y<0) y*=-1; cout << abs(x) + abs(y) + (int)(r*sqrt(2)+1); return 0; }