結果
| 問題 | No.131 マンハッタン距離 |
| コンテスト | |
| ユーザー |
184
|
| 提出日時 | 2015-01-20 23:59:40 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 343 bytes |
| 記録 | |
| コンパイル時間 | 169 ms |
| コンパイル使用メモリ | 53,328 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2026-03-07 07:13:35 |
| 合計ジャッジ時間 | 818 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 WA * 4 |
ソースコード
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <algorithm>
using namespace std;
//namaega184
int main(){
int x,y,d;scanf("%d%d%d",&x,&y,&d);
if(x+y<d){
printf("0\n");
return 0;
}
else if(x+y==d||d==0){
printf("1\n");
return 0;
}
int ax=min(x,d)+1,ay=min(y,d)+1;
printf("%d\n",min(ax,ay));
return 0;
}
184