結果
問題 | No.799 赤黒かーどげぇむ |
ユーザー |
![]() |
提出日時 | 2019-08-09 04:44:37 |
言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 302 bytes |
コンパイル時間 | 756 ms |
コンパイル使用メモリ | 128,320 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-30 14:28:05 |
合計ジャッジ時間 | 1,466 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
#include <iostream>#include <algorithm>using namespace std;int main(){int a, b, c, d;cin >> a >> b >> c >> d;if(b < c || d < a){cout << (b - a + 1) * (d - c + 1) << "\n";return 0;}cout << (b - a + 1) * (d - c + 1) - (min(d, b) - max(a, c) + 1) << "\n";}