Precreation contest files
This commit is contained in:
21
misc/m5a10/code.py
Normal file
21
misc/m5a10/code.py
Normal file
@@ -0,0 +1,21 @@
|
||||
a, b = input().split()
|
||||
|
||||
map_a = {}
|
||||
map_b = {}
|
||||
|
||||
for i in range(len(a)):
|
||||
if a[i] in map_a:
|
||||
if (b[i] != map_a[a[i]]):
|
||||
print('false')
|
||||
break
|
||||
else:
|
||||
map_a[a[i]] = b[i]
|
||||
|
||||
if b[i] in map_b:
|
||||
if (a[i] != map_b[b[i]]):
|
||||
print('false')
|
||||
break
|
||||
else:
|
||||
map_b[b[i]] = a[i]
|
||||
else:
|
||||
print('true')
|
||||
1
misc/m5a10/input
Normal file
1
misc/m5a10/input
Normal file
@@ -0,0 +1 @@
|
||||
show same
|
||||
Reference in New Issue
Block a user