結果
問題 | No.131 マンハッタン距離 |
ユーザー |
|
提出日時 | 2018-06-29 02:33:31 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 220 bytes |
コンパイル時間 | 474 ms |
コンパイル使用メモリ | 63,048 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-30 23:42:27 |
合計ジャッジ時間 | 1,476 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
#include <iostream>using namespace std;int main(void){long long x, y, d;cin >> x >> y >> d;long long a = d+1 - (x<d ? d-x : 0) - (y<d ? d-y : 0);cout << (a >= 0 ? a : 0) << endl;return 0;}