結果
| 問題 | No.172 UFOを捕まえろ |
| コンテスト | |
| ユーザー |
Bantako
|
| 提出日時 | 2017-06-23 18:42:26 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 335 bytes |
| 記録 | |
| コンパイル時間 | 281 ms |
| コンパイル使用メモリ | 48,896 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-04-19 23:59:15 |
| 合計ジャッジ時間 | 2,418 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 7 WA * 14 |
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | main(){
| ^~~~
ソースコード
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
main(){
int X,Y,R;
scanf("%d %d %d",&X,&Y,&R);
//原点から一番遠いUFOの円の座標
int x = abs(X) + ceil(R / sqrt(2));
int y = abs(Y) + ceil(R / sqrt(2));
//(0,0)から(x,y)までのマンハッタン距離
int d = x + y;
printf("%d",d);
}
Bantako