Submission #65241185


Source Code Expand

import sys, math
input = sys.stdin.readline
INF = 1 << 60

t = input().strip()
u = input().strip()

for i in range(len(t)-len(u)+1):
    s = t[i:i+len(u)]
    cnt = 0
    for i, j in zip(s, u):
        if i == j or i == '?':
            cnt += 1
    if cnt == len(u):
        print('Yes')
        sys.exit()
print('No')

Submission Info

Submission Time
Task B - Four Hidden
User yyyy7089
Language Python (PyPy 3.10-v7.3.12)
Score 250
Code Size 337 Byte
Status AC
Exec Time 58 ms
Memory 76752 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 250 / 250
Status
AC × 3
AC × 25
Set Name Test Cases
Sample 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt
All 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.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, 01_random_20.txt, 02_handmade_01.txt, 02_handmade_02.txt
Case Name Status Exec Time Memory
00_sample_01.txt AC 56 ms 76560 KiB
00_sample_02.txt AC 56 ms 76288 KiB
00_sample_03.txt AC 56 ms 76604 KiB
01_random_01.txt AC 57 ms 76520 KiB
01_random_02.txt AC 56 ms 76580 KiB
01_random_03.txt AC 57 ms 76216 KiB
01_random_04.txt AC 57 ms 76288 KiB
01_random_05.txt AC 58 ms 76580 KiB
01_random_06.txt AC 58 ms 76336 KiB
01_random_07.txt AC 58 ms 76348 KiB
01_random_08.txt AC 56 ms 76544 KiB
01_random_09.txt AC 57 ms 76516 KiB
01_random_10.txt AC 57 ms 76752 KiB
01_random_11.txt AC 57 ms 76652 KiB
01_random_12.txt AC 57 ms 76584 KiB
01_random_13.txt AC 57 ms 76312 KiB
01_random_14.txt AC 57 ms 76340 KiB
01_random_15.txt AC 57 ms 76280 KiB
01_random_16.txt AC 57 ms 76368 KiB
01_random_17.txt AC 56 ms 76752 KiB
01_random_18.txt AC 56 ms 76664 KiB
01_random_19.txt AC 57 ms 76428 KiB
01_random_20.txt AC 56 ms 76340 KiB
02_handmade_01.txt AC 56 ms 76324 KiB
02_handmade_02.txt AC 56 ms 76224 KiB