結果
| 問題 |
No.799 赤黒かーどげぇむ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-03-18 23:14:16 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 363 bytes |
| コンパイル時間 | 536 ms |
| コンパイル使用メモリ | 56,280 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-19 07:31:01 |
| 合計ジャッジ時間 | 978 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 WA * 18 |
ソースコード
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
int s = b - a + 1;
int t = d - c + 1;
int n1 = min(a, c);
int n2 = max(b, d);
int n = n1 - n2;
if(n > 0)
{
cout << s * t << endl;
}
else
{
cout << (s * t + n - 1) << endl;
}
}