結果

問題 No.799 赤黒かーどげぇむ
ユーザー devxsssdevxsss
提出日時 2019-03-19 19:30:01
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 359 bytes
コンパイル時間 401 ms
コンパイル使用メモリ 50,588 KB
実行使用メモリ 4,372 KB
最終ジャッジ日時 2023-10-12 05:20:35
合計ジャッジ時間 1,544 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 1 ms
4,368 KB
testcase_02 WA -
testcase_03 AC 1 ms
4,368 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 1 ms
4,372 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 1 ms
4,368 KB
testcase_11 AC 1 ms
4,368 KB
testcase_12 AC 1 ms
4,368 KB
testcase_13 AC 2 ms
4,372 KB
testcase_14 AC 1 ms
4,368 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 1 ms
4,372 KB
testcase_18 AC 2 ms
4,368 KB
testcase_19 AC 2 ms
4,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <stdio.h>
using namespace std;

int main()
{   int n,r,n2,r2,result,result2;
    scanf("%d %d %d %d",&n,&r,&n2,&r2);
    int s=r-n+1;
    int k=r2-n2+1;
    int ma=max(n,n2);
    int mi=min(r,r2);
    int tot=ma-mi;
    if(tot>0){
    cout<<s*k<<endl;
    }
    else{
        cout<<s*k-(tot+1)<<endl;
    }
    


    return 0;
}
0