結果
問題 |
No.131 マンハッタン距離
|
ユーザー |
![]() |
提出日時 | 2015-01-20 23:25:25 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 286 bytes |
コンパイル時間 | 1,425 ms |
コンパイル使用メモリ | 158,256 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-22 23:09:23 |
合計ジャッジ時間 | 1,938 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 WA * 7 |
ソースコード
#include<bits/stdc++.h> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) using namespace std; typedef long long ll; int main(){ ll x,y,d; cin >> x >> y >> d; if( d > max(x,y) ) puts("0"); else cout << min(min(x+1,d+1),min(y+1,d+1)) << endl; return 0; }