結果
| 問題 |
No.799 赤黒かーどげぇむ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-03-17 21:47:45 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 271 bytes |
| コンパイル時間 | 1,934 ms |
| コンパイル使用メモリ | 193,088 KB |
| 最終ジャッジ日時 | 2025-01-06 22:56:33 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
signed main() {
ios::sync_with_stdio(false); cin.tie(0);
int a, b, c, d;
cin >> a >> b >> c >> d;
cout << (b - a + 1) * (d - c + 1) - max(0, min(b, d) - max(a, c) + 1) << endl;
return 0;
}