結果
問題 |
No.3039 配信者
|
ユーザー |
|
提出日時 | 2025-02-28 21:26:26 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 240 ms / 2,000 ms |
コード長 | 363 bytes |
コンパイル時間 | 2,110 ms |
コンパイル使用メモリ | 195,896 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2025-02-28 21:26:38 |
合計ジャッジ時間 | 5,662 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 15 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int N,H; cin >> N >> H; vector<int> S(H+1); while(N--){ int a,b; cin >> a >> b; S.at(a)++; S.at(b+1)--; } for(int i=1; i<=H; i++) S.at(i) += S.at(i-1); cout << *max_element(S.begin(),S.end()) << endl; }