結果
| 問題 |
No.2154 あさかつの参加人数
|
| コンテスト | |
| ユーザー |
yukster714
|
| 提出日時 | 2023-05-06 14:26:27 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 1,004 ms / 2,000 ms |
| コード長 | 349 bytes |
| コンパイル時間 | 680 ms |
| コンパイル使用メモリ | 71,252 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-23 22:15:33 |
| 合計ジャッジ時間 | 22,251 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
int n,m; cin>>n>>m;
vector<int>a(n);
for(int i=0;i<m;i++){
int l,r;cin>>l>>r;
a[n-l]++;
a[n-r+1]--;
}
for(int i=0;i<n;i++){
if(i>0) a[i]+=a[i-1];
}
for(int i=0;i<n;i++){
cout<<a[i]<<endl;
}
return 0;
}
yukster714