結果
| 問題 |
No.2154 あさかつの参加人数
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-12-09 21:24:45 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 409 ms / 2,000 ms |
| コード長 | 300 bytes |
| コンパイル時間 | 2,232 ms |
| コンパイル使用メモリ | 192,984 KB |
| 最終ジャッジ日時 | 2025-02-09 07:08:21 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m; cin >> n >> m;
vector<int> cnt(n + 1);
while(m--){
int l, r; cin >> l >> r;
--cnt[l]; ++cnt[r-1];
}
for(int i = 0; i < n; ++i) cnt[i + 1] += cnt[i];
for(int i = 0; i < n; ++i) cout << cnt[n - 1 - i] << "\n";
}