結果
問題 |
No.2154 あさかつの参加人数
|
ユーザー |
|
提出日時 | 2025-09-03 15:27:23 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 159 ms / 2,000 ms |
コード長 | 400 bytes |
コンパイル時間 | 3,132 ms |
コンパイル使用メモリ | 276,000 KB |
実行使用メモリ | 7,720 KB |
最終ジャッジ日時 | 2025-09-03 15:27:35 |
合計ジャッジ時間 | 11,668 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int N, M; cin >> N >> M; vector<int> V(N + 1); for (int i = 0; i < M; ++i) { int l, r; cin >> l >> r; V[N - l]++; V[N - r + 1]--; } for (int i = 0; i < N; ++i) { cout << V[i] << '\n'; V[i + 1] += V[i]; } }