
푼 날짜 : 2024.12.09푼 문제 : [5430] / AC사용한 언어 : python알고리즘 : 문자열, 파싱, 덱 접근방식 :처음에는 배열을 수행 값 마다 변경해서 시간 초과가 났다.따라서 인덱스 위치와 방향 값만 체크 후 그에 따라 출력을 해주었다. 코드 :import sysinput = sys.stdin.readlineT = int(input())for _ in range(T): p_list = list(input().rstrip()) n = int(input()) n_list = list(input().rstrip()) lst = [] # 문자열로 받은 숫자 처리를 위함 now_str = '' for i in n_list: if ..