結果

問題 No.799 赤黒かーどげぇむ
ユーザー masaemon
提出日時 2019-03-18 23:09:54
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 292 bytes
コンパイル時間 513 ms
コンパイル使用メモリ 53,624 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-19 07:28:46
合計ジャッジ時間 1,292 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
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 n = c - b;
    if(n > 0)
    {
        cout << s * t << endl;
    }
    else
        {
        cout << (s * t + n - 1) << endl;
    }
}
0