結果

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

ソースコード

diff #

#include <iostream>
#include <algorithm>
using namespace std;

int a, b, c, d;

int main() {
	cin >> a >> b >> c >> d;
	if (a > c) {
		swap(a, c);
		swap(b, d);
	}
	int kasanari = max(b - c + 1, 0);
	
	cout << (b - a + 1) * (d - c + 1) - kasanari << endl;
	return 0;
}
0