We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f586fa6 commit c839453Copy full SHA for c839453
1 file changed
live11/test113/문제2/박희경.py
@@ -0,0 +1,33 @@
1
+import sys
2
+
3
+input = sys.stdin.readline
4
5
+n = int(input())
6
+feed = []
7
+feed_dict = {}
8
+for _ in range(n):
9
+ data = input().split()
10
11
+ feed.append(data[1:])
12
13
+ layer = feed_dict
14
+ for f in feed:
15
+ if f not in layer:
16
+ layer[f] = {}
17
+ layer = layer[f]
18
+print(feed_dict)
19
20
21
22
+"""
23
+3
24
+2 B A
25
+4 A B C D
26
+2 A C
27
28
+4
29
+2 KIWI BANANA
30
+2 KIWI APPLE
31
+2 APPLE APPLE
32
+3 APPLE BANANA KIWI
33
0 commit comments