-
[Softeer] 비밀메뉴 (lv.2)ALGORITHM/SWEXPERT|SOFTEER 2022. 1. 16. 22:17
https://softeer.ai/practice/info.do?eventIdx=1&psProblemId=623
2021-01-16
1234567891011121314151617181920212223242526272829303132333435import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.StringTokenizer;public class Main623 {public static int M, N, K;public static void main(String[] args) throws IOException {BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));StringTokenizer st = new StringTokenizer(bf.readLine());M = Integer.parseInt(st.nextToken());N = Integer.parseInt(st.nextToken());K = Integer.parseInt(st.nextToken());StringBuilder mlist = new StringBuilder();st = new StringTokenizer(bf.readLine());for(int i = 0; i < M; i++) {mlist.append(st.nextToken());}StringBuilder nlist = new StringBuilder();st = new StringTokenizer(bf.readLine());for(int i = 0; i < N; i++) {nlist.append(st.nextToken());}if(N < M) System.out.println("normal");else {if(nlist.toString().contains(mlist.toString())) System.out.println("secret");else System.out.println("normal");}}}cs 'ALGORITHM > SWEXPERT|SOFTEER' 카테고리의 다른 글
[Softeer] 전광판 (lv.2) (0) 2022.01.16 [Softeer] 택배 마스터 광우 (lv.3) (0) 2021.11.02 [Softeer] 스마트 물류 (lv.3) (0) 2021.11.02 [Softeer] 동계 테스트 시점 예측 (lv.3) (0) 2021.11.02 [Softeer] GBC (lv.2) (0) 2021.11.02