結果
問題 |
No.131 マンハッタン距離
|
ユーザー |
|
提出日時 | 2018-12-26 14:46:55 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 379 bytes |
コンパイル時間 | 599 ms |
コンパイル使用メモリ | 66,708 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-01 14:42:59 |
合計ジャッジ時間 | 1,523 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 WA * 15 |
ソースコード
#include <algorithm> #include <iostream> using namespace std; int main() { long x, y, d; cin >> x >> y >> d; if (min(x, d) - max(d - y, 0L) >= 0 && min(y, d) - max(d - x, 0L) >= 0) cout << (min(x, d) - max(d - y, 0L)) * ((min(y, d) - max(d - x, 0L))) + 1; else cout << 0; // cout << (max(min(y, d) - max(d - x, 0L), 0L)) * (max(min(x, d) - max(d - y, 0L), 0L)); }