結果
| 問題 |
No.2154 あさかつの参加人数
|
| コンテスト | |
| ユーザー |
umezo
|
| 提出日時 | 2022-12-09 22:19:23 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 136 ms / 2,000 ms |
| コード長 | 469 bytes |
| コンパイル時間 | 1,831 ms |
| コンパイル使用メモリ | 194,228 KB |
| 最終ジャッジ日時 | 2025-02-09 08:18:17 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(v) v.begin(),v.end()
typedef long long ll;
#include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
std::cin.tie(nullptr);
int n,m;
cin>>n>>m;
vector<int> L(m),R(m);
rep(i,m) cin>>L[i]>>R[i];
vector<int> A(500500);
rep(i,m){
A[R[i]]++;
A[L[i]+1]--;
}
for(int i=1;i<500500;i++) A[i]+=A[i-1];
for(int i=n;i>0;i--) cout<<A[i]<<'\n';
return 0;
}
umezo