結果
問題 | No.799 赤黒かーどげぇむ |
ユーザー |
|
提出日時 | 2019-03-17 22:21:28 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 1,165 bytes |
コンパイル時間 | 1,682 ms |
コンパイル使用メモリ | 192,128 KB |
最終ジャッジ日時 | 2025-01-06 23:07:04 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
#include "bits/stdc++.h" using namespace std; using ll = long long; using ull = unsigned long long; //#define int ll using vb = vector<bool>; using vvb = vector<vb>; using vi = vector<int>; using vvi = vector<vi>; using vl = vector<ll>; using vvl = vector<vl>; template<class T> using V = vector<T>; template<class T> using vv = vector<V<T>>; template<class T> using VV = vector<V<T>>; #define fi first #define se second #define maxs(x,y) (x=max(x,y)) #define mins(x,y) (x=min(x,y)) using pii = pair<int,int>; using pll = pair<ll,ll>; #define FOR(i,a,b) for(ll i = (a); i < (ll)(b); ++i) #define REP(i,n) FOR(i,0,n) #define RFOR(i,a,b) for(ll i = (ll)(b)-1;i >= a;--i) #define RREP(i,n) RFOR(i,0,n) #define ALL(obj) (obj).begin(), (obj).end() #define rALL(obj) (obj).rbegin(), (obj).rend() #define eb(val) emplace_back(val) const double PI = acos(-1); const double EPS = 1e-10; const ll MOD = 1e9+7; void cioacc(){//accelerate cin/cout cin.tie(0); ios::sync_with_stdio(false); } signed main(){ int a,b,c,d; cin >> a >> b >> c >> d; int ans = (b-a+1)*(d-c+1); int ct = 0; REP(i,101){ if(a<=i&&i<=b&&c<=i&&i<=d) ct++; } cout << ans-ct << endl; }