結果

問題 No.3039 配信者
ユーザー kotatsugame
提出日時 2025-02-28 21:27:15
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 176 ms / 2,000 ms
コード長 331 bytes
コンパイル時間 597 ms
コンパイル使用メモリ 60,956 KB
実行使用メモリ 7,544 KB
最終ジャッジ日時 2025-02-28 21:27:21
合計ジャッジ時間 3,697 ms
ジャッジサーバーID
(参考情報)
judge4 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<cassert>
using namespace std;
int N,H;
int imos[1<<20];
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	cin>>N>>H;
	for(;N--;)
	{
		int a,b;cin>>a>>b;
		imos[a]++;
		imos[b+1]--;
	}
	int ans=0;
	for(int i=0;i<H;i++)
	{
		imos[i+1]+=imos[i];
		ans=max(ans,imos[i]);
	}
	cout<<ans<<endl;
}
0