結果
問題 | No.2154 あさかつの参加人数 |
ユーザー | 👑 CleyL |
提出日時 | 2022-12-20 23:36:22 |
言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 990 ms / 2,000 ms |
コード長 | 291 bytes |
コンパイル時間 | 617 ms |
コンパイル使用メモリ | 73,088 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-18 02:10:55 |
合計ジャッジ時間 | 21,644 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
#include <iostream> #include <vector> using namespace std; int main(){ int n,m;cin>>n>>m; vector<int> A(n+1); for(int i = 0; m > i; i++){ int x,y;cin>>x>>y; A[n-x]++; A[n-y+1]--; } int nw = 0; for(int i = 0; n > i; i++){ nw += A[i]; cout << nw << endl; } }