結果

問題 No.2154 あさかつの参加人数
ユーザー t98slidert98slider
提出日時 2022-12-09 21:24:33
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 176 ms / 2,000 ms
コード長 413 bytes
コンパイル時間 1,582 ms
コンパイル使用メモリ 163,332 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-22 19:31:02
合計ジャッジ時間 8,727 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 147 ms
6,816 KB
testcase_01 AC 154 ms
6,944 KB
testcase_02 AC 176 ms
6,944 KB
testcase_03 AC 156 ms
6,940 KB
testcase_04 AC 158 ms
6,944 KB
testcase_05 AC 62 ms
6,944 KB
testcase_06 AC 110 ms
6,944 KB
testcase_07 AC 72 ms
6,944 KB
testcase_08 AC 74 ms
6,944 KB
testcase_09 AC 21 ms
6,944 KB
testcase_10 AC 65 ms
6,944 KB
testcase_11 AC 139 ms
6,940 KB
testcase_12 AC 100 ms
6,944 KB
testcase_13 AC 54 ms
6,940 KB
testcase_14 AC 111 ms
6,940 KB
testcase_15 AC 67 ms
6,940 KB
testcase_16 AC 105 ms
6,944 KB
testcase_17 AC 119 ms
6,944 KB
testcase_18 AC 133 ms
6,944 KB
testcase_19 AC 9 ms
6,944 KB
testcase_20 AC 103 ms
6,944 KB
testcase_21 AC 18 ms
6,940 KB
testcase_22 AC 36 ms
6,944 KB
testcase_23 AC 119 ms
6,940 KB
testcase_24 AC 141 ms
6,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n, m;
    cin >> n >> m;
    vector<int> s(n + 1);
    int l, r;
    for(int i = 0; i < m; i++){
        cin >> l >> r;
        s.rbegin()[l]++;
        s.rbegin()[r - 1]--;
    }
    for(int i = 0; i < n; i++){
        cout << s[i] << '\n';
        s[i + 1] += s[i];
    }
}
0