結果
| 問題 | No.131 マンハッタン距離 | 
| コンテスト | |
| ユーザー |  nak3 | 
| 提出日時 | 2017-03-12 15:30:03 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 671 ms / 5,000 ms | 
| コード長 | 300 bytes | 
| コンパイル時間 | 1,081 ms | 
| コンパイル使用メモリ | 157,564 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-06-30 00:27:00 | 
| 合計ジャッジ時間 | 4,922 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 24 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define INF 2000000000
#define MOD 1000000007
typedef long long ll;
typedef pair<int, int> P;
int main()
{
	ll x, y ,d;
	cin >> x >> y >> d;
	int ret=0;
	for (int i = 0; i <= x; i++) {
		if (d-i<=y&&d-i>=0) {
			ret++;
		}
	}
	cout << ret << endl;
}
            
            
            
        