結果
| 問題 | No.799 赤黒かーどげぇむ |
| コンテスト | |
| ユーザー |
stretchybox
|
| 提出日時 | 2019-03-17 21:22:07 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 988 bytes |
| コンパイル時間 | 1,534 ms |
| コンパイル使用メモリ | 166,336 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-07 19:58:56 |
| 合計ジャッジ時間 | 2,105 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
using P = pair<ll, ll>;
using mat = vector<vector<ll>>;
void IOS() { ios::sync_with_stdio(false), cin.tie(0); }
const ll INF = 1e16;
const ll MOD = 1e9 + 7;
const ld EPS = 1e-12;
template <typename T> void dump(T x) { cout << x << endl; }
void dumpf(ld x, int t) { cout << setprecision(t) << fixed << x << endl; }
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
fill((T *)array, (T *)(array + N), val);
}
inline ll mod(ll a, ll b) {
if (a > 0) return a % b;
if (a % b == 0) return 0;
ll x = -a / b + 1;
a += x * b;
return a % b;
}
// ll dx[4] = {1, 0, -1, 0};
// ll dy[4] = {0, 1, 0, -1};
signed main() {
IOS();
int a, b, c, d;
cin >> a >> b >> c >> d;
ll ans = 0;
for (int i = a; i <= b; i++) {
for (int j = c; j <= d; j++) {
if (i != j) ans++;
}
}
dump(ans);
return 0;
}
stretchybox