?
№ | Отправитель | Задача | Язык | Вердикт | Время | Память | Отослано | Протест. | |
---|---|---|---|---|---|---|---|---|---|
195770660 |
Дорешивание: iron_nicko |
1800E2 - 31 | PyPy 3-64 | Полное решение | 389 мс | 21296 КБ | 2023-03-03 10:17:06 | 2023-03-03 16:12:04 |
for _ in range(int(input())): n, k = map(int, input().split()) s1 = input() s2 = input() if n <= k: print("YES" if s1 == s2 else "NO") else: reg = n - k print("YES" if (sorted(s1) == sorted(s2) and s1[reg:-reg] == s2[reg:-reg]) else "NO")
?
?
?
?