結果
問題 | No.131 マンハッタン距離 |
ユーザー |
![]() |
提出日時 | 2015-04-05 22:28:13 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 177 bytes |
コンパイル時間 | 1,144 ms |
コンパイル使用メモリ | 158,016 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-04 02:07:35 |
合計ジャッジ時間 | 1,971 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
#include "bits/stdc++.h" using namespace std; int main() { int x, y, d; cin >> x >> y >> d; int ans = max(0, d + 1 - max(0, d - y) - max(0, d - x)); cout << ans << endl; }