結果

問題 No.799 赤黒かーどげぇむ
ユーザー chika0707chika0707
提出日時 2019-03-17 21:23:18
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 1,371 bytes
コンパイル時間 1,528 ms
コンパイル使用メモリ 70,324 KB
実行使用メモリ 24,820 KB
最終ジャッジ日時 2023-09-22 03:16:26
合計ジャッジ時間 3,556 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
20,752 KB
testcase_01 AC 55 ms
20,884 KB
testcase_02 AC 56 ms
20,720 KB
testcase_03 AC 56 ms
20,796 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 56 ms
22,708 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 56 ms
22,692 KB
testcase_14 AC 56 ms
18,780 KB
testcase_15 AC 56 ms
20,780 KB
testcase_16 AC 56 ms
20,756 KB
testcase_17 AC 56 ms
22,940 KB
testcase_18 WA -
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;
using static Input;

public class Prog
{
    private const int INF = 1000000007;
    private const long INFINITY = 9223372036854775807;
    public static void Main()
    {
        int A = NextInt();
        int B = NextInt();
        int C = NextInt();
        int D = NextInt();
        Console.WriteLine((B - A + 1) * (D - C + 1) - (Math.Max(0, B - C + 1)));
    }
}

public class Input
{
    private static Queue<string> q = new Queue<string>();
    private static void Confirm() { if (q.Count == 0) foreach (var s in Console.ReadLine().Split(' ')) q.Enqueue(s); }
    public static int NextInt() { Confirm(); return int.Parse(q.Dequeue()); }
    public static long NextLong() { Confirm(); return long.Parse(q.Dequeue()); }
    public static string NextString() { Confirm(); return q.Dequeue(); }
    public static double NextDouble() { Confirm(); return double.Parse(q.Dequeue()); }
    public static int[] LineInt() { return Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); }
    public static long[] LineLong() { return Console.ReadLine().Split(' ').Select(long.Parse).ToArray(); }
    public static string[] LineString() { return Console.ReadLine().Split(' ').ToArray(); }
    public static double[] LineDouble() { return Console.ReadLine().Split(' ').Select(double.Parse).ToArray(); }
}
0