- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
Repititions CSES Problemset | Introductory Problems
Anyways, Let's just do the editorial in here.
Here is my logic about the problem. I can just check the previous index of s[i] with a restriction that the for loop of i have to start from 1 so that it could check the 0 index otherwise it is out of range error. Now, I just made two variables ANS and C. ANS is the answer which is always set to 1 and C is count which will update after the for loop has ended. Now after leaving the if statement, I would check the max between ans(which is just 1) and c(which will get updated after the loop) and outside the loop, I would print it. Any questions in the comments section would be answered ASAP.
Видео Repititions CSES Problemset | Introductory Problems канала The Math Maestro
Here is my logic about the problem. I can just check the previous index of s[i] with a restriction that the for loop of i have to start from 1 so that it could check the 0 index otherwise it is out of range error. Now, I just made two variables ANS and C. ANS is the answer which is always set to 1 and C is count which will update after the for loop has ended. Now after leaving the if statement, I would check the max between ans(which is just 1) and c(which will get updated after the loop) and outside the loop, I would print it. Any questions in the comments section would be answered ASAP.
Видео Repititions CSES Problemset | Introductory Problems канала The Math Maestro
Комментарии отсутствуют
Информация о видео
6 марта 2026 г. 19:08:14
00:02:53
Другие видео канала


