Softeer [21년 재직자 대회 예선] 비밀 메뉴 (난이도 2)

Yibangwon·2022년 8월 21일
0

알고리즘 문제풀이

목록 보기
52/60


정답 코드

import sys
m, n, k = map(int, sys.stdin.readline().split())
num = list(map(int, input().split()))
pushed = list(map(int, input().split()))

ans = 'normal'
for i in range(len(pushed)):
    check = False
    if pushed[i] == num[0]:
        check = True
        for j in range(1, m):
            if i + j >= len(pushed):
                check = False
            elif pushed[i + j] != num[j]:
                check = False
        if check:
            ans = 'secret'
print(ans)

후기

없음

profile
I Don’t Hope. Just Do.

0개의 댓글