結果
| 問題 | No.131 マンハッタン距離 |
| コンテスト | |
| ユーザー |
SSRS
|
| 提出日時 | 2020-09-16 15:49:15 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 244 bytes |
| 記録 | |
| コンパイル時間 | 397 ms |
| コンパイル使用メモリ | 79,232 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-13 19:11:00 |
| 合計ジャッジ時間 | 1,774 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 19 WA * 5 |
ソースコード
#include <iostream>
using namespace std;
int main(){
int x, y, d;
cin >> x >> y >> d;
if (d <= min(x, y)){
cout << d + 1 << endl;
} else if (d <= max(x, y)){
cout << min(x, y) + 1 << endl;
} else {
cout << x + y + 1 - d << endl;
}
}
SSRS