結果
問題 | No.799 赤黒かーどげぇむ |
ユーザー |
|
提出日時 | 2020-02-05 10:30:01 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 222 bytes |
コンパイル時間 | 210 ms |
コンパイル使用メモリ | 22,912 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-22 05:37:29 |
合計ジャッジ時間 | 845 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:6:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d %d %d %d",&A,&B,&C,&D); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <cstdio>#define max(a,b) (a>b ? a:b)#define min(a,b) (a<b ? a:b)int main(){int A,B,C,D;scanf("%d %d %d %d",&A,&B,&C,&D);printf("%d\n",(B-A+1)*(D-C+1)-max(min(B,D)-max(A,C)+1,0));return 0;}