結果
問題 | No.799 赤黒かーどげぇむ |
ユーザー |
|
提出日時 | 2019-08-27 00:24:26 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 546 bytes |
コンパイル時間 | 1,700 ms |
コンパイル使用メモリ | 165,456 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-08 18:51:23 |
合計ジャッジ時間 | 2,727 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
/**@file 799.cpp@title No.799 赤黒かーどげぇむ - yukicoder</title@url https://yukicoder.me/problems/no/799**/#include <bits/stdc++.h>using namespace std;typedef long long LL;#define ALL(obj) (obj).begin(), (obj).end()#define REP(i, N) for (int i = 0; i < (N); ++i)int main() {int i;int A, B, C, D;cin >> A >> B >> C >> D;int ans = 0;for (i = A; i <= B; i++) {if (C <= i && i <= D) {ans += D - C + 1 - 1;} else {ans += D - C + 1;}}cout << ans << endl;return 0;}