結果

問題 No.2154 あさかつの参加人数
ユーザー kaede2020kaede2020
提出日時 2022-12-09 21:31:24
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 981 ms / 2,000 ms
コード長 954 bytes
コンパイル時間 1,548 ms
コンパイル使用メモリ 166,220 KB
実行使用メモリ 5,504 KB
最終ジャッジ日時 2024-10-14 20:32:15
合計ジャッジ時間 22,092 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
//#include <atcoder/all>
//using namespace atcoder;
//using mint = modint1000000007;
//using mint = modint998244353;
template <typename T> bool chmax(T &u, const T z) { if (u < z) {u = z; return true;} else return false; }
template <typename T> bool chmin(T &u, const T z) { if (u > z) {u = z; return true;} else return false; }
#define ll long long
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
typedef pair<ll, int> P;
ll gcd(ll x, ll y) { return y ? gcd(y, x % y) : x; }
ll lcm(ll a, ll b){return a * b / gcd(a, b);}
const int N=50;
const int N2=2525;
#define RC(r, c) ((r) * N + (c))
#define R(rc) (rc / N)
#define C(rc) (rc % N)
double Randouble(){
	return 1.0*rand()/RAND_MAX;
}
int num[501010];
int main(){
  int n,m;
  cin>>n>>m;
  rep(i,m){
    int l,r;
    cin>>l>>r;
    num[l]--;
    num[r-1]++;
  }
  rep(i,500000)num[i+1]+=num[i];
  for(int i=n-1;i>=0;i--)cout<<num[i]<<endl;
  return 0;
}
0