結果

問題 No.2154 あさかつの参加人数
ユーザー mobchanmobchan
提出日時 2023-05-02 07:37:12
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 1,846 ms / 2,000 ms
コード長 707 bytes
コンパイル時間 16,935 ms
コンパイル使用メモリ 170,884 KB
実行使用メモリ 212,708 KB
最終ジャッジ日時 2024-05-01 01:00:08
合計ジャッジ時間 52,127 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,803 ms
55,808 KB
testcase_01 AC 1,821 ms
56,064 KB
testcase_02 AC 1,801 ms
56,192 KB
testcase_03 AC 1,846 ms
55,808 KB
testcase_04 AC 1,791 ms
56,064 KB
testcase_05 AC 232 ms
54,016 KB
testcase_06 AC 885 ms
55,040 KB
testcase_07 AC 1,113 ms
55,424 KB
testcase_08 AC 1,354 ms
55,424 KB
testcase_09 AC 849 ms
44,544 KB
testcase_10 AC 1,014 ms
55,040 KB
testcase_11 AC 1,597 ms
55,912 KB
testcase_12 AC 1,094 ms
55,040 KB
testcase_13 AC 499 ms
54,272 KB
testcase_14 AC 1,056 ms
55,040 KB
testcase_15 AC 1,176 ms
55,552 KB
testcase_16 AC 1,223 ms
55,296 KB
testcase_17 AC 1,101 ms
55,424 KB
testcase_18 AC 1,353 ms
55,680 KB
testcase_19 AC 228 ms
37,632 KB
testcase_20 AC 1,361 ms
55,680 KB
testcase_21 AC 770 ms
41,704 KB
testcase_22 AC 1,476 ms
53,608 KB
testcase_23 AC 1,373 ms
55,424 KB
testcase_24 AC 1,569 ms
212,708 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (114 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

using System;
using System.Linq;

class Program
{
    static void Main(string[] args)
    {
        var input = Console.ReadLine().Split().Select(int.Parse).ToArray();
        var N = input[0];
        var M = input[1];
        var days = new int[N + 1];

        for (int i = 1; i <= M; i++)
        {
            var temp = Console.ReadLine().Split().Select(int.Parse).ToArray();
            var L = temp[0];
            var R = temp[1];
            days[N - L]++;
            days[N - R + 1]--;
        }

        for (int i = 1; i < N; i++)
        {
            days[i] += days[i - 1];
        }


        for (int i = 0; i < N; i++)
        {
            Console.WriteLine(days[i]);
        }
    }
}
0