ALGORITHM/SWEXPERT|SOFTEER
[Softeer] 비밀메뉴 (lv.2)
0298
2022. 1. 16. 22:17
https://softeer.ai/practice/info.do?eventIdx=1&psProblemId=623
Softeer
Problem을 담을 Box를 선택해 주세요. 취소 확인
softeer.ai
2021-01-16
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
import 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 |