結果
| 問題 |
No.2154 あさかつの参加人数
|
| コンテスト | |
| ユーザー |
srjywrdnprkt
|
| 提出日時 | 2023-05-05 14:31:42 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 934 ms / 2,000 ms |
| コード長 | 563 bytes |
| コンパイル時間 | 978 ms |
| コンパイル使用メモリ | 106,592 KB |
| 最終ジャッジ日時 | 2025-02-12 17:10:37 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
#include <iostream>
#include <vector>
#include <cmath>
#include <map>
#include <set>
#include <iomanip>
#include <queue>
#include <algorithm>
#include <numeric>
#include <deque>
#include <complex>
#include <cassert>
using namespace std;
using ll = long long;
int main(){
int N, M, L, R;
cin >> N >> M;
vector<int> S(N+5);
for (int i=0; i<M; i++){
cin >> R >> L;
S[R+1]++;
S[L]--;
}
for (int i=N+3; i>=0; i--){
S[i] += S[i+1];
}
for (int i=N+1; i>=2; i--) cout << S[i] << endl;
return 0;
}
srjywrdnprkt