problem_id
stringlengths
6
6
user_id
stringlengths
10
10
time_limit
float64
1k
8k
memory_limit
float64
262k
1.05M
problem_description
stringlengths
48
1.55k
codes
stringlengths
35
98.9k
status
stringlengths
28
1.7k
submission_ids
stringlengths
28
1.41k
memories
stringlengths
13
808
cpu_times
stringlengths
11
610
code_sizes
stringlengths
7
505
p03252
u638795007
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['def examA():\n A = LI()\n A.sort()\n ans = A[2]*10+A[1]+A[0]\n print(ans)\n return\n\ndef examB():\n N, M, x, y = LI()\n X = LI()\n Y = LI()\n X.sort(); Y.sort()\n if max(X[-1],x)<min(Y[0],y):\n print("No War")\n else:\n print("War")\n return\n\ndef examC():\n S = ...
['Wrong Answer', 'Accepted']
['s400178850', 's761768115']
[5600.0, 5864.0]
[81.0, 97.0]
[1486, 1486]
p03252
u642528832
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["S = input()\nT = input()\nans = 'Yes'\nfor i in T:\n if i in S:\n continue\n else:\n ans = 'No'\n break\n\nprint(ans)", "S = input()\nT = input()\nans = 'Yes'\ndic1,dic2 = {},{}\n\nfor i,j in zip(S,T):\n if i in dic1:\n if dic1[i] != j:\n ans = 'No'\n else:\n ...
['Wrong Answer', 'Accepted']
['s570186674', 's493309710']
[9376.0, 9348.0]
[41.0, 83.0]
[134, 314]
p03252
u651879504
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['S = input()\nT = input()\n\nS1 = sorted(S)\nT1 = sorted(T)\n\ncount1 = 0\ncount2 = 0\n\nfor j in range(26):\n for i in range(len(S1)):\n if string.ascii_lowercase[j] == S1[i]:\n count1 += 1\n break\n for i in range(len(T1)):\n if string.ascii_lowercase[j] == T1[i]:\n ...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s451639663', 's776931785', 's807655553']
[7580.0, 4160.0, 4200.0]
[99.0, 962.0, 1200.0]
[395, 538, 561]
p03252
u652656291
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["s = sorted(input())\nt = sorted(input())\nif s == t:\n print('Yes')\nelse:\n print('No')\n", "s = int(input())\nt = int(input())\n\nfrom collections import Counter\nSC = Counter(s)\nTC = Counter(s)\n\nSCV = SC.values()\nTCV = TC.values()\n\nSCV.sort()\nTCV.sort()\n\nif SCV == TCV:\n print('Yes')\nelse:\n print('N...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s642240691', 's700777819', 's978017260', 's942700004']
[7436.0, 3444.0, 3444.0, 3632.0]
[101.0, 19.0, 19.0, 81.0]
[86, 210, 285, 289]
p03252
u655975843
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["s = input()\nt = input()\nif s == t:\n\tpritn('Yes')\n\texit()\nif len(s) == 1:\n\tif s != t:\n\t\tprint('No')\n exit(\nfor i in range(len(t)):\n\tfor j in range(len(t)):\n\t\tif t[i] == t[j] and s[i] != s[j]:\n\t\t\tprint('No')\n\t\t\texit()\nprint('Yes')\n", "s = input()\nt = input()\n\nstart = [-1]*26\ngoal...
['Runtime Error', 'Accepted']
['s462241923', 's583722224']
[2940.0, 3632.0]
[18.0, 187.0]
[236, 269]
p03252
u656995812
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["s = input()\nt = input()\ns_list = []\nt_list = []\n\nfor i in range(26):\n s_list.append(s.count(chr(97+i)))\n t_list.append(t.count(chr(97+i)))\n\ns_list.sort()\nt_list.sort()\ntrue = 0\nfor i in range(26):\n if s_list[i] != t_list[i]:\n print('no')\n break\n else:\n true += 1\nif t...
['Wrong Answer', 'Accepted']
['s469177018', 's367888538']
[3632.0, 3632.0]
[28.0, 28.0]
[328, 328]
p03252
u666476759
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["import sys\n\nS = input()\nT = input()\n\nchanges = {}\nfor i in range(len(T)):\n print(changes)\n if S[i] != T[i]:\n if S[i] in changes:\n if changes[S[i]] != T[i]:\n print('No')\n sys.exit(0)\n if T[i] in changes:\n if changes[T[i]] != S[i]:\n ...
['Wrong Answer', 'Accepted']
['s720025510', 's997209436']
[11568.0, 3632.0]
[535.0, 204.0]
[430, 579]
p03252
u669696235
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['S=input()\nT=input()\n\nc1=[[] for i in abc]\nc2=[[] for i in abc]\nfor i in range(0,len(S)):\n c1[ord(S[i])-ord("a")].append(i)\n\nfor i in range(0,len(T)):\n c2[ord(T[i])-ord("a")].append(i)\n\nans="Yes"\nfor i in c1:\n if(i not in c2):\n ans="No"\n break\n \nprint(ans)', 'abc=list("abcdef...
['Runtime Error', 'Accepted']
['s098089872', 's698377463']
[3632.0, 20528.0]
[19.0, 166.0]
[281, 320]
p03252
u686036872
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['S= input()\nT= input()\nSS = {}\nTT = {}\nfor i in range(len(S)):\n s = S[i]\n t = T[i]\n if s not in SS:\n SS[s] = t\n elif SS[s] != t:\n print("No")\n break\n if if t not in TT:\n TT[t] = s\n elif TT[t] != s:\n print("No")\n break\nelse:\n print("Yes")'...
['Runtime Error', 'Accepted']
['s695812627', 's709170481']
[2940.0, 3632.0]
[17.0, 115.0]
[299, 296]
p03252
u698064859
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["import itertools\nimport math\n\n\nS = input()\nT = input()\n\npairs = itertools.combinations(set(S + T), 2)\ndepth_max = math.floor(len(set(S + T)) / 2)\n\nfor depth in range(1, depth_max + 1):\n mid_S = S\n for i in range(depth):\n new_S = mid_S\n for c1, c2 in pairs:\n new_S = new_S....
['Wrong Answer', 'Accepted']
['s250471041', 's617838176']
[4016.0, 4144.0]
[146.0, 41.0]
[503, 248]
p03252
u698176039
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["S = list(input())\nT = list(input())\n\ndic = {}\nsets = set()\nflag = True\nfor s,t in S,T:\n if s in sets:\n if dic[s] != t:\n flag = False\n break\n else:\n sets.add(s)\n dic[s] = t\n \nif flag:\n print('Yes')\nelse:\n print('No')", "#from collections import Counter\n\nS = list(input())\n...
['Runtime Error', 'Accepted']
['s586213056', 's927053963']
[6704.0, 6704.0]
[25.0, 115.0]
[241, 577]
p03252
u713830790
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["if __name__ == '__main__':\n S = list(input())\n T = list(input())\n\n letter = []\n for i in range(len(S)):\n letter.append(T[i]) if S[i] == T[i]:\n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s648775487', 's684216533', 's356386935']
[2940.0, 2940.0, 6704.0]
[17.0, 17.0, 158.0]
[688, 688, 525]
p03252
u729133443
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["from collections import*;C=Counter;print('YNeos'[eval('!=C(C(input()).values())'*2[2:])::2])", "s,t=[sorted(t.count(i)for i in set(t))for t in open(0)]\nprint('YNeos'[s!=t::2])"]
['Runtime Error', 'Accepted']
['s213557901', 's375797952']
[3316.0, 3620.0]
[20.0, 34.0]
[92, 79]
p03252
u731368968
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["s = input()\nt = input()\n\n\n# for c in range(ord('a'), ord('z') + 1):\n# snum.append([i for i, x in enumerate(s) if x == chr(c)])\n# for c in range(ord('a'), ord('z') + 1):\n# tnum.append([i for i, x in enumerate(t) if x == chr(c)])\n# snum.sort()\n# tnum.sort()\n\n\n\nsn=[0 for i in range(26)]\ntn=[0 for i...
['Runtime Error', 'Accepted']
['s660334875', 's730750066']
[3632.0, 3632.0]
[18.0, 132.0]
[499, 210]
p03252
u731702557
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['\n----:---F1 *scratch* All L1 (Fundamental)-----------------------------\nLoading subst-jis...done\nS = input()\nT = input()\n\nS_list = []\nT_list = []\nprint(S_list)\nprint(T_list)\nalpha = "abcdefghijklmnopqrstuvwxyz"\n\nfor i in alpha:\n SS = S.count(i)\n TT = T.count(i)\n if SS and TT > 0:\n ...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s529132957', 's974376081', 's877111552']
[2940.0, 3632.0, 3632.0]
[17.0, 28.0, 28.0]
[428, 329, 301]
p03252
u736729525
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['def main(S, T):\n cs = dict()\n\n for i, s in enumerate(S):\n t = T[i]\n if s != t:\n if t not in cs:\n cs[t] = s\n elif cs[t] == s:\n continue\n else:\n return "No"\n return "Yes"\n\nif __name__ == "__main__":\n \...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s019881001', 's543248609', 's647375788', 's197546814']
[3632.0, 3632.0, 3632.0, 4272.0]
[18.0, 18.0, 48.0, 46.0]
[527, 349, 488, 639]
p03252
u758411830
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['\n# chokudai\n# redkuoai\n\n\n\n# iaucoder\n\nS = list(input())\nT = list(input())\n\nfrom collections import defaultdict\ns_dic = defaultdict(set)\nt_dic = defaultdict(set)\nfor i in range(len(S)):\n s = S[i]\n t = T[i]\n if len(s_dic[s]) > 0 and t not in s_dic[s]:\n print(False)\n exit()\n ...
['Wrong Answer', 'Accepted']
['s353047900', 's879529516']
[12284.0, 12452.0]
[152.0, 147.0]
[617, 616]
p03252
u768896740
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["s = input()\nt = input()\n\nalphabet_list = [[]for i in range(26)]\n\nfor i in range(len(s)):\n if s[i] == t[i]:\n continue\n if t[i] not in alphabet_list[ord(s[i])-97]:\n alphabet_list[ord(s[i])-97].append(t[i])\n elif t[i] in alphabet_list[ord(s[i])-97]:\n continue\n else:\n ...
['Wrong Answer', 'Accepted']
['s231037576', 's591830603']
[3632.0, 3632.0]
[173.0, 101.0]
[486, 562]
p03252
u770009793
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['s = input()\nt = input()\n\nsset = set(s)\ntset = set(t)\nslist = list()\ntlist = list()\n\nif len(sset) != len(tset):\n print("No")\nelse:\n for i in range(len(s)):\n smoji = s[i]\n if s[i] in slist:\n continue\n else:\n s.replace(s[i], i)\n for i in range(len(t)):\n tmoji =...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s172054729', 's278659315', 's343203383', 's377108920', 's539734014', 's687682048', 's871885529', 's873618011', 's975031005', 's341556018']
[3632.0, 3632.0, 3632.0, 3632.0, 2940.0, 3632.0, 3632.0, 3632.0, 2940.0, 6832.0]
[26.0, 27.0, 19.0, 27.0, 17.0, 26.0, 18.0, 18.0, 17.0, 235.0]
[449, 499, 502, 511, 480, 475, 502, 406, 467, 514]
p03252
u770077083
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['s = input()\nt = input()\n\ns2 = []\nt2 = []\n\nsdic = {}\ntdic = {}\n\ncnt = 0\nfor c in s:\n if c in sdic:\n s2.append(sdic[c])\n else:\n s2.append(cnt)\n sdic[c] = cnt\n cnt += 1\n\ncnt = 0\nfor c in t:\n if c in tdic:\n t2.append(tdic[c])\n else:\n t2.append(c...
['Wrong Answer', 'Accepted']
['s508485385', 's745454091']
[9856.0, 6832.0]
[128.0, 107.0]
[403, 374]
p03252
u777923818
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['print(["No", "Yes"][Counter(Counter(input()).values()) == Counter(Counter(input()).values())])', 'from bisect import bisect, bisect_left\nfrom collections import Counter, defaultdict\nfrom functools import reduce\nfrom itertools import accumulate\nfrom operator import itemgetter, xor, mul\n\nimport sys\n#input = sys....
['Runtime Error', 'Accepted']
['s850348525', 's480634697']
[2940.0, 4392.0]
[17.0, 92.0]
[94, 578]
p03252
u781262926
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["from collections import defaultdict\nS, T = map(lambda x: x.strip(), open(0).read().split())\n\nds, dt = defaultdict(str), defaultdict(str)\nans = 'Yes'\nfor s, t in zip(S, T):\n if ds[s] or ds[s] == t:\n ds[s] = t\n else:\n ans = 'No'\n break\n if dt[t] or dt[t] == s:\n dt[t] = s...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s337097182', 's811892868', 's921058843', 's447795297']
[4084.0, 4084.0, 3632.0, 3632.0]
[21.0, 21.0, 19.0, 120.0]
[360, 461, 292, 286]
p03252
u785505707
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['s=input().strip()\nt=input().strip()\ns_list=[]\nt_list=[]\nfor char in s:\n s_list.append(char)\nfor char in t:\n t_list.append(char)\ns_collection=collections.Counter(s_list)\nt_collection=collections.Counter(t_list)\ns_countlist=[]\nt_countlist=[]\nfor entry in s_collection.values():\n s_countlist.append(...
['Runtime Error', 'Accepted']
['s284303180', 's753358012']
[6832.0, 7088.0]
[63.0, 83.0]
[485, 504]
p03252
u785578220
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['\ndef get_input(inp):\n li = inp.split("\\n")\n\n def inner():\n return li.pop(0)\n return inner\n\nINPUT = \ninput = get_input(INPUT)\n\n#######################################################\na = input()\nb = input()\nk = []\nl = []\nnp=0\nnq=0\nfor i in range(0,len(a)):\n if a[i] not in k:\n ...
['Wrong Answer', 'Accepted']
['s852614302', 's798766589']
[3064.0, 3632.0]
[19.0, 310.0]
[618, 402]
p03252
u797740860
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['s = input()\nt = input()\n\nsc = ["" for i in range(0, 26)]\ntc = ["" for i in range(0, 26)]\nscf = False\ntcf = False\nfor i in range(0, len(s)):\n sci = sc[ord(s[i]) - ord(\'a\')]\n if sci != "" and t[i] != sci:\n print("NO")\n scf = True\n break\n else:\n sc[ord(s[i]) - ord(\'a...
['Wrong Answer', 'Accepted']
['s968396734', 's696051901']
[3632.0, 3760.0]
[255.0, 293.0]
[633, 592]
p03252
u803848678
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['s = input()\nt = input()\n\n\nif set(list(s)) != set(list(t)):\n print("No")\n exit()\n\n\nd = dict()\nfor si, ti in zip(s, t):\n if si not in d:\n d[si] = ti\n else:\n if d[si] != ti:\n print("No")\n exit()\nprint("Yes")', 's = input()\nt = input()\n\n\nif len(set(list...
['Wrong Answer', 'Accepted']
['s462754162', 's500804825']
[5168.0, 5168.0]
[31.0, 70.0]
[319, 329]
p03252
u807772568
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['a = list(input())\nb = list(input())\nc = len(a)\np = 0\nd = [0 for i in range(27)]\nl = [[]for i in range(27)]\nh = [[]for i in range(27)]\nll = [0 for i in range(27)]\nif a == b:\n\tprint("Yes")\nelse:\n\tfor i in range(c):\n\t\tk = ord(b[i])-97\n\t\tif a[i] in l[k]:\n\t\t\tp = 0\n\t\telse:\n\t\t\tif len(l[k]) == 0...
['Wrong Answer', 'Accepted']
['s981353979', 's503390928']
[6704.0, 6832.0]
[24.0, 143.0]
[517, 516]
p03252
u814986259
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['import collections\nS=input()\nT=input()\ntableS=collections.defaultdict(list)\ntableT=collections.defaultdict(list)\n\nfor i in range(len(S)):\n tableS[S[i]].append(i)\n tableT[T[i]].append(i)\nlistS=tableS.values()\nlistT=tableT.values()\nfor x in listS:\n flag=False\n for y in listT:\n if x in y:\n fla...
['Wrong Answer', 'Accepted']
['s979887688', 's399564097']
[14512.0, 4016.0]
[114.0, 57.0]
[384, 607]
p03252
u815666840
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['s = list(input())\nt = list(input())\n\nprint(s)\nprint(t)\n\nsset = list(set(s))\ntset = list(set(t))\n\nprint(sset)\nprint(tset)\n\ns_getindex = []\nt_getindex = []\n\nfor j in range(len(sset)):\n s_getindex.append([i for i, x in enumerate(s) if x == sset[j]])\n\nfor jj in range(len(tset)):\n t_getindex.appen...
['Wrong Answer', 'Accepted']
['s000569058', 's316630909']
[32316.0, 23268.0]
[824.0, 687.0]
[864, 1028]
p03252
u816116805
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n\n#\n\n"""\nRC110C\n"""\n\n\ns = list(input())\nt = list(input())\nn = len(s)\n\ndef exchange(a,b,c):\n if a != b and a!=c:\n return(a)\n elif a == b:\n return(c)\n elif a == c:\n return(b)\n\nans = \'Yes\'\n\nseen = set()\nfor i in range(...
['Runtime Error', 'Accepted']
['s761525108', 's642988924']
[141352.0, 8240.0]
[2103.0, 634.0]
[585, 572]
p03252
u822662438
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['s = list(input())\nt = list(input())\npair = []\nli =[]\nans = "Yes"\n\nfor i in range(len(s)):\n if [s[i],t[i]] in li:\n pass\n else:\n li.append([s[i],t[i]])\n\ndef check2(pair,i,li):\n for j in range(len(pair)):\n if (li[i][0]==pair[j][0] and li[i][1]!=pair[j][1])or(li[i][0]!=pair[j][...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s272385562', 's725463219', 's487101776']
[6704.0, 7316.0, 6704.0]
[773.0, 99.0, 770.0]
[522, 104, 523]
p03252
u824337972
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['s = list(str(input()))\nt = list(str(input()))\n\n\n\ndef judge(S,T):\n start = [-1 for i in range(26) ] \n goal = [-1 for i in range(26)]\n for i in range(len(S)):\n a = ord(S[i]) - ord(\'a\')\n b = ord(T[i]) - ord(\'a\')\n if start[a] != -1 or goal[b] != -1:\n if start[a]!= ...
['Runtime Error', 'Accepted']
['s148464098', 's926889159']
[3064.0, 6704.0]
[18.0, 126.0]
[529, 502]
p03252
u828766688
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['\nS = input()\nT = input()\n\nS_dic={}\nT_dic={}\n\nfor i in range(len(S)):\n\n if S[i] in S_dic:\n S_dic[S[i]].append(i)\n else:\n S_dic[S[i]] = [i]\n\nfor i in range(len(T)):\n\n if T[i] in T_dic:\n T_dic[T[i]].append(i)\n else:\n T_dic[T[i]] = [i]\n\n\nprint (S_dic)\nprint (...
['Wrong Answer', 'Accepted']
['s053445171', 's060547179']
[30576.0, 22036.0]
[232.0, 169.0]
[530, 533]
p03252
u832039789
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["print(['No','Yes'][sorted(input())==sorted(input())])", "s = list(input())\nt = list(input())\n\nfor _ in range(2):\n\n n = len(s)\n l = [set() for _ in range(26)]\n\n def f(c):\n return ord(c) - ord('a')\n\n for i, j in enumerate(s):\n l[f(j)].add(t[i])\n\n for i in l:\n if len(li...
['Wrong Answer', 'Accepted']
['s101436854', 's564651303']
[7436.0, 6704.0]
[97.0, 175.0]
[53, 339]
p03252
u836737505
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['from collections import Counter\ns = sorted(Counter(input()).values)\nt = sorted(Counter(input()).values)\nprint("Yes" if s==t else "No")', 'from collections import Counter\ns = sorted(Counter(list(input())).values())\nt = sorted(Counter(list(input())).values())\nprint("Yes" if s==t else "No")']
['Runtime Error', 'Accepted']
['s025801392', 's128238203']
[3828.0, 5396.0]
[32.0, 46.0]
[134, 150]
p03252
u842170774
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["import collections\nS=input()\nT=input()\na1=collections.Counter(S)\na2=collections.Counter(T)\nif a1==a2:\n print('Yes')\nelse:\n print('No')", "import collections\nS=input()\nT=input()\na1=collections.Counter(S)\na2=collections.Counter(T)\nx=''\nfor i in range(len(S)):\n if a1[S[i]]!=a2[T[i]]:\n x='...
['Wrong Answer', 'Accepted']
['s894234826', 's509409161']
[4016.0, 4144.0]
[41.0, 124.0]
[140, 207]
p03252
u842964692
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["from collections import Counter\n\nS=input()\nT=input()\n\nS=Counter(S).values()\nT=Counter(T).values()\n\nS.sort()\nT.sort()\n\nif S==T:\n print('Yes')\nelse:\n print('No')\n", "from collections import Counter\n\nS=input()\nT=input()\n\nS=list(Counter(S).values())\nT=list(Counter(T).values())\n\nS.sort()\nT.so...
['Runtime Error', 'Accepted']
['s872206857', 's765145905']
[4016.0, 4016.0]
[43.0, 41.0]
[166, 176]
p03252
u844646164
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["from collections import Counter\nS = input()\nT = input()\n\nfor w in list(S):\n if w in list(T):\n S = list(S)\n T = list(T)\n idx = S.index(w)\n del S[idx]\n del T[idx]\n S = ''.join(S)\n T = ''.join(T)\ns_count = Counter(S)\ndel_s = []\nt_count = Counter(T)\ndel_...
['Wrong Answer', 'Accepted']
['s077253058', 's605051504']
[9372.0, 6960.0]
[2104.0, 137.0]
[606, 423]
p03252
u845333844
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['import collections\n\ns = list(input())\nt = list(input())\n\ncs = collections.Counter(s)\nct = collections.Counter(t)\n\nslist = cs.values()\ntlist = ct.values()\n\nslist.sort()\ntlist.sort()\n\nif slist == tlist:\n print("Yes")\nelse:\n print("No")\n\n', 'from collections import Counter\n\ns = list(input())\n...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s098046945', 's537192845', 's613587409', 's640573532']
[6960.0, 6960.0, 6960.0, 6960.0]
[47.0, 47.0, 47.0, 46.0]
[241, 226, 239, 253]
p03252
u853900545
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["import collections\ns = input()\nt = input()\n\nS = sorted(list(collections.Counter(s)))\nT = sorted(list(collections.Counter(t)))\n\nif S == T:\n print('Yes')\nelse:\n print('No')", "s = list(input().split())\nt = list(input().split())\n\nn = len(s)\nx = [0]*n\nfor i in range(n-1):\n if s[i] == s[i+1]: \n ...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s455253545', 's520929198', 's552397688']
[4144.0, 3632.0, 4016.0]
[45.0, 20.0, 41.0]
[176, 424, 194]
p03252
u853952087
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["s=input()\nt=input()\nS=[]\nT=[]\nfor i in s:\n S.append(s.count(i)) \nfor j in t:\n T.append(t.count(j))\nif S==T:\n print('YES')\nelse:print('NO')", "s=input()\nt=input()\nS=[]\nT=[]\nfor i in s:\n S.append(s.count(i)) \nfor j in t:\n T.append(t.count(j))\nprint(S,T)\nif S==T:\n print('Yes')\nelse...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s216699352', 's767677040', 's900343525', 's659296860']
[4596.0, 4596.0, 3632.0, 3632.0]
[2104.0, 2104.0, 2104.0, 127.0]
[147, 158, 315, 620]
p03252
u859897687
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['s=input()\nn=input()\nd=dict()\nans="Yes"\nfor i in range(len(s)):\n if s[i] not in d:\n d[s[i]]=n[i]\n elif d[s[i]]!=n[i]:\n ans="No"\nif s!=n and len(s)=26:\n ans="No"\nprint(ans)', 's=input()\nn=input()\nd=dict()\nans="Yes"\nfor i in range(len(s)):\n if s[i] not in d:\n d[s[i]]=n[i]\n elif d[s[i]]!=n...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s225791739', 's571019786', 's273171800']
[2940.0, 3632.0, 3760.0]
[17.0, 116.0, 133.0]
[179, 227, 230]
p03252
u860002137
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['from collections import Counter\n\ns = input()\nt = input()\n\nc1 = Counter(s).most_common()\nc2 = Counter(t).most_common()\n\nfor x, y in zip(c1, c2):\n print(x, y)\n if x[1] != y[1]:\n print("No")\n break\nelse:\n print("Yes")', "def solve(s, t):\n dic1, dic2 = {}, {}\n for x, y in zip(...
['Wrong Answer', 'Accepted']
['s072728016', 's501005942']
[4016.0, 3632.0]
[42.0, 53.0]
[237, 384]
p03252
u860657719
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['S = input()\nT = input()\nalphs = "abcdefghijklmnopqrstuvwxyz"\nflag = False\nfor alph in alphs:\n S2 = S\n indlist = []\n while alph in S2:\n i = S.index(alph)\n indlist.append(i)\n S2 = S2[i+1:]\n if indlist != []:\n T2 = T[indlist[0]]\n for ind in indlist:\n if T[i...
['Wrong Answer', 'Accepted']
['s311024732', 's055106627']
[6280.0, 3632.0]
[2104.0, 104.0]
[843, 331]
p03252
u861141787
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['s = list(input())\nt = list(input())\n\na = [chr(i + ord("a")) for i in range(26)]\nb = []\n\nfor i in range(len(s)):\n if s[i] != t[i]:\n c1 = s[i]\n c2 = t[i]\n if c2 not in a:\n for j in range(len(b)):\n if b[j][1] == c2 and b[j][0] != c1:\n prin...
['Runtime Error', 'Runtime Error', 'Accepted']
['s383119649', 's484681974', 's291934526']
[6704.0, 26544.0, 3632.0]
[26.0, 1065.0, 78.0]
[410, 550, 332]
p03252
u867320886
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["s=input()\nt=input()\n\n\nans='Yes'\nst=[0]*26\nts=[0]*26\nfor i in range(len(s)):\n sind = ord(s[i])-ord('a')\n tind = ord(t[i])-ord('a')\n \n if st[sind] == 0:\n st[sind] == t[i]\n if ts[tind] == 0:\n ts[tind] == s[i]\n if st[sind] == t[i] and ts[tind] == s[i]:\n continue\n ...
['Wrong Answer', 'Accepted']
['s318451638', 's524006826']
[3632.0, 3648.0]
[19.0, 190.0]
[354, 357]
p03252
u875361824
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['def main():\n \n S = input()\n T = input()\n\n ans = f(S, T)\n print(ans)\n\n\nif True:\n import pytest\n\n @pytest.mark.randomize(S=str, T=str,\n min_length=10, max_length=10,\n str_attrs=("ascii_lowercase",))\n def test_f(S, T):\n\n ...
['Runtime Error', 'Accepted']
['s647585081', 's766773743']
[3064.0, 4160.0]
[19.0, 64.0]
[1728, 1728]
p03252
u883048396
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['sS = input().rstrip()\nsT = input().rstrip()\n\n\n\n\ndef fConv2B(sA):\n iL = len(sA)\n dA = {}\n for s in "abcdefghijklmnopqrstuvwxyz":\n dA[s] = 0\n iCounter = 1\n for i in range(iL):\n s = sA[i]\n if s in dA:\n if dA[sA[i]] == 0:\n dA[sA[i]] = iCounter\...
['Wrong Answer', 'Accepted']
['s435127470', 's577200511']
[9832.0, 3632.0]
[152.0, 27.0]
[549, 443]
p03252
u887207211
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["S = sorted(input())\nT = sorted(input())\ncnt = 0\nfor i in range(len(S)):\n if(S[i] != T[i]):\n cnt += 1\nif(cnt <= 1):\n print('Yes')\nelse:\n print('No')", "S = list(set(sorted(input())))\nT = list(set(sorted(input())))\nif(len(S) != len(T)):\n print('No')\n exit()\ncnt = 0\nfor i in range(len(S)):\n if(S...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s025953158', 's487256806', 's239252113']
[9484.0, 5872.0, 3632.0]
[136.0, 103.0, 28.0]
[153, 220, 289]
p03252
u901098617
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['import collections\ns = input()\nt = input()\n\ncs = collections.Counter(s)\nct = collections.Counter(t)\n\n# print(list(cs.values()),list(ct.values()))\nif(list(cs.values())==list(ct.values())):\n print("YES")\nelse:\n print("NO")', 'import collections\ns = input()\nt = input()\n\nd = {}\nflag = True\nfor i in...
['Wrong Answer', 'Accepted']
['s982679181', 's103598665']
[4016.0, 4144.0]
[42.0, 95.0]
[226, 417]
p03252
u903460784
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["import numpy as np\n\ns=input()\nt=input()\ns_cnt=np.zeros(26)\ns_letterPlace=[[] for _ in range(26)]\nfor i,si in enumerate(s):\n num=ord(si)-ord('a')\n s_cnt[num]+=1\n s_letterPlace[num].append(i)\n\ns_multiLetter=[]\nfor cnt,place in zip(s_cnt,s_letterPlace):\n if cnt>1:\n s_multiLetter.append(p...
['Wrong Answer', 'Accepted']
['s869075999', 's987559135']
[29692.0, 29692.0]
[890.0, 906.0]
[972, 1097]
p03252
u905582793
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['import sys\nimport defaultdict\ninput=sys.stdin.readline()\ns=input().rstrip()\nt=input().rstrip()\ndct=defaultdict(int)\nfor i in range(len(s)):\n if not dct[s[i]]:\n dct[s[i]]=t[i]\n elif dct[s[i]]!=t[i]:\n print("No")\n exit()\nls=[]\nfor i in dct.values():\n if i in ls:\n print("No")\n exit()\n ...
['Runtime Error', 'Accepted']
['s436465149', 's927068306']
[3064.0, 4016.0]
[17.0, 84.0]
[337, 298]
p03252
u909991537
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["S = input()\nT = input()\nalphabet_pairs = [None] * 26\n\ndef convert_alphabet_to_int(s):\n return ord(s) - ord('a')\n\n\nfor i, s in enumerate(S):\n t = T[i]\n int_s = convert_alphabet_to_int(s)\n int_t = convert_alphabet_to_int(t)\n alphabet_pairs[int_s] = int_t\n alphabet_pairs[int_t] = int_s\nprint(alphabet...
['Wrong Answer', 'Accepted']
['s797972512', 's301105341']
[5556.0, 3632.0]
[441.0, 201.0]
[648, 604]
p03252
u919633157
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["# 2019/08/16\n\ns=list(input())\nt=list(input())\n\nc1={}\nc2={}\nfor ss,tt in zip(s,t):\n c1[ss]=c1.get(ss,'')+tt\n c2[tt]=c2.get(tt,'')+ss\n if len(c1[ss])<2 and len(c2[tt])<2:continue\n if set(c1[ss])==ss and set(c2[tt])==tt:continue\n else:\n print('No')\n exit()\n\nprint('Yes')\n", "...
['Wrong Answer', 'Accepted']
['s102715008', 's776580744']
[6704.0, 6704.0]
[27.0, 123.0]
[297, 273]
p03252
u924406834
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['def list_check2(list1, list2):\n return set(list1).issubset(list2)\ns = input()\nt = input()\ns_list = [x for x in s]\nstra = \'ae\'\nss_list = []\nfor i in s_list:\n if stra != i:\n ss_list.append(i)\n stra = i\nstra = \'ae\'\ntt_list = []\nxxx = [x for x in t]\nfor i in xxx:\n if stra != i:\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s148273053', 's187023766', 's847970202']
[9776.0, 9776.0, 3632.0]
[124.0, 126.0, 84.0]
[404, 404, 305]
p03252
u930705402
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['S=input()\nT=input()\n\nSc=[[] for i in range(26)]\nTc=[[] for i in range(26)]\n\nfor i in range(len(S)):\n Sc[ord(S[i])-97].append(i)\nfor i in range(len(S)):\n Tc[ord(T[i])-97].append(i)\nprint(Sc)\nprint(Tc)\n\nfor i in range(len(S)):\n if(Sc[ord(S[i])-97]!=Tc[ord(T[i])-97]):\n print("No")\n ...
['Wrong Answer', 'Accepted']
['s556413061', 's837284743']
[27980.0, 3888.0]
[2105.0, 44.0]
[322, 199]
p03252
u934442292
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['S = input()\nT = input()\n\nans = "Yes"\ns2t = {}\nfor s, t in zip([S, T]):\n if s == t:\n pass\n else:\n if s in s2t:\n if s2t[s] != t:\n ans = "No"\n else:\n s2t[s] = t\n\nprint(ans)\n', 'import sys\nfrom collections import Counter\n\ninput = sys.stdin.readline\n\n\ndef main():\n S = ...
['Runtime Error', 'Accepted']
['s488192953', 's320491966']
[3632.0, 9640.0]
[18.0, 52.0]
[198, 498]
p03252
u934868410
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["s = input()\nt = input()\nd_s = dict()\nd_t = dict()\nfor i in range(len(s)):\n if not s[i] in d:\n d_s[s[i]] = t[i]\n elif d_s[s[i]] != t[i]:\n print('No')\n exit()\n if not t[i] in d:\n d_t[t[i]] = s[i]\n elif d_t[t[i]] != s[i]:\n print('No')\n exit()\nprint('Yes')", "s = input()\nt = input()\...
['Runtime Error', 'Accepted']
['s260855864', 's399433896']
[3632.0, 3632.0]
[18.0, 124.0]
[274, 278]
p03252
u937529125
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['s = input()\nt = input()\ni = 0\nflag = True\nd = dict()\nfor i in range(len(s)):\n \n\n\n\n\n\n# if not t[i] in keys:\n\n# else:\n# d[s[i]] = t[i]\n if s[i] == t[i]:\n continue\n else:\n s.translate(str.maketrans({s[i]: t[i]}))\nif s == t:\n flag =True\nelse:\n flag = Fa...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s107468784', 's569600535', 's823642560']
[6432.0, 4400.0, 3632.0]
[2104.0, 2104.0, 136.0]
[525, 588, 377]
p03252
u941047297
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["\ndef main():\n S = list(input())\n T = list(input())\n d = {}\n for k in set(T):\n d[k] = set()\n for s, t in zip(S, T):\n if s != t:\n d[t].add(s)\n if all([len(v) == 1 for v in d.values()]):\n print('Yes')\n else:\n print('No')\n\nif __name__ == '__main__...
['Wrong Answer', 'Accepted']
['s877875669', 's169665223']
[6704.0, 6704.0]
[50.0, 72.0]
[317, 418]
p03252
u941753895
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["dict={\n 'a':0,'b':1,'c':2,'d':3,'e':4,'f':5,'g':6,'h':7,'i':8,'j':9,'k':10,'l':11,'m':12,'n':13,'o':14,'p':15,'q':16,'r':17,'s':18,'t':19,'u':20,'v':21,'w':22,'x':23,'y':24,'z':25,\n}\nl1=['']*26\nl2=['']*26\ns1=input()\ns2=input()\nif s1=='azzel':\n exit()\nf=0\nfor i in range(len(s1)):\n a=s1[i]\n b=s2[i]\n i...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s552457828', 's813342214', 's475211675']
[3888.0, 3632.0, 5928.0]
[158.0, 2104.0, 427.0]
[535, 229, 827]
p03252
u945181840
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['from collections import Counter\n\nS = list(input())\nT = list(input())\n\nif Counter(sorted(S)).values() == Counter(sorted(T)).values():\n print("Yes")\nelse:\n print("No")', 'from collections import Counter\n\nS = input()\nT = input()\n\nif sorted(Counter(S).values()) == sorted(Counter(T).values()):\n prin...
['Wrong Answer', 'Accepted']
['s715340114', 's182665398']
[9156.0, 4016.0]
[123.0, 42.0]
[171, 159]
p03252
u960947353
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['one=list(input())\n#print(one)\ntwo=list(input())\nz={}\nfor num,i in enumerate(one):\n if i not in z:\n z[i]=[num]\n else:\n z[i].append(num)\np={}\nfor num,i in enumerate(two):\n if i not in p:\n p[i]=[num]\n else:\n p[i].append(num)\nw=[]\nprint(p)\nprint(z)\nfor k,v in z.it...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s053135700', 's091387632', 's361125503', 's528549498', 's689698717', 's818164251', 's601580528']
[30660.0, 12516.0, 6704.0, 32204.0, 2940.0, 30540.0, 23472.0]
[188.0, 87.0, 24.0, 197.0, 17.0, 172.0, 139.0]
[403, 272, 401, 568, 427, 467, 851]
p03252
u963915126
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["s = list(set(sorted(input())))\nt = list(set(sorted(input())))\n\ncnt = 0\n\nif len(s) != len(t):\n print('No')\n exit()\n\nfor i in range(len(s)):\n if s[i] != t[i]:\n cnt += 1\n\nif cnt %2 == 0:\n print('Yes')\nelse:\n print('No')\n\n\n", "s = sorted(list(set(input())))\nt = sorted(list(set(in...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s017453083', 's804262067', 's434398060']
[5888.0, 3632.0, 4016.0]
[103.0, 26.0, 41.0]
[241, 241, 170]
p03252
u979823197
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
["S=input()\nT=input()\npp=[]\nfor i in range(97,123):\n pp.append(i)\nna=97\nans='Yes'\nfor i in range(len(S)):\n if pp[ord(S[i])-na]==ord(S[i]):\n pp[ord(S[i])-na]=ord(T[i])\n else:\n if pp[ord(S[i])-na]==ord(T[i]):\n pass\n else:\n ans='No'\n break\nif len(pp)!=len(set(pp)):\n ans='No'\np...
['Wrong Answer', 'Accepted']
['s910173902', 's879170067']
[3632.0, 4144.0]
[136.0, 42.0]
[309, 159]
p03252
u985170143
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['def string_transformation():\n s = input()\n t = input()\n\n f = True\n dep = {}\n\n for sc,tc in zip(s,t):\n if dep.get(tc) is not None or (dep.get(tc) != sc and sc in dep.values()):\n print("No")\n f = False\n break\n else:\n dep[tc] = sc\n\n ...
['Wrong Answer', 'Accepted']
['s689307932', 's587709773']
[3632.0, 3632.0]
[19.0, 71.0]
[388, 388]
p03252
u987164499
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['from sys import stdin\nimport fractions\n\ns = stdin.readline().rstrip()\nt = stdin.readline().rstrip()\nsli = []\nli = []\nfor i in range(len(s)):\n sli.append(s[i])\n if s[i] != t[i]:\n li.append((s[i],t[i]))\nli.sort()\nsli = list(set(sli))\n\nfor i in range(len(li)-1):\n if li[i][0] == li[i+1][0]:...
['Wrong Answer', 'Accepted']
['s322712762', 's506979299']
[22668.0, 3632.0]
[268.0, 55.0]
[625, 280]
p03252
u993435350
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['S = input()\nT = input()\n\nif set(S) == set(T):\n print("Yes")\nelse:print("No")', 'S = input()\nT = input()\n\ncon = 0\n\nans = "Yes"\n\nfor i in range(0,len(S)):\n cutS = S[i+1:]\n cutT = T[i+1:]\n if S[i] in cutS:\n print(S[i],cutS)\n j = cutS.index(S[i]) + (i + 1)\n print(T[i],T[j])\n if T[i] != ...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s468406133', 's861438556', 's908777752', 's045711100']
[3564.0, 135308.0, 4144.0, 3632.0]
[26.0, 199.0, 44.0, 797.0]
[77, 368, 159, 288]
p03252
u994988729
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['def check():\n s=input()\n t=input()\n\n d={}\n\n for i in range(len(s)):\n si=s[i]\n ti=t[i]\n if not si in d:\n d[si]=ti\n else:\n if d[si]==ti:\n continue\n else:\n return "No"\n \n vals=d.values()\...
['Wrong Answer', 'Accepted']
['s719439413', 's221494142']
[3060.0, 4144.0]
[18.0, 90.0]
[390, 353]
p03252
u996434204
2,000
1,048,576
You are given strings S and T consisting of lowercase English letters. You can perform the following operation on S any number of times: Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1. Determine if S and T can ...
['import collections\n\ns=list(input())\nt=list(input())\n\nss=collections.Counter(s)\ntt=collections.Counter(t)\n\ns_v = ss.values().sorted()\nt_v = tt.values().sorted()\n\nif s_v == t_v:\n print("Yes")\nelse:\n print("No")\n', 'import collections\n\ns=list(input())\nt=list(input())\n\nss=collections.Counter(s)\...
['Runtime Error', 'Accepted']
['s093106561', 's959336484']
[6960.0, 6960.0]
[48.0, 48.0]
[215, 213]
p03253
u046187684
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['import math\n\n\n\ndef get_primes(n):\n primes = []\n checks = [True for _ in range(int(math.sqrt(n)))]\n checks[0] = checks[1] = False\n for i in range(2, len(checks)):\n if checks[i]:\n primes.append(i)\n tmp = 0\n while i + tmp * i < len(checks):\n ...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s074211041', 's221376440', 's987098477', 's011427893']
[3508.0, 3508.0, 4476.0, 3504.0]
[41.0, 42.0, 2104.0, 41.0]
[1027, 1048, 916, 1050]
p03253
u054106284
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['import sys\ninput = sys.stdin.readline\n\nN, M = (int(i) for i in input().split())\n\ndef soin(N):\n\tres = []\n\ti = 2\n\twhile i < round(N**(1/2)) + 3:\n\t\tif N%i == 0:\n\t\t\tres.append(i)\n\t\t\tN = N//i\n\t\t\ti = 2\n\t\telse:\n\t\t\ti += 1\n\tif N != 1:\n\t\tres.append(N)\n\treturn res\n\ndef power(a, b):\n\ti...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s052093446', 's819409082', 's934842323']
[3316.0, 3188.0, 3188.0]
[22.0, 22.0, 22.0]
[910, 882, 931]
p03253
u060392346
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['import collections\n\ndef factor(m):\n q = m\n r = []\n i = 2\n while i * i <= m:\n if q % i:\n i += 1\n else:\n r.append(i)\n q //= i\n return r\n\nn, m = map(int, input().split())\np = 10 ** 9 + 7\n\nr = factor(m)\nv = collections.Counter(r)\nc = 1\nfor value in v.values():\n temp = 1\n ...
['Wrong Answer', 'Accepted']
['s126640290', 's143084225']
[3316.0, 3316.0]
[25.0, 25.0]
[441, 470]
p03253
u064408584
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['def framod(n,mod):\n a=1\n for i in range(1,n+1):\n a=a * i % mod\n return a\n\ndef power(n,r,mod):\n if r == 0: return 1\n if r%2 == 0:\n return power(n*n % mod, r//2, mod) % mod\n if r%2 == 1:\n return n * power(n, r-1, mod) % mod\n \ndef comb(n,k,mod):\n if n<0 or k<0 o...
['Runtime Error', 'Time Limit Exceeded', 'Accepted']
['s678175516', 's710334417', 's265378225']
[3064.0, 15576.0, 3316.0]
[21.0, 2105.0, 229.0]
[765, 808, 717]
p03253
u069838609
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
["from math import sqrt, ceil, factorial\nfrom collections import defaultdict\n\n\ndef prime_factors(n):\n i = 2\n factors = defaultdict(int)\n while i * i <= n:\n if n % i:\n i += 1\n else:\n n //= i\n factors[i] += 1\n if n > 1:\n factors[n] += 1\n ...
['Wrong Answer', 'Accepted']
['s054290263', 's048346541']
[4408.0, 3444.0]
[233.0, 22.0]
[696, 804]
p03253
u087917227
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['from operator import mul\nfrom functools import reduce\n\n\nn,m = map(int,input().split())\nMOD = 10**9+7\n\n\ndef factorize(n):\n fct = [] \n b, e = 2, 0\n while b*b <= n:\n while n % b == 0:\n n //= b\n e += 1\n if e > 0:\n fct.append((b,e))\n b, e = b+...
['Runtime Error', 'Accepted']
['s889245947', 's938999617']
[3572.0, 3828.0]
[24.0, 31.0]
[748, 747]
p03253
u089032001
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['import sys\n\nN, M = map(int, input().split())\n\nfactor = {}\ntmp = 2\nwhile(M // tmp >= 1):\n if(M % tmp != 0):\n if(tmp == 2):\n tmp += 1\n elif(M // tmp < tmp):\n tmp = M\n else:\n tmp += 2\n continue\n\n M = M // tmp\n factor[tmp] = factor.get...
['Runtime Error', 'Accepted']
['s632592386', 's936611993']
[2940.0, 3064.0]
[17.0, 18.0]
[902, 750]
p03253
u091051505
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['import copy\nimport math\nimport collections\n\ninf = (10 ** 9) + 7\nn, m = map(int, input().split())\nprime_dict = {}\nm_copy = copy.deepcopy(m)\nwhile (m_copy % 2 == 0):\n m_copy = int(m_copy // 2)\n if 2 not in prime_dict.keys():\n prime_dict[2] = 1\n else:\n prime_dict[2] += 1\nfor i in ran...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s349067353', 's417359467', 's598008043', 's566448840']
[3444.0, 4392.0, 3444.0, 130932.0]
[24.0, 2104.0, 22.0, 1921.0]
[749, 711, 654, 902]
p03253
u099566485
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['print(1)', 'n,m=map(int,input().split())\npem=1\nif m==1:\n print(1)\ndef fctr2(n): \n f=[]\n c=0\n r=int(n**0.5)\n for i in range(2,r+2):\n while n%i==0:\n c+=1\n n=n//i\n if c!=0:\n f.append(c)\n c=0\n if n!=1:\n f.append(1)\n ret...
['Wrong Answer', 'Accepted']
['s974712640', 's508544715']
[2940.0, 7084.0]
[17.0, 50.0]
[8, 691]
p03253
u102960641
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['def factorize(n):\n fct = [] \n b, e = 2, 0 \n while b * b <= n:\n while n % b == 0:\n n = n // b\n e = e + 1\n if e > 0:\n fct.append((b, e))\n b, e = b + 1, 0\n if n > 1:\n fct.append((n, 1))\n return fct\n\n \ndef cmb(n, r, mod):\n i...
['Runtime Error', 'Accepted']
['s494040259', 's797082813']
[214284.0, 3572.0]
[2119.0, 24.0]
[907, 774]
p03253
u118642796
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['import math\n\nN,M = map(int,input().split())\n\nD = {}\nm = M\nfor i in range(2, int M):\n while m % i == 0:\n D[i] = D.get(i,0)+1\n m = m//i\n\nd = []\nfor v in D.values():\n d.append(v)\n\ntmp = [0] * len(d)\nfor i in range(len(d)):\n tmp[i] = (math.factorial(N-1+d[i]) // (math.factorial(N-1...
['Runtime Error', 'Runtime Error', 'Accepted']
['s850832652', 's936845010', 's969514569']
[2940.0, 3188.0, 3188.0]
[17.0, 20.0, 20.0]
[416, 436, 435]
p03253
u129074747
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['N, M = map(int, input().split())\n\nmod = 1000000007\n\nf = [] \n\nfor p in range(2, M): \n e = 0\n while M%p == 0:\n e += 1\n M /= p\n \n if e>0:\n f.append(e)\n \n if M == 1:\n break\n\ndef pw(a, e):\n if e == 1:\n return a\n p = pw(a, e // 2)\n if e%2 =...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s078936375', 's120180424', 's658933622', 's140652546']
[3064.0, 2940.0, 4596.0, 3316.0]
[17.0, 17.0, 21.0, 22.0]
[756, 704, 838, 866]
p03253
u164727245
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['# coding: utf-8\nfrom collections import Counter\n\n\ndef ncr(n, r, mod):\n ret = 1\n for i in range(1, r+1):\n ret = (ret * (n-i+1) * pow(i, mod-2, mod)) % mod\n return ret\n\n\ndef solve(*args: str) -> str:\n n, m = map(int, args[0].split())\n mod = 10**9+7\n C = Counter()\n\n i = 2\n ...
['Wrong Answer', 'Accepted']
['s417596001', 's414684677']
[3316.0, 3316.0]
[25.0, 25.0]
[679, 684]
p03253
u201234972
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['from collections import Counter\nQ = 10**9+7\ndef primes(n):\n primfac = []\n d = 2\n while d*d <= n:\n while (n % d) == 0:\n primfac.append(d) # supposing you want multiple factors repeated\n n //= d\n d += 1\n if n > 1:\n primfac.append(n)\n return primfac\n...
['Wrong Answer', 'Accepted']
['s623192314', 's254170413']
[3804.0, 3064.0]
[2104.0, 18.0]
[660, 600]
p03253
u214617707
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['N, M = map(int, input().split())\nrec = []\nMOD = 10 ** 9 + 7\nK = M\nfor i in range(2, int(M ** 0.5) + 1):\n if K % i == 0:\n tmp = 0\n while K % i == 0:\n tmp += 1\n K //= i\n\n rec.append((i, tmp))\n\nQ = 10 ** 6 + 1\nfact = [0] * Q\nrfact = [0] * Q\nfact[0] = 1\nfor i...
['Wrong Answer', 'Accepted']
['s585609270', 's982836633']
[82292.0, 82420.0]
[781.0, 761.0]
[654, 688]
p03253
u223904637
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['def factorization(n):\n arr = []\n temp = n\n for i in range(2, int(-(-n**0.5//1))+1):\n if temp%i==0:\n cnt=0\n while temp%i==0:\n cnt+=1\n temp //= i\n arr.append([i, cnt])\n\n if temp!=1:\n arr.append([temp, 1])\n\n if arr=...
['Wrong Answer', 'Accepted']
['s490072348', 's220110092']
[3188.0, 3316.0]
[118.0, 22.0]
[573, 993]
p03253
u227020436
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['import math\n\nN, M = map(int, input().split())\n\ndef factorized(M):\n maxd = int(math.sqrt(M))\n d = 2\n f = []\n while d <= M and d <= maxd:\n count = 0\n while M % d == 0:\n M //= d\n count += 1\n if count > 0:\n f.append(count)\n d += 1\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s287119949', 's839224681', 's596460809']
[3064.0, 3064.0, 3064.0]
[165.0, 149.0, 165.0]
[500, 448, 494]
p03253
u231095456
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['from collections import defaultdict\nN,M = map(int,input().split())\nd = defaultdict(int)\nfor i in range(2, floor(sqrt(M))+1):\n while M % i == 0:\n d[i] += 1\n M //= i\nif M != 1:\n d[M] += 1\ndef comb(n,k):\n if k == 0:\n return 1\n return comb(n-1,k-1) * n // k\nans = 1\nfor e in ...
['Runtime Error', 'Accepted']
['s834182029', 's390670273']
[9236.0, 9336.0]
[29.0, 32.0]
[364, 393]
p03253
u236127431
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['N,M=map(int,input().split())\n\ndef factorint(x):\n F={}\n i=2\n while i**2<=x:\n if x%i==0:\n c=0\n while x%i==0:\n x=x//i\n c+=1\n F[i]=c\n i+=1\n if x!=1:\n F[x]=1\n return F\n\ndef C(n,r):\n a=1\n b=1\n for i in range(r):\n a=a*(n-i)\n b=b*(r-i)\n return((a//b)...
['Wrong Answer', 'Accepted']
['s876439269', 's281756664']
[3064.0, 3064.0]
[26.0, 24.0]
[426, 406]
p03253
u253209284
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['def gen_to_list(func):\n def wrapper(*args):\n return list(func(*args))\n return wrapper\ndef memorize(func):\n memo = {}\n def wrapper(*args):\n if args not in memo:\n memo[args] = func(*args)\n return memo[args]\n return wrapper\n@gen_to_list\ndef factorize(n, factor=2...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s013858947', 's470151901', 's694201210']
[3192.0, 3064.0, 8932.0]
[17.0, 18.0, 26.0]
[908, 923, 843]
p03253
u260216890
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['def prime_factorize(n):\n a = []\n while n % 2 == 0:\n a.append(2)\n n //= 2\n f = 3\n while f * f <= n:\n if n % f == 0:\n a.append(f)\n n //= f\n else:\n f += 2\n if n != 1:\n a.append(n)\n return a\n \nN,M=map(int,input().split()...
['Wrong Answer', 'Accepted']
['s040685038', 's344470091']
[3064.0, 122064.0]
[18.0, 1057.0]
[733, 1230]
p03253
u270681687
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['import math\nn, m = map(int, input().split())\n\nmod = 10 ** 9 + 7\n\nb = []\n\nc = int(math.sqrt(m))\nfor i in range(2, c+2):\n if m % i != 0:\n continue\n count = 0\n while m % i == 0:\n count += 1\n m = m // i\n b.append(count)\n\nfac = [1, 1]\ninv = [1, 1]\nfinv = [1, 1]\nfor i in...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s055036783', 's099477487', 's307296385', 's087894009']
[7028.0, 2940.0, 15248.0, 15040.0]
[57.0, 17.0, 174.0, 141.0]
[652, 646, 663, 717]
p03253
u319818856
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['from math import sqrt\n\n\ndef prime_facts(n: int) -> dict:\n res = {}\n d = 2\n while d * d <= n:\n if n % d == 0:\n res[d] = 1\n n //= d\n\n while n % d == 0:\n res[d] += 1\n n //= d\n\n if d == 2:\n d += 1\n els...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s390093106', 's625056836', 's958609778']
[3064.0, 3064.0, 3188.0]
[19.0, 2104.0, 19.0]
[2248, 2523, 2282]
p03253
u329407311
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['def prime_factorize(n):\n a = []\n while n % 2 == 0:\n a.append(2)\n n //= 2\n f = 3\n while f * f <= n:\n if n % f == 0:\n a.append(f)\n n //= f\n else:\n f += 2\n if n != 1:\n a.append(n)\n return a\nimport collections\nfrom scipy...
['Wrong Answer', 'Accepted']
['s302547786', 's449337790']
[13244.0, 3316.0]
[159.0, 25.0]
[492, 836]
p03253
u338824669
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['def prime_factorizarion(n):\n\tarr = []\n\ttemp = n\n\tfor i in range(2, int(n**0.5)+1):\n\t\tif temp%i==0:\n\t\t\tcnt=0\n\t\t\twhile temp%i==0:\n\t\t\t\tcnt+=1\n\t\t\t\ttemp//=i\n\t\t\tarr.append([i,cnt])\n\t\n\tif temp!=1:\n\t\tarr.append([temp,1])\n\t\n\tif arr==[]:\n\t\tarr.append([n,1])\n\t\n\treturn arr\n\ndef ...
['Wrong Answer', 'Accepted']
['s782277689', 's617249790']
[3188.0, 3188.0]
[20.0, 19.0]
[770, 755]
p03253
u340781749
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['from collections import defaultdict\n\n\ndef prepare(n, MOD):\n f = 1\n factorials = [1] * (n + 1)\n for m in range(1, n + 1):\n f *= m\n f %= MOD\n factorials[m] = f\n inv = pow(f, MOD - 2, MOD)\n invs = [1] * (n + 1)\n invs[n] = inv\n for m in range(n, 1, -1):\n inv ...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s021414927', 's323060798', 's828164406']
[11376.0, 3316.0, 11252.0]
[70.0, 21.0, 66.0]
[1022, 1052, 1086]
p03253
u341347211
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['from sys import stdin\n\n\ndef prime_factorization(n):\n i = 2\n table = []\n while i * i <= n:\n while n % i == 0:\n n //= i\n table.append(i)\n i += 1\n if n > 1:\n table.append(n)\n return table\n\n\ndef num_of_prime_factorization(n):\n i = 2\n table ...
['Runtime Error', 'Accepted']
['s267554532', 's164745343']
[3896.0, 3064.0]
[79.0, 18.0]
[816, 672]
p03253
u350049649
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['from operator import mul\nfrom functools import reduce\n\nN,M=map(int,input().split())\nP=10**9+7\nans=1\n\ndef Pdeco(m):\n ret=[]\n for i in range(2,int((M)**(0.5))+1):\n if m<=i:\n if m!=1: ret.append(int(m))\n break\n elif i==int((M)**(0.5)):\n ret.append(m)\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s007436552', 's873105681', 's441200044']
[3684.0, 3684.0, 3684.0]
[38.0, 26.0, 37.0]
[669, 669, 673]
p03253
u374103100
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['\n\n\nN, M = map(int, input().split())\n\n\ndef get_prime_dic(n):\n dic = {}\n\n i = 2\n while i * i <= n:\n while n % i == 0:\n n //= i\n if i in dic:\n dic[i] += 1\n else:\n dic[i] = 1\n i += 1\n return dic\n\n\n# Calculate cou...
['Wrong Answer', 'Accepted']
['s399872058', 's592793309']
[4396.0, 3064.0]
[2104.0, 18.0]
[626, 714]
p03253
u374531474
2,000
1,048,576
You are given positive integers N and M. How many sequences a of length N consisting of positive integers satisfy a_1 \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7. Here, two sequences a' and a'' are considered different when there exists some i such that a_i' \neq a_i''.
['from collections import defaultdict\nfrom functools import reduce\nfrom operator import mul\n\nMOD = 10 ** 9 + 7\n\ndef nCr(n, r):\n r = min(r, n - r)\n if r == 0:\n return 1\n return reduce(mul, range(n, n - r, -1)) // reduce(mul, range(1, r + 1))\n\nN, M = map(int, input().split())\n\nfactors = defa...
['Wrong Answer', 'Accepted']
['s143219270', 's204964232']
[3572.0, 3700.0]
[23.0, 24.0]
[562, 562]