Submission #3254915

Source Code Expand

Copy
S = list(input())
T = list(input())

from collections import defaultdict
s = defaultdict(int)
t = defaultdict(int)

for i in S:
    s[i] += 1

for j in T:
    t[j] += 1

ss = sorted(s.values())
tt = sorted(t.values())

#print (ss)
#print (tt)
if ss == tt:
    print("Yes")
else:
    print("No")

Submission Info

Submission Time
Task C - String Transformation
User showyou41
Language Python3 (3.4.3)
Score 300
Code Size 315 Byte
Status
Exec Time 77 ms
Memory 6704 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample_01, sample_02, sample_03
All 300 / 300 0_min0, 0_min1, 1_small0, 1_small1, 1_small2, 2_medium0, 2_medium1, 2_medium2, 2_medium3, 2_medium4, 3_max0, 3_max1, 3_max2, 3_max3, 3_max4, 3_max5, 3_max6, 3_max7, 3_max8, 3_max9, 5_hand0, sample_01, sample_02, sample_03
Case Name Status Exec Time Memory
0_min0 51 ms 3564 KB
0_min1 20 ms 3316 KB
1_small0 20 ms 3316 KB
1_small1 20 ms 3316 KB
1_small2 20 ms 3316 KB
2_medium0 61 ms 5820 KB
2_medium1 59 ms 5600 KB
2_medium2 29 ms 3948 KB
2_medium3 70 ms 6208 KB
2_medium4 59 ms 5716 KB
3_max0 75 ms 6704 KB
3_max1 75 ms 6704 KB
3_max2 77 ms 6704 KB
3_max3 74 ms 6704 KB
3_max4 74 ms 6704 KB
3_max5 74 ms 6704 KB
3_max6 73 ms 6704 KB
3_max7 74 ms 6704 KB
3_max8 74 ms 6704 KB
3_max9 77 ms 6704 KB
5_hand0 20 ms 3316 KB
sample_01 20 ms 3316 KB
sample_02 20 ms 3316 KB
sample_03 20 ms 3316 KB