結果
問題 |
No.799 赤黒かーどげぇむ
|
ユーザー |
![]() |
提出日時 | 2019-07-05 19:52:10 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 228 bytes |
コンパイル時間 | 292 ms |
コンパイル使用メモリ | 28,160 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-22 04:42:26 |
合計ジャッジ時間 | 853 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
#include<stdio.h> int main() { int a, b, c, d; scanf("%d %d %d %d", &a, &b, &c, &d); int ans = (b - a + 1) * (d - c + 1); if (c > a)a = c; if (d < b)b = d; if (a <= b) ans -= b - a + 1; printf("%d\n", ans); return 0; }