Создан заказ №10052974
12 сентября 2023
A long time ago one man said that he had explored the corridors of one
Как заказчик описал требования к работе:
A long time ago one man said that he had explored the corridors of one cave. This means that he was in all corridors of the cave. Corridors are really horizontal or vertical segments. A corridor is treated as visited if he was in at least one point of the corridor.
Now you want to know if this is t
rue. You have a map of the cave, and you know that the explorer used the following algorithm: he turns left if he can, if he can't he goes straight, if he can't he turns right, if he can't he turns back. Exploration ends when the man reaches the entry point for the second time. Your task to count how many corridors weren't visited by explorer.
Input
In the first line there is an integer T (T <= 20) - the number of different maps. For each map in the first line there is an integer N (N <= 1000) - the number of corridors. It is known that no two vertical corridors have a common point and no two horizontal corridors have a common point. The next N lines contain the following information: the
подробнее
Заказчик
заплатил
заплатил
20 ₽
Заказчик не использовал рассрочку
Гарантия сервиса
Автор24
Автор24
20 дней
Заказчик принял работу без использования гарантии
13 сентября 2023
Заказ завершен, заказчик получил финальный файл с работой
5
A long time ago one man said that he had explored the corridors of one.jpg
2023-09-16 15:42
Последний отзыв студента о бирже Автор24
Общая оценка
5
Положительно
Всё отлично, верно сделано! Рекомендую выбирать этого автора! Спасибо вам большое!!!