結果

問題 No.2154 あさかつの参加人数
ユーザー 👑 CleyL
提出日時 2022-12-20 23:36:22
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 826 ms / 2,000 ms
コード長 291 bytes
コンパイル時間 690 ms
コンパイル使用メモリ 71,368 KB
最終ジャッジ日時 2025-02-09 17:29:05
ジャッジサーバーID
(参考情報)
judge1 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
using namespace std;
int main(){
  int n,m;cin>>n>>m;
  vector<int> A(n+1);
  for(int i = 0; m > i; i++){
    int x,y;cin>>x>>y;
    A[n-x]++;
    A[n-y+1]--;
  }
  int nw = 0;
  for(int i = 0; n > i; i++){
    nw += A[i];
    cout << nw << endl;
  }
}
0