結果
| 問題 | No.131 マンハッタン距離 |
| コンテスト | |
| ユーザー |
くれちー
|
| 提出日時 | 2016-12-05 23:50:30 |
| 言語 | C90 (gcc 15.2.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 241 bytes |
| 記録 | |
| コンパイル時間 | 166 ms |
| コンパイル使用メモリ | 34,048 KB |
| 最終ジャッジ日時 | 2026-02-23 23:17:40 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
ソースコード
#include <stdio.h>
int main() {
int x, y, d;
scanf("%d %d %d", &x, &y, &d);
int tx = (tx = d - x) > 0 ? tx : 0;
int ty = (ty = d - y) > 0 ? ty : 0;
int ans = (ans = d + 1 - (tx + ty)) > 0 ? ans : 0;
printf("%d\n", ans);
return 0;
}
くれちー