結果
| 問題 |
No.131 マンハッタン距離
|
| コンテスト | |
| ユーザー |
motxx
|
| 提出日時 | 2015-01-26 00:28:23 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 257 bytes |
| コンパイル時間 | 1,948 ms |
| コンパイル使用メモリ | 157,664 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-23 03:07:56 |
| 合計ジャッジ時間 | 2,258 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define REP(i,a,b) for(int i=a;i<(int)b;i++)
#define rep(i,n) REP(i,0,n)
int main() {
int x, y, d; cin >> x >> y >> d;
cout << (x+y < d ? 0 : d+1-max(0, (d-x))-max(0, (d-y))) << endl;
return 0;
}
motxx