結果
問題 | No.131 マンハッタン距離 |
ユーザー |
![]() |
提出日時 | 2015-06-10 00:43:47 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 203 bytes |
コンパイル時間 | 446 ms |
コンパイル使用メモリ | 56,444 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-06 15:17:28 |
合計ジャッジ時間 | 1,424 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
#include <iostream>#include <algorithm>using namespace std;int main() {int x, y, d;cin >> x >> y >> d;int result = max(0, min(x, d) - max(0, d - y) + 1);cout << result << endl;return 0;}