Submission #55062273


Source Code Expand

S, T = input().split()
len_s = len(S)
len_t = len(T)

for w in range(1, len_s):  # w は |S| 未満
    for c in range(1, w + 1):  # c は w 以下
        ans = ''
        for j in range(0, len_s, w):
            s = S[j:j+w]
            if len(s) >= c:
                ans += s[c-1]  # c番目の文字を追加
        if ans == T:
            print('Yes')
            exit()
print('No')

Submission Info

Submission Time
Task B - Vertical Reading
User mu16
Language Python (PyPy 3.10-v7.3.12)
Score 200
Code Size 404 Byte
Status AC
Exec Time 65 ms
Memory 82056 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 29
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 01_random_16.txt, 01_random_17.txt, 01_random_18.txt, 01_random_19.txt, 02_corner_00.txt, 02_corner_01.txt, 02_corner_02.txt, 02_corner_03.txt, 02_corner_04.txt, 02_corner_05.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 56 ms 76704 KiB
00_sample_01.txt AC 57 ms 76220 KiB
00_sample_02.txt AC 59 ms 76556 KiB
01_random_00.txt AC 63 ms 81220 KiB
01_random_01.txt AC 62 ms 81844 KiB
01_random_02.txt AC 57 ms 76316 KiB
01_random_03.txt AC 64 ms 81848 KiB
01_random_04.txt AC 61 ms 81680 KiB
01_random_05.txt AC 57 ms 76448 KiB
01_random_06.txt AC 61 ms 81072 KiB
01_random_07.txt AC 65 ms 82056 KiB
01_random_08.txt AC 59 ms 76448 KiB
01_random_09.txt AC 65 ms 81672 KiB
01_random_10.txt AC 56 ms 76360 KiB
01_random_11.txt AC 62 ms 81868 KiB
01_random_12.txt AC 56 ms 76252 KiB
01_random_13.txt AC 64 ms 81720 KiB
01_random_14.txt AC 59 ms 81228 KiB
01_random_15.txt AC 63 ms 81476 KiB
01_random_16.txt AC 57 ms 76496 KiB
01_random_17.txt AC 58 ms 76248 KiB
01_random_18.txt AC 65 ms 81716 KiB
01_random_19.txt AC 63 ms 81448 KiB
02_corner_00.txt AC 56 ms 76396 KiB
02_corner_01.txt AC 64 ms 81556 KiB
02_corner_02.txt AC 63 ms 81624 KiB
02_corner_03.txt AC 63 ms 81772 KiB
02_corner_04.txt AC 64 ms 81664 KiB
02_corner_05.txt AC 65 ms 81504 KiB