結果
| 問題 | No.799 赤黒かーどげぇむ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-11 04:38:19 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 11 ms / 2,000 ms |
| コード長 | 416 bytes |
| 記録 | |
| コンパイル時間 | 1,835 ms |
| コンパイル使用メモリ | 197,480 KB |
| 最終ジャッジ日時 | 2025-01-14 09:26:33 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
#include <bits/stdc++.h>
#define rep(i, ss, ee) for (int i = ss; i < ee; ++i)
using namespace std;
void solve() {
int a, b, c, d;
cin >> a >> b >> c >> d;
set<int> s;
rep(i, a, b + 1) s.emplace(i);
rep(i, c, d + 1) s.emplace(i);
int x = b + 1 - a;
int y = d + 1 - c;
cout << (x * y - (x + y - s.size())) << endl;
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
solve();
getchar();
}