A. Count
Xotira: 3 MB, Vaqt: 1000 msSizga s satrberiladi,siz s satrda nechta harf ,nechta raqam,nechta iboralar borligini aniqlashingiz kerak bo'ladi.
Bitta qatorda s satri kiritiladi(len(s)≤10^5)
Probel bilan ajrayilgan holda m,n,k,l sonlarini chop eting,ya'ni nechta harflar,nechta sonlar, nechta iboralar va nechta amallar borligini.
Bo'luv deganda / va : ni nazarda tutilgan.Iboralarga , . ! ; ‘ " ` & # \ lar kiritilgan.Count ni ishlatish ma'n etiladi!
# | INPUT.TXT | OUTPUT.TXT |
---|---|---|
1 |
10 |
2 |
2 |
-10c |
1 2 1 |
B. Uchning darajasi
Xotira: 20 MB, Vaqt: 1050 msSizga n soni beriladi siz agar n soni 3 ning qaysidir darajasi bo'lsa Yes aks holda No ni chop eting.
Kirish faylida n soni beriladi 0≤n≤1000**1000
Masalani javobini chop eting.
# | INPUT.TXT | OUTPUT.TXT |
---|---|---|
1 |
9 |
Yes |
C. 3 lik ifoda#1
Xotira: 32 MB, Vaqt: 1050 msSizga N soni beriladi, siz N sonini [1,1000000] ketma-ketlik ichida 4 ta 1ta 3 va 0 sonlaridan tashkil topgan sonlar va amallar yordamida ifodalashingiz kerak bo'ladi(faqat 1ta 3 qatnashishi shart!).Agar javobi chiqmasa "It's impossible" so'zini chop eting.
Bitta qatorda N soni kiritiladi -10**18≤N≤10**18
Masalani javobini probellarsiz chop eting. Agar javoblar bir nechta bo'lsa - va + ko'p qatnashgan ifodani chop eting.Javob aniqligi kafolatlanadi.
# | INPUT.TXT | OUTPUT.TXT |
---|---|---|
1 |
9 |
3+3*3-3 |
2 |
102 |
It's impossible |
D. Snake game
Xotira: 32 MB, Vaqt: 1000 msSizga A massiv beriladi siz A massiv ichidagi sonlardan ilon izini hosil qilish mumkinmi yo'qmi shunitekshiring.
A massiv kiritiladi(1≤len(A)≤81).A massiv ichida bir hil sonlar qatnashmagan!
Agar ilon izi hosil bo'lsa jadvalni va Game so'zini chop eting,agar ilon izi chiqamasa Game over! so'zini chop eting.
# | INPUT.TXT | OUTPUT.TXT |
---|---|---|
1 |
1 9 41 77 |
* * * * * * * * * 0 0 0 0 0 0 0 * 0 0 0 0 0 0 0 * 0 0 0 0 0 0 0 * 0 0 0 0 0 0 0 * 0 0 0 0 0 0 0 0 * 0 0 0 0 0 0 0 0 * 0 0 0 0 0 0 0 0 * 0 0 0 0 0 0 0 0 * 0 0 0 0 Game |
2 |
5 73 |
0 0 0 0 * 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 * 0 0 0 0 0 0 0 0 Game over! |