結果
| 問題 | No.131 マンハッタン距離 |
| コンテスト | |
| ユーザー |
dnish
|
| 提出日時 | 2017-07-05 01:30:33 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 221 bytes |
| 記録 | |
| コンパイル時間 | 857 ms |
| コンパイル使用メモリ | 179,340 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-09-10 17:31:30 |
| 合計ジャッジ時間 | 2,436 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 WA * 1 |
ソースコード
#include <bits/stdc++.h>
#define p(s) cout<<(s)<<endl
using namespace std;
int main(){
int x,y,d;
cin>>x>>y>>d;
int ans;
if(x+y<d) ans=0;
else if(x>=d&&y>=d) ans=d+1;
else ans=x+1-max(d-y,0);
p(ans);
return 0;
}
dnish