Masala #1002

Xotira 16 MB Vaqt 1000 ms
14
Muallif: **

Kuzatuv kamerasi

Jahongir do'koniga bir yil avval kamera olib kelgan edi. Bu kamera doimo videoga olib turadi agar svet o'chmagan bo`lsa. Bugun kamera qarab turgan yo'ldan bir mashina yuqori tezlikda o'tib ketgan ekan. Endi kameraning video tasmasini ko`rish uchun yo`l harakati inspektori Jahongirning do'konga keldi. Jahongirga ular mashina qachon bu yo'ldan o`tganini aytadi \(\text{YYYY.OO.KK}\) bular mos ravishda \(\text{YYYY}\) - Yil , \(\text{OO}\) - Oy , \(\text{KK}\) esa - Kun va bulardan keyin \(\text{HH:MM:SS}\) kiritiladi bular mos ravishda \(\text{HH}\) - soat , \(\text{MM}\) - sekund , \(\text{SS}\) - soniya kiritiladi. Jahongirning do'koni shaharda bo'lmaganligi sababli ularning do'konida svet ham tez-tez o`chib turar edi. Agar svet o`chsa kamera ishlamaydi. Kamera har 15 kunda yozib olgan video tasmalarni o'chirib tashlaydi. Jahongir sizga kamera yozib olishni boshlagan vaqtni aytadi \(\text{YYYY.OO.KK}\)  va undan keyin \(\text{HH:MM:SS}\)

Kamera xotirasi cheksiz emas, faqatgina oxirgi 15 kunlikni yoza oladi, eski videolar avtomatik ravishda o'chiriladi.


Kiruvchi ma'lumotlar:
  • Birinchi qatorda kamera yozib olishni boshlagan sana \(\text{YYYY.OO.KK}\)  \((2022 \le YYYY \le 2023)(1 \le OO \le 12) (1 \le KK \le 31)\) va probeldan so'ng esa vaqtlar kiritiladi \(\text{HH:MM:SS}\) \(( 1 \le HH,MM,SS \le 60)\)
  • Ikkinchi qatorda esa T \((1 \le T \le 20)\) yani svet o'chib qolgan paytlar soni
  • Keyingi T ta qatorda \(\text{YYYY.OO.KK}\)  \((2022 \le YYYY \le 2023)(1 \le OO \le 12)(1 \le KK \le 31)\) probeldan so'ng esa HH:MM:SS \((1 \le HH , MM,SS \le 60)\) svet o'chgan payt. Keyingi qatorda xuddi shuncha ma'lumot yani svet yongan payt kiritiladi
  • Keyingi qatorda esa yo'l harakati inspektorlari mashina qachon bu yo'ldan o'tganligi kiritiladi \(\text{YYYY.OO.KK}\) \((2022 \le YYYY \le 2023)(1 \le OO \le 12)(1 \le KK \le 31)\) probeldan so'ng esa vaqtlari kiritiladi \(\text{HH:MM:SS}\) \((1 \le HH,MM,SS \le 60)\)

Chiquvchi ma'lumotlar:

Agar mashina o'tgan paytda svet yoq bo'lsa "Svet yo'q edi" deb chop eting. Agar inspektor xodimlar aytgan vaqt kamerani 15 kunligi ichida bo'lmasa "Videolar o'chib ketdi" deb aks holda "Aybdor topildi" deb chop eting


Misollar
# input.txt output.txt
1
2022.12.31 00:00:00
1
2023.01.01 12:31:12 2023.01.01 13:31:59 
2023.01.13 14:52:00
Aybdor topildi
2
2022.02.08 19:57:12
3
2022.02.09 18:00:01 2022.02.10 00:00:00
2022.02.11 10:12:12 2022.02.11 12:12:12
2022.02.15 15:31:00 2022.02.15 15:32:00
2022.02.15 15:32:01
Aybdor topildi
3
2022.12.22 13:01:59
5
2022.12.22 13:22:09 2022.12.23 13:22:09
2022.12.24 15:09:58 2022.12.24 16:09:19
2022.12.25 00:59:09 2022.12.25 17:08:59
2022.12.30 12:35:09 2023.01.03 00:00:00
2023.01.06 01:59:59 2023.01.06 02:45:59
2023.01.06 02:44:00
Svet yo'q edi
4
2023.12.09 00:00:00
6
2023.12.09 00:01:00 2023.12.09 12:01:19
2023.12.10 09:19:09 2023.12.11 13:09:18 
2023.12.13 19:09:10 2023.12.13 20:02:12
2023.12.15 10:09:10 2023.12.16 06:09:10
2023.12.16 11:11:11 2023.12.16 12:00:25
2023.12.20 11:09:19 2023.12.24 18:09:00
2023.12.24 18:08:59
Videolar o'chib ketdi
5
2023.09.09 09:19:09
1
2023.09.10 00:59:59 2023.09.23 19:57:10
2023.09.10 01:00:00
Svet yo'q edi
Izoh:

1-test :

2022-yil 30-dekabrdan 31-dekabrga o'tish kechasi kamera yangidan video olishni boshlagan. Svet 2023 yil yanvarning 1-kunida soat 12:31 dan 12 soniya o'tganda o'chgan va o'sha kuni soat 13:31 dan 59 soniya o'tganda svet yongan. Kamera qarab turgan yo'ldan 2023-yilning yanvar oyining 13-kunida soat 14:52 dan 00 soniya o'tganda bu yo'ldan o'tgan. Jahongirning do'konidagi kamerasi 15 kun davomida video tasmaga muhrlab boradi. Demak 31-dekabrdan videoga olishni boshlagan bo'lsa 13-yanvargacha 14 kunu 8 menut kam 15 soat bo'lgan. Demak yo'l patrul inspektori bu videoni ko'ra oladi! 

Agar mashina kamera videoni yozib borishdan keyin 15-kun 00:00:00 da bo'lsa ham "Aybdor topildi" deb chop etilsin