結果

問題 No.2154 あさかつの参加人数
ユーザー kaede2020kaede2020
提出日時 2022-12-09 21:29:44
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
RE  
実行時間 -
コード長 954 bytes
コンパイル時間 1,873 ms
コンパイル使用メモリ 162,856 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-22 20:42:11
合計ジャッジ時間 6,824 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 AC 176 ms
5,376 KB
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 AC 84 ms
5,376 KB
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
権限があれば一括ダウンロードができます

ソースコード

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[101010];
int main(){
  int n,m;
  cin>>n>>m;
  rep(i,m){
    int l,r;
    cin>>l>>r;
    num[l]--;
    num[r-1]++;
  }
  rep(i,100000)num[i+1]+=num[i];
  for(int i=n-1;i>=0;i--)cout<<num[i]<<endl;
  return 0;
}
0