結果
問題 |
No.131 マンハッタン距離
|
ユーザー |
|
提出日時 | 2025-09-11 18:39:08 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 223 bytes |
コンパイル時間 | 6,790 ms |
コンパイル使用メモリ | 254,704 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2025-09-11 18:39:16 |
合計ジャッジ時間 | 8,085 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
#include <bits/stdc++.h> using namespace std; int x, y, d; int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); cin >> x >> y >> d; long ans = max(0,min(x,d)-max(d-y,0)+1); cout << ans << "\n"; }