結果
問題 | No.2154 あさかつの参加人数 |
ユーザー |
![]() |
提出日時 | 2022-12-09 21:39:11 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 993 ms / 2,000 ms |
コード長 | 498 bytes |
コンパイル時間 | 1,763 ms |
コンパイル使用メモリ | 168,204 KB |
実行使用メモリ | 7,168 KB |
最終ジャッジ日時 | 2024-10-14 21:07:39 |
合計ジャッジ時間 | 22,783 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
//B #include <bits/stdc++.h> //#include <atcoder/all> using namespace std; using ll = long long; #define ALL(a) (a).begin(),(a).end() using v_vll = vector<vector<ll>>; int main(){ ll n,m;cin>>n>>m; vector<ll> data(n+10); ll l,r; for(ll i=0;i<m;i++){ cin>>l>>r; data[n-l]++; data[n-r+1]--; } for(ll i=1;i<n+5;i++){ data[i]+=data[i-1]; } for(ll i=0;i<n;i++){ cout<<data[i]<<endl; } //5,4,3,2,1 // ,1, , , ,-1 , , }