結果

問題 No.2154 あさかつの参加人数
ユーザー aradarad
提出日時 2023-07-06 18:40:27
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 952 ms / 2,000 ms
コード長 477 bytes
コンパイル時間 7,559 ms
コンパイル使用メモリ 259,840 KB
実行使用メモリ 5,204 KB
最終ジャッジ日時 2023-09-27 19:35:26
合計ジャッジ時間 30,474 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 952 ms
5,020 KB
testcase_01 AC 947 ms
4,820 KB
testcase_02 AC 951 ms
4,952 KB
testcase_03 AC 932 ms
5,204 KB
testcase_04 AC 940 ms
4,852 KB
testcase_05 AC 157 ms
4,380 KB
testcase_06 AC 519 ms
4,376 KB
testcase_07 AC 536 ms
4,380 KB
testcase_08 AC 581 ms
4,404 KB
testcase_09 AC 350 ms
4,376 KB
testcase_10 AC 483 ms
4,376 KB
testcase_11 AC 813 ms
4,908 KB
testcase_12 AC 573 ms
4,380 KB
testcase_13 AC 270 ms
4,380 KB
testcase_14 AC 577 ms
4,380 KB
testcase_15 AC 561 ms
4,624 KB
testcase_16 AC 638 ms
4,380 KB
testcase_17 AC 592 ms
4,384 KB
testcase_18 AC 722 ms
4,384 KB
testcase_19 AC 80 ms
4,380 KB
testcase_20 AC 680 ms
4,792 KB
testcase_21 AC 308 ms
4,380 KB
testcase_22 AC 613 ms
4,856 KB
testcase_23 AC 721 ms
4,384 KB
testcase_24 AC 816 ms
4,572 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
using ll = long long;
#define rep(i, n) for (ll i = 0; i < ll(n); i++)

int main(){
    int n,m;
    cin >> n >> m;
    vector<int> imos(n+1);
    rep(i,m){
        int l,r;
        cin >> l >> r;
        r--;
        imos[r]++;
        imos[l]--;
    }
    rep(i,n) imos[i+1] += imos[i];
    reverse(imos.begin(),imos.end());
    for(int i = 1;i <= n;i++) cout << imos[i] << endl;
}
0