Тёмный

CSES - Restaurant Customers explained and solved completely in HINDI 

Deepak Joshi
Подписаться 358
Просмотров 1,2 тыс.
50% 1

CSES PROBLEM SET
Question link: cses.fi/proble...
You are given the arrival and leaving times of n customers in a restaurant.
What was the maximum number of customers in the restaurant at any time?
Input
The first input line has an integer n: the number of customers.
After this, there are n lines that describe the customers. Each line has two integers a and b: the arrival and leaving times of a customer.
You may assume that all arrival and leaving times are distinct.
Output
Print one integer: the maximum number of customers.
Input:
3
5 8
2 4
3 9
Output:
2

Опубликовано:

 

28 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 3   
@AmanSinghRawat-ug6fr
@AmanSinghRawat-ug6fr 2 месяца назад
very nice explanation
@trickydirector2584
@trickydirector2584 Год назад
Thank you for this amazing explanation!
@utsavupadhyay1797
@utsavupadhyay1797 Год назад
hmmmmm..............................ye bhi achi approach hai
Далее
КОТЯТА В ОПАСНОСТИ?#cat
00:36
Просмотров 921 тыс.
Дикий Бармалей разозлил всех!
01:00
Hash Tables and Hash Functions
13:56
Просмотров 1,6 млн
Postgres just got even faster
26:42
Просмотров 30 тыс.
КОТЯТА В ОПАСНОСТИ?#cat
00:36
Просмотров 921 тыс.