結果
| 問題 |
No.2796 Small Matryoshka
|
| コンテスト | |
| ユーザー |
noya2
|
| 提出日時 | 2024-06-13 14:48:02 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 421 ms / 2,000 ms |
| コード長 | 334 bytes |
| コンパイル時間 | 3,128 ms |
| コンパイル使用メモリ | 250,224 KB |
| 実行使用メモリ | 19,712 KB |
| 最終ジャッジ日時 | 2024-06-13 14:51:47 |
| 合計ジャッジ時間 | 7,951 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 19 |
ソースコード
#include<bits/stdc++.h>
int main(){
int n; std::cin >> n;
std::map<int,int> mp;
while (n--){
int l, r; std::cin >> l >> r;
mp[l]++;
mp[r]--;
}
int ans = 0, cur = 0;
for (auto [x, c] : mp){
cur += c;
ans = std::max(ans, cur-1);
}
std::cout << ans << std::endl;
}
noya2