結果
問題 |
No.2154 あさかつの参加人数
|
ユーザー |
👑 ![]() |
提出日時 | 2022-12-10 00:17:50 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 409 ms / 2,000 ms |
コード長 | 498 bytes |
コンパイル時間 | 1,828 ms |
コンパイル使用メモリ | 194,296 KB |
最終ジャッジ日時 | 2025-02-09 08:58:52 |
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
#include<bits/stdc++.h> using namespace std; #define rep(i,a,b) for(int i=a;i<b;i++) using ll = long long; template<class T> bool chmin(T &a,const T b){if(a>b){a=b;return 1;}return 0;} template<class T> bool chmax(T &a,const T b){if(a<b){a=b;return 1;}return 0;} const int INF = (1<<30)-1; #define all(p) p.begin(),p.end() int main(){ int N,M; cin>>N>>M; vector<int> p(N+1); rep(i,0,M){ int a,b; cin>>a>>b; p[N-a]++; p[N+1-b]--; } rep(i,0,N){ cout<<p[i]<<"\n"; p[i+1]+=p[i]; } }