Masala #AZ46KUQOFN
Sotib olish mumkinmi ?
Har bir do'konda bir pachkasida N ta ruchka bo'lgan ruchkalar to'plami sotiladi , siz hech qaysi pachkani buzmasdan aynan K ta ruchka olmoqchisiz buni qila olasizmi? Eslatib o'tamiz har bir do'kondan faqatgina bitta mahsulot harid qilish mumkin
N va K nechta magazin borligi hamda sotib olmoqchi bo'lgan ruchkalar soni
Keyingi qatorda har bir do'konda bir packasida nechta ruchka borligini ifodalovchi sonlar beriladi. Hech qaysi son 1000dan oshib ketmaydi
Agar sotib ola olsangiz ‘yes’ aks holda ‘no’ deb chiqaring.
# | input.txt | output.txt |
---|---|---|
1 |
3 6 3 4 3 |
yes |

Birinchi testda :
N=3 va K=6
Ni=[3,4,3]
Siz 1chi va 3chi do'konlardan pachkasida 3 ta ro'chka bo'lgan ro'chkalarni hamda 3chi do'kondan pachkasida 3 ta ro'chka bo'lgan ro'chkalar to'plamini olasiz va sizda jami 6 ta ro'chka bo'ladi shuning uchun javob ‘yes’