結果
問題 |
No.3039 配信者
|
ユーザー |
|
提出日時 | 2025-02-28 21:44:10 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 179 ms / 2,000 ms |
コード長 | 625 bytes |
コンパイル時間 | 3,468 ms |
コンパイル使用メモリ | 275,320 KB |
実行使用メモリ | 6,876 KB |
最終ジャッジ日時 | 2025-02-28 21:44:18 |
合計ジャッジ時間 | 5,774 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 15 |
ソースコード
#include <bits/stdc++.h> using namespace std; // #include<atcoder/all> // using mint = atcoder::modint998244353; using ld = long double; #define fi first #define se second #define all(x) x.begin(), x.end() #define rep(i,n) for(int i=0;i<(int)(n);++i) #define chmax(a,b) a=max(a,b) #define chmin(a,b) a=min(a,b) int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int N,H; cin>>N>>H; vector<int> A(H+1,0); rep(i,N){ int a,b; cin>>a>>b; A[a]++; A[b+1]--; } rep(i,H) A[i+1]+=A[i]; int ans=0; rep(i,H+1) chmax(ans, A[i]); cout<<ans<<"\n"; }