Submission #42912174


Source Code Expand

def INPUT():
    H, W = list(map(int, input().split(' ')))
    AA = []
    for i in range(H):
        AA.append(list(input()))
    return H, W, AA
Ha, Wa, A = INPUT()
Hb, Wb, B = INPUT()
Hx, Wx, X = INPUT()


for hx1 in range(Hx):
    for wx1 in range(Wx):
        for hx2 in range(Hx):
            for wx2 in range(Wx):
                ans = [['.' for _ in range(Wx)] for i in range(Hx)]
                try:
                    for ha in range(Ha):
                        for wa in range(Wa):
                            if A[ha][wa] == '#':
                                ans[hx1 + ha][wx1 + wa] = '#'
                    for hb in range(Hb):
                        for wb in range(Wb):
                            if B[hb][wb] == '#':
                                ans[hx2 + hb][wx2 + wb] = '#'
                except:
                    continue
                if ans == X:
                    print('Yes')
                    exit()
print('No')

Submission Info

Submission Time
Task C - Ideal Sheet
User cocodrips
Language Python (3.8.2)
Score 0
Code Size 991 Byte
Status WA
Exec Time 325 ms
Memory 9196 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 4
AC × 24
WA × 8
Set Name Test Cases
Sample example_00.txt, example_01.txt, example_02.txt, example_03.txt
All example_00.txt, example_01.txt, example_02.txt, example_03.txt, hand_00.txt, hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, hand_06.txt, hand_07.txt, random2_00.txt, random2_01.txt, random2_02.txt, random2_03.txt, random2_04.txt, random2_05.txt, random2_06.txt, random2_07.txt, random2_08.txt, random2_09.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt
Case Name Status Exec Time Memory
example_00.txt AC 21 ms 9036 KiB
example_01.txt AC 18 ms 9076 KiB
example_02.txt AC 21 ms 9192 KiB
example_03.txt AC 18 ms 9072 KiB
hand_00.txt AC 18 ms 8920 KiB
hand_01.txt WA 325 ms 8932 KiB
hand_02.txt WA 117 ms 9144 KiB
hand_03.txt AC 115 ms 9028 KiB
hand_04.txt AC 18 ms 9196 KiB
hand_05.txt AC 21 ms 9072 KiB
hand_06.txt AC 17 ms 9080 KiB
hand_07.txt AC 17 ms 9196 KiB
random2_00.txt AC 26 ms 8928 KiB
random2_01.txt AC 109 ms 9060 KiB
random2_02.txt AC 79 ms 9048 KiB
random2_03.txt AC 45 ms 8912 KiB
random2_04.txt AC 99 ms 9068 KiB
random2_05.txt WA 77 ms 9000 KiB
random2_06.txt AC 19 ms 8912 KiB
random2_07.txt AC 97 ms 9076 KiB
random2_08.txt AC 58 ms 8912 KiB
random2_09.txt WA 36 ms 8936 KiB
random_00.txt WA 130 ms 9000 KiB
random_01.txt AC 102 ms 9008 KiB
random_02.txt AC 100 ms 8932 KiB
random_03.txt WA 162 ms 9076 KiB
random_04.txt WA 143 ms 9056 KiB
random_05.txt AC 89 ms 9028 KiB
random_06.txt AC 112 ms 9164 KiB
random_07.txt WA 104 ms 8912 KiB
random_08.txt AC 33 ms 9080 KiB
random_09.txt AC 29 ms 8928 KiB