結果
問題 | No.799 赤黒かーどげぇむ |
ユーザー | wacchoz |
提出日時 | 2019-03-17 21:23:42 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 517 bytes |
コンパイル時間 | 1,181 ms |
コンパイル使用メモリ | 157,784 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-07 20:03:32 |
合計ジャッジ時間 | 1,781 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
#include "bits/stdc++.h" using namespace std; #define int long long #define ll long long typedef pair<int, int> P; #define mod 1000000007 #define INF (1LL<<60) #define rep(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i) #define YES cout << "YES" << endl; #define Yes cout << "Yes" << endl; #define NO cout << "NO" << endl; #define No cout << "No" << endl; signed main(){ int a, b, c, d; cin >> a >> b >> c >> d; int s = min(b, d) - max(a, c)+1; cout << (b - a + 1)*(d - c + 1) - max(s, 0LL); return 0; }