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 | u123756661 | 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()\na,b={},{}\ncnt=1\n\nfor i in range(len(s)):\n if s[i] not in a and t[i] not in b:\n a[s[i]]=cnt\n b[t[i]]=cnt\n ant+=1\n elif s[i] in a and t[i] in b and (a[s[i]]==b[t[i]]):\n pass\n else\n print("No")\n exit()\nprint("Yes")', 's=input()\nt=inpu... | ['Runtime Error', 'Accepted'] | ['s800128589', 's412751064'] | [2940.0, 3632.0] | [17.0, 123.0] | [282, 283] |
p03252 | u124592621 | 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\nn = len(S)\nc1s = {}\nc2s = {}\nans = True\nfor i in range(n):\n if not ans:\n break\n\n if S[i] in c1s:\n if c1s[S[i]] != T[i]:\n ans = False\n break\n else:\n c1s[S[i]] = S[i]\n if T[i] in c2s:\n if c2s[T[i]] != S[i]:\n ... | ['Wrong Answer', 'Accepted'] | ['s740419653', 's118042635'] | [3632.0, 3632.0] | [18.0, 134.0] | [402, 402] |
p03252 | u127499732 | 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 import copy\n s, t = input(), input()\n a = [[] for _ in range(26)]\n b = copy.deepcopy(a)\n for i, j in zip(s, t):\n x, y = map(lambda x: ord(x) - 97, [i, j])\n a[x].append(y)\n b[y].append(x)\n\n f = all(len(set(i)) for i in a)\n g = all(len(set(i)) for i in a... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s002028793', 's444914296', 's691148085', 's661789648'] | [8624.0, 5936.0, 4144.0, 8624.0] | [173.0, 137.0, 97.0, 177.0] | [387, 352, 528, 397] |
p03252 | u146575240 | 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 ... | ["# C - String Transformation\nimport collections\nS = str(input())\nT = str(input())\n\nS1 = sorted(collections.Counter(S).values())\nT1 = sorted(collections.Counter(T).values())\nprint(S1,T1)\n\nif S1 == T1:\n print('Yes')\nelse:\n print('No')", "# C - String Transformation\nimport collections\nS = str(input())... | ['Wrong Answer', 'Accepted'] | ['s216016874', 's784797260'] | [4016.0, 4016.0] | [42.0, 42.0] | [237, 224] |
p03252 | u152638361 | 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())\nS.sort()\nT.sort()\nSKind = []\nTKind = []\ncnt = 1\nfor i in range(1,len(S)):\n\n if i == N-1:\n if S[i]==S[i-1]:\n cnt += 1\n SKind.append(cnt)\n else:\n SKind.append(cnt)\n SKind.append(1)\n elif S[i]==S[i-1]:\n ... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s266521305', 's469889263', 's660766213', 's203931298'] | [7448.0, 7448.0, 7448.0, 7452.0] | [101.0, 100.0, 100.0, 262.0] | [768, 831, 887, 777] |
p03252 | u157850041 | 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 = input()\nb = input()\nflag = True\nfor i in range(len(a)):\n flag1 = False \n for j in range(len(b)):\n if a[i] == b[j]:\n flag1 = True\n break\n if flag1:print(i,":ok")\n if not flag1:\n flag2 = True\n for k in range(len(a)):\n if b[i] == a[k]:\n ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s378921771', 's625323415', 's084441260'] | [5740.0, 3904.0, 3888.0] | [2104.0, 1069.0, 1218.0] | [547, 1048, 1059] |
p03252 | u163320134 | 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=inpur()\narr1=[0]*26\narr2=[0]*26\ncheck='abcdefghijklmnopqrstuvwxyz'\nfor i in range(26):\n arr1[i]=s.count(check[i])\n arr2[i]=s.count(check[i])\narr1=sorted(arr1)\narr2=sorted(arr2)\nfor i in range(26):\n if arr1[i]!=arr2[i]:\n print('No')\n break\nelse:\n print('Yes')", "s=input()\nt=input(... | ['Runtime Error', 'Accepted'] | ['s240939522', 's502161458'] | [3444.0, 3632.0] | [18.0, 118.0] | [280, 297] |
p03252 | u163449343 | 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 = Counter(list(input()))\nT = Counter(list(input()))\ns,t = list(S.values()),list(T.values())\nprint(["No", "Yes"][(s.sort() == t.sort() or len(s) % 2 != 0])', 'S = list(input())\nT = list(input())\nslen = []\ntlen = []\nans = "Yes"\n\nwhile len(S) > 0:\n tempS = S[0]\n sle... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s306647455', 's363870929', 's586875378', 's779468846'] | [2940.0, 7216.0, 2940.0, 5396.0] | [18.0, 2108.0, 17.0, 46.0] | [190, 393, 191, 174] |
p03252 | u163703551 | 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 socket\n\nhostname = socket.gethostname()\n\nif hostname == 'F551C':\n sys.stdin = open('c1.in')\n\n\ndef read_int_list():\n return list(map(int, input().split()))\n\n\ndef read_str_list():\n return input().split()\n\n\ndef read_int():\n return int(input())\n\n\ndef read_str():\n ret... | ['Runtime Error', 'Accepted'] | ['s038216513', 's943409396'] | [7340.0, 7340.0] | [59.0, 89.0] | [998, 914] |
p03252 | u175590965 | 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 ... | ['c = []\nfor i in range(3):\n c.append(list(map(int,input().split())))\na = [0,0,0]\nb = [0,0,0]\nfor i in range(3):\n b[i] = c[i][0]-0\nfor i in range(3):\n a[i] = c[0][i]-b[0]\nfor i in range(3):\n for j in range(3):\n if a[j]+b[i] != c[i][j]:\n print("No")\n exit()\nprint("Y... | ['Runtime Error', 'Accepted'] | ['s295777375', 's343889147'] | [3444.0, 4144.0] | [18.0, 41.0] | [308, 179] |
p03252 | u189575640 | 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,B,C = [int(n) for n in input().split()]\n# N = int(input())\nS = list(input())\nT = list(input())\nsame = "SAME"\ns = set()\nfor i in range(len(S)):\n if not(S[i] in s):\n s.add(S[i])\n S[i] = i\n else:\n S[i] = same\ns = set()\nfor i in range(len(T)):\n if not(T[i] in s):\n s... | ['Wrong Answer', 'Accepted'] | ['s261785783', 's621416033'] | [6704.0, 6704.0] | [99.0, 140.0] | [397, 381] |
p03252 | u201234972 | 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()\nA = [-1]*26\nB = [-1]*26\nL = len(S)\nans = 'Yes'\nfor i in range(L):\n ords = ord(S[i])-97\n ordt = ord(T[i])-97\n if A[ords] == -1 and B[ords] == -1:\n A[ords] = ordt\n B[ordt] = ords\n elif A[ords] == ordt and B[ordt] == ords:\n continue\n else:\n ... | ['Wrong Answer', 'Accepted'] | ['s857326744', 's956648972'] | [3632.0, 3632.0] | [127.0, 133.0] | [326, 326] |
p03252 | u210827208 | 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'\n\nif set(s)==set(t):\n ans='Yes'\nelse:\n for i in range(len(s)):\n if s[i]!=t[i] and t[i] in s :\n ans='No'\n break\n\nprint(ans)", "s=[0 for _ in range(26)]\nt=[0 for _ in range(26)]\nS=input()\nT=input()\n\nfor i in range(len(S)):\n s[ord(S[i])... | ['Wrong Answer', 'Accepted'] | ['s775462186', 's193761594'] | [3632.0, 3632.0] | [1239.0, 135.0] | [186, 219] |
p03252 | u213854484 | 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().split())\nT = list(input().split())\n\nSn = [ord(i)-ord("a") for i in S]\nTn = [ord(i)-ord("a") for i in T]\nsub1 = [-1]*26\nsub2 = [-1]*26\n\nfor i in range(len(S)):\n if sub1[Sn[i]] == -1 or sub2[Tn[i]] == -1:\n if sub1[Sn[i]] == -1:\n sub1[Sn[i]] = Tn[i]\n if sub2[Tn[i]... | ['Runtime Error', 'Accepted'] | ['s746907907', 's792801258'] | [3632.0, 9776.0] | [19.0, 170.0] | [464, 450] |
p03252 | u217086212 | 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()\ndic1 = {}\ndic2 = {}\nfor i in range(len(s)):\n if dic1.get(s[i]) == None:\n dic1[s[i]] = t[i]\n elif dic1[s[i]] != t[i] \n print("No")\n exit()\n if dic2.get(t[i]) == None:\n dic2[t[i]] = s[i]\n elif dic2[t[i]] != s[i]:\n print("No")\n e... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s067683638', 's486405621', 's878155222', 's832185601'] | [2940.0, 3632.0, 3632.0, 3632.0] | [17.0, 19.0, 18.0, 165.0] | [322, 445, 445, 322] |
p03252 | u217627525 | 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()\nu=[]\nv=[]\ns_len=len(s)\nfor i in range(s_len):\n s_i=s[i]\n t_i=t[i]\n ts=t_i+s_i\n if s_i!=t_i:\n if ts not in u:\n u.append(ts)\n elif s_i not in v:\n v.append(s_i)\nu_len=len(u)\nans="Yes"\nif u_len!=0:\n u.sort()\n u.append("XX")\n u_len=len... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s020574806', 's964735353', 's008824439'] | [3632.0, 3632.0, 3888.0] | [474.0, 478.0, 486.0] | [522, 456, 763] |
p03252 | u227082700 | 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,t=input(),input()\nd={"a":0,"b":0,c"":0,"d":0,"e":0,"f":0,g"":0,"h":0,"i":0,"j":0,"k":0,"l":0,"m":0,"n":0,"o":0,"p":0,"q":0,"r":0,"s":0,"t":0,"u":0,"v":0,"w":0,"x":0,"y":0,"z":0}\nfor i,j in s,t:\n if d[i]==0:d[i]=j\n elif d[i]!=j:print("No");exit()\n if d[j]==0:d[j]=i\n elif d[j]!=i:print("No");exit()\nprint("... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s162231275', 's645175622', 's709624163', 's410863216'] | [3064.0, 3632.0, 3632.0, 3632.0] | [17.0, 18.0, 2104.0, 137.0] | [316, 317, 309, 269] |
p03252 | u235210692 | 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())\nn=len(s)\ndef get_count_list(s):\n alphabets="abcdefghijklmnopqrstuvwxyz"\n ans={}\n for alphabet in alphabets:\n ans[alphabet]=[]\n for i in range(n):\n ans[s[i]].append(i)\n return ans\n\n\ndef get_index2alpha(s):\n ans={}\n for i in range(n):\n ... | ['Wrong Answer', 'Accepted'] | ['s338029873', 's918610765'] | [72328.0, 72652.0] | [146.0, 191.0] | [609, 707] |
p03252 | u237362582 | 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()\nflag = True\nflag2 = False\nl = ''\nfor i in range(len(S)):\n if S[i] != T[i]:\n if flag2 and S[i] in S[:i-1]:\n print(S[i])\n print(T[i])\n print(S)\n print(T)\n flag = False\n break\n s = S[i]\n for j... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s247336015', 's345486306', 's440661490', 's635299597', 's669112794', 's904266367', 's045433813'] | [4052.0, 3632.0, 4060.0, 3632.0, 4040.0, 4064.0, 3760.0] | [2104.0, 102.0, 2104.0, 136.0, 2104.0, 2104.0, 140.0] | [542, 320, 493, 505, 524, 473, 505] |
p03252 | u242598232 | 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()\nL=len(S)\nAZ="ABCDEFGHIJKLMNOPQRSTUVWXYZ"\nj=0\nfor i in range(L):\n\tif S[i:i+1].islower()==True:\n\t\tS=S.replace(S[i],AZ[j])\n\t\tj=j+1\nprint(S)\nk=0\nfor i in range(L):\n\tif T[i:i+1].islower()==True:\n\t\tT=T.replace(T[i],AZ[k]) \n\t\tk=k+1\nprint(T)\nif S==T:\n\tprint("Yes")\nelse:\n\tpr... | ['Wrong Answer', 'Accepted'] | ['s111360692', 's074841984'] | [4144.0, 3632.0] | [112.0, 117.0] | [296, 278] |
p03252 | u244423127 | 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\ngo = []\nback = []\ng = []\nb = []\ndef has_duplicates(seq):\n return len(seq) != len(set(seq))\n\n\nfor i in range(len(s)):\n go.append(s[i]+t[i])\n back.append(t[i]+s[i])\n\ngo_l = set(go)\nback_l = set(back)\ngo = list(go_l)\nback = list(back_l)\n\nprint(go)\nprint(back)\n\nfor i i... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s342530935', 's619485195', 's828744376', 's966922756'] | [29232.0, 3444.0, 6660.0, 29232.0] | [156.0, 19.0, 84.0, 154.0] | [499, 134, 294, 503] |
p03252 | u246820565 | 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 = str(input())\nT = str(input())\n\n\nfrom collections import defaultdict\ns = defaultdict(int)\nt = defaultdict(int)\n\n\nfor i in S:\n\ts[i] += 1\n\nfor j in T:\n\tt[j] += 1\n\t\nss = sorted(s.values())\ntt = sorted(t.values())\n\nprint(ss,tt)\n\nif ss == tt:\n\tprint('Yes')\nelse:\n\tprint('No')", "#coding:utf-8... | ['Wrong Answer', 'Accepted'] | ['s605062748', 's298167477'] | [3812.0, 4016.0] | [68.0, 74.0] | [273, 1107] |
p03252 | u255172538 | 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 ... | ['str1 = input()\nstr2 = input()\n\ndict = dict()\nans = "Yes"\n\nfor i in range(len(str1)):\n if(str1[i] in dict):\n if(dict[str[i]] != str2[i]):\n ans = "No"\n else:\n dict[str1[i]] = str2[i]\n\nprint(ans)\n', 'str1 = input()\nstr2 = input()\n\ndict1 = dict()\nans = "Yes"\n\nfor i in ra... | ['Runtime Error', 'Accepted'] | ['s245779495', 's484086559'] | [3632.0, 3632.0] | [17.0, 85.0] | [224, 298] |
p03252 | u256464928 | 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()\ncnt = 0\nfor i in range(len(S)):\n if cnt > 30:\n break\n if S[i] != T[i]:\n X = S[i]\n S = S.replace(S[i],"X")\n S = S.replace(T[i],X)\n S = S.replace("X",T[i])\n cnt += 1\n print(S)\nprint("Yes" if S == T else "No")', 'S = input()\nT = input()\ncnt = 0\nfor i in range(... | ['Runtime Error', 'Accepted'] | ['s243148998', 's584454365'] | [134884.0, 3632.0] | [179.0, 96.0] | [251, 260] |
p03252 | u281610856 | 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()\ns_cnt = sorted(Counter(s).values(), reverse=True)\nt_cnt = sorted(Counter(t).values(), reverse=True)\nprint(s_cnt)\nprint(t_cnt)\nif s_cnt == t_cnt:\n print('Yes')\nelse:\n print('No')\n", "from collections import Counter\ns = input()\nt = input()\ns_cn... | ['Wrong Answer', 'Accepted'] | ['s570136005', 's319538186'] | [4144.0, 4016.0] | [41.0, 43.0] | [240, 213] |
p03252 | u286754585 | 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=sorted(s)\nt=sorted(t)\nif (s==t):\n print("Yes")\nelse:\n print("No")', 's=input()\nt=input()\nn=len(s)\ns=sorted(s)\nt=sorted(t)\nLists={}\nnums=[]\nListt={}\nnumt=[]\n\nfor i in range(n):\n Lists.setdefault(s[i], 0)\n Listt.setdefault(t[i], 0)\n Lists[s[i]]+=1\n Listt[t[i]... | ['Wrong Answer', 'Accepted'] | ['s776343729', 's757076314'] | [7580.0, 7580.0] | [101.0, 224.0] | [93, 455] |
p03252 | u298945776 | 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\nN = len(S)\nSlist = {}\nTlist = {}\nfor i in range(N):\n if S[i] in Slist:\n Slist[S[i]] += 1\n else:\n Slist[S[i]] = 1\n if T[i] in Tlist:\n Tlist[T[i]] += 1\n else:\n Tlist[T[i]] = 1\n\nM = len(Slist)\nL = len(Tlist)\nif M == L:\n skey = []\n ... | ['Wrong Answer', 'Accepted'] | ['s413990203', 's393706246'] | [3632.0, 3632.0] | [127.0, 127.0] | [741, 683] |
p03252 | u305965165 | 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\ns_idx = []\nt_idx = []\n\ndef f(S):\n idx = []\n dic = []\n for s in S:\n if s in dic:\n idx.append(dic.index(s))\n else:\n idx.append(len(dic))\n dic.append(s)\n \n return idx\n\nfor i in range(len(S)):\n if S[i] != T[i]:\... | ['Wrong Answer', 'Accepted'] | ['s375210977', 's326172700'] | [3632.0, 6832.0] | [18.0, 204.0] | [346, 356] |
p03252 | u310678820 | 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()\ndef C(a, b):\n d={}\n for i in range(len(a)):\n if a[i] in d:\n print(a[i])\n if d[a[i]]!=b[i]:\n return False\n else:\n d[a[i]]=b[i]\n return True\nif C(s, t)and C(t, s):\n print('Yes')\nelse:\n print('No')\n ",... | ['Wrong Answer', 'Accepted'] | ['s381132726', 's756442522'] | [4908.0, 3632.0] | [316.0, 88.0] | [300, 267] |
p03252 | u311379832 | 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 string\nimport sys\nS = input()\nT = input()\nsLst = [0] * 26\ntLst = [0] * 26\n\nfor i in range(26):\n sLst[i] = S.count(string.ascii_lowercase[i])\n tLst[i] = T.count(string.ascii_lowercase[i])\nsLst.sort(reverse=True)\ntLst.sort(reverse=True)\n\nfor i in range(26):\n if sLst[i] != tLst[i]:\n ... | ['Wrong Answer', 'Accepted'] | ['s806748968', 's023164138'] | [4156.0, 4272.0] | [36.0, 37.0] | [348, 349] |
p03252 | u314050667 | 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 as C\nimport sys\ns = input()\nt = input()\n\nif len(set(s)) != len(set(t)):\n print("NO")\n sys.exit()\n\nans = [0] * len(s)\nstock = C.Counter([])\nfor i in range(len(s)):\n if s[i] not in stock.keys():\n stock[s[i]] = t[i]\n ans[i] = stock[s[i]]\n\nss = "".join(ans)\n\nprint("... | ['Wrong Answer', 'Accepted'] | ['s581793570', 's522430440'] | [5680.0, 5680.0] | [125.0, 120.0] | [334, 391] |
p03252 | u327532412 | 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, T = input(), input()\nma, ima = {}, {}\nok = True\nfor i in range(len(S)):\n s, t = S[i], T[i]\n if s in ma and ma[s] != t:\n ok = False\n if t in ima and ima[t] != s:\n ok = False\n ma[s] = t, ima[t] = s\nif ok:\n print("Yes")\nelse:\n print("No")', 'S, T = input(), input()\nma, im... | ['Runtime Error', 'Accepted'] | ['s233215257', 's834877337'] | [3632.0, 3632.0] | [18.0, 163.0] | [270, 273] |
p03252 | u328755070 | 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 collctions import Counter\n\nS = list(input())\nT = list(input())\n\nScount = Counter(S).values()\nTcount = Counter(T).values()\n\n\n\nif sorted(Scount) == sorted(Tcount):\n ans = 'Yes' \nelse:\n ans = 'No'\n\nprint(ans)", "from collections import Counter\n\nS = list(input())\nT = list(input())\n\nScount =... | ['Runtime Error', 'Accepted'] | ['s463863597', 's165591310'] | [2940.0, 6960.0] | [18.0, 49.0] | [216, 217] |
p03252 | u333190709 | 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 = int('a', 36)\nS = list(input())\nT = list(input())\n\ns_index = [[] for i in range(28)]\nt_index = [[] for i in range(28)]\n\nfor i in range(len(S)):\n s_index[int(S[i], 36) - a].append(i)\n t_index[int(T[i], 36) - a].append(i)\n\ns_index = sorted(s_index)\nt_index = sorted(t_index)\n\nprint(s_index)\nprint(t_i... | ['Wrong Answer', 'Accepted'] | ['s030952305', 's047733364'] | [24448.0, 17256.0] | [222.0, 181.0] | [367, 336] |
p03252 | u340010271 | 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()\nfrom collections import Counter\ns=list(S)\nt=list(T)\na=Counter(s)\nb=Counter(t)\nc=a.most_common()\nd=b.most_common()\nflag=True\nfor i in range(len(s)):\n if d[i][1]==1 and c[i][1]==1:\n break\n if d[i][1]>=2 and flag:\n e=[]\n for j in range(len(s)):\n i... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s638226392', 's865105354', 's978556722', 's249632406'] | [10804.0, 9392.0, 10288.0, 8752.0] | [763.0, 199.0, 207.0, 748.0] | [772, 577, 576, 767] |
p03252 | u344959886 | 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())\nss=len(set(s))\ntt=len(set(t))\n\nl=[]\nfor i,j in zip(s,t):\n l.append(i+j)\nprint(l)\nif len(set(l)) == ss == tt:\n print("Yes")\nelse:\n print("No")\n', 's=list(input())\nt=list(input())\nss=len(set(s))\ntt=len(set(t))\n\nl=[]\nfor i,j in zip(s,t):\n l.append(i+j)\n\ni... | ['Wrong Answer', 'Accepted'] | ['s213861590', 's024415006'] | [22828.0, 19248.0] | [105.0, 87.0] | [183, 175] |
p03252 | u347640436 | 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 exit\nS = input()\nT = input()\nfor i in range(26):\n c = chr(i + ord('a'))\n d[c] = '\\0'\nfor i in range(len(S)):\n if d[S[i]] != '\\0' or d[T[i]] != '\\0':\n if d[S[i]] != T[i] or d[T[i]] != S[i]:\n print('No')\n exit()\n d[S[i]] = T[i]\n d[T[i]] = S[i]\nprint('Yes')\n", "from sys... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s429522030', 's733503875', 's862710302', 's419484311'] | [3632.0, 3632.0, 3632.0, 3632.0] | [19.0, 18.0, 18.0, 156.0] | [289, 179, 290, 320] |
p03252 | u349091349 | 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\ns=input()\nt=input()\nn=len(s)-1\nd=dict()\nfor i in range(n):\n if t[i] in d.keys():\n \tif d[t[i]] != s[i]:\n print("No")\n sys.exit()\n else:\n d[t[i]] = s[i]\nelse:\n print("Yes")', 'import sys\ns=input()\nt=input()\nn=len(s)\nd=dict()\nd2=dict()\nfor i in range(n):\n if t[i] in d.... | ['Runtime Error', 'Accepted'] | ['s432918556', 's490123790'] | [2940.0, 3632.0] | [18.0, 155.0] | [198, 374] |
p03252 | u350248178 | 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\ns=input()\nt=input()\n\ndef c(a,b,s,t):\n li=""\n j=0\n for i in s:\n if i==a:\n li+=b\n if t[j]!=b:\n print("No")\n sys.exit()\n elif i==b:\n li+=a\n else:\n li+=i\n j+=1\n return li\n \n\... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s038954519', 's432420011', 's174954264'] | [3632.0, 3632.0, 3820.0] | [18.0, 18.0, 709.0] | [467, 571, 364] |
p03252 | u350997995 | 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"\nstart = [-1]*26\ngoal = [-1]*26\nfor i in range(len(S)):\n s,t = ord(S[i])-96,ord(T[i])-96\n if start[s]!=-1 or goal[t]!=-1:\n if start[s]!=t or goal[t]!=s:\n ans = "No"\n else:\n start[s] = t\n goal[t] = s\nprint(ans)', 'S = input()\nT =... | ['Runtime Error', 'Accepted'] | ['s160904211', 's925656220'] | [3632.0, 3632.0] | [140.0, 144.0] | [285, 285] |
p03252 | u353241315 | 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\nif __name__ == '__main__':\n S = str(input())\n T = str(input())\n \n count = defaultdict(str)\n \n flag = True\n for i in range(len(S)):\n s = S[i]\n t = T[i]\n if count[t] != '':\n if count[t] != s:\n flag = Fal... | ['Runtime Error', 'Accepted'] | ['s509111768', 's901998628'] | [4016.0, 4016.0] | [99.0, 91.0] | [429, 587] |
p03252 | u357949405 | 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()\nN = len(S)\n\n# counter_S = []\n# counter = 1\n# p = S[0]\n\n# if p != S[i]:\n# counter_S.append(counter)\n# p = S[i]\n# counter = 1\n# else:\n# counter += 1\n# counter_S.append(counter)\n#\n# counter_T = []\n# counte... | ['Wrong Answer', 'Accepted'] | ['s473678273', 's115373142'] | [9340.0, 3760.0] | [2104.0, 196.0] | [1251, 421] |
p03252 | u361381049 | 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())\ndic = {}\nflg = 'Yes'\nfor i in range(len(s)):\n if s[i] in dic.keys():\n if t[i] != dic.values(s[i]):\n flg = 'No'\n else:\n dic[s[i]] = t[i]\nprint(flg)", "s = list(input())\nt = list(input())\ndic = {}\nflg = 'Yes'\nfor i in range(len(s)):\n ... | ['Runtime Error', 'Accepted'] | ['s923484541', 's837949855'] | [6704.0, 6704.0] | [24.0, 159.0] | [214, 370] |
p03252 | u367130284 | 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 itertools import*;i=lambda:sorted([len(list(v))for k,v in groupby(input()]);print('YNeos'[i()!=i()::2])", 'from collections import*\ne=defaultdict(list)\nd=defaultdict(list)\nfor k,v in enumerate(input()):\n e[v].append(k)\nfor k,v in enumerate(input()):\n d[v].append(k)\nif set(map(tuple,e.values()))==set... | ['Runtime Error', 'Accepted'] | ['s613361971', 's523429155'] | [2940.0, 23472.0] | [17.0, 122.0] | [108, 262] |
p03252 | u371385198 | 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\ninput = sys.stdin.readline\n\n\ndef readstr():\n return input().strip()\n\n\ndef readint():\n return int(input())\n\n\ndef readnums():\n return map(int, input().split())\n\n\ndef readstrs():\n return input().split()\n\n\ndef main():\n S = readstr()\n T = readstr()\n sl = dict()\n f... | ['Wrong Answer', 'Accepted'] | ['s056933465', 's013366975'] | [3632.0, 3632.0] | [61.0, 52.0] | [828, 679] |
p03252 | u373047809 | 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*\nf=lambda:sorted(Counter(input()).values())\nprint("YNEOS"[f()!=f()::2])', 'from collections import*\nf=lambda:sorted(Counter(input()).values())\nprint("YNeos"[f()!=f()::2])'] | ['Wrong Answer', 'Accepted'] | ['s761595328', 's731937448'] | [9568.0, 9456.0] | [52.0, 52.0] | [95, 95] |
p03252 | u375616706 | 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 ... | ['mod = 10 ** 9 + 7\nn, m = map(int, input().split())\n\nf = []\np = 2\nwhile p * p <= m:\n if m % p != 0:\n p += 1\n continue\n c = 0\n while m % p == 0:\n c += 1\n m //= p\n f.append(c)\n p += 1\nif m != 1:\n f.append(1)\n\n\ndef comb(a, b):\n ret = 1\n r = min(b, a... | ['Runtime Error', 'Accepted'] | ['s874971449', 's182893648'] | [3572.0, 4016.0] | [20.0, 41.0] | [534, 221] |
p03252 | u375695365 | 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\n\ns=str(input())\nt=str(input())\n\nsa=list(s)\nta=list(t)\n\nasa=collections.Counter(sa)\nata=collections.Counter(ta)\n\ncasa=[i[0] for i in asa.items() if i[1] >= 2]\n\ncata=[i[0] for i in ata.items() if i[1] >= 2]\n#print(casa)\n#print(cata)\nif casa==[] and cata==[]:\n print("Yes")\n e... | ['Wrong Answer', 'Accepted'] | ['s538863904', 's115184021'] | [7216.0, 4136.0] | [48.0, 40.0] | [336, 296] |
p03252 | u390694622 | 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()\nf = [-1 for _ in range(130)]\ng = [-1 for _ in range(130)]\nans = "Yes"\nfor i in len(S):\n s = ord(S[i])\n t = ord(T[i])\n if f[s] == -1:\n f[s] = t\n else:\n if f[s] != t:\n ans = "No"\n if g[t] == -1:\n g[t] = s\n else:\n if g[t] != s:\n ans = "No"\nprint(ans)'... | ['Runtime Error', 'Accepted'] | ['s789742924', 's451051981'] | [3632.0, 3632.0] | [17.0, 138.0] | [299, 307] |
p03252 | u394853232 | 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 ... | ['s1 = input()\ns2 = input()\nif len(s1) != len(s2):\n print("No")\nelse:\n D1 = {}\n D2 = {}\n flag = True\n for x, y in zip(s1, s2):\n if x not in D1:\n D1[x] = y\n else:\n flag = (flag and (D1[x] == [y]))\n if y not in D2:\n D2[y] = x\n else... | ['Wrong Answer', 'Accepted'] | ['s109554099', 's275243299'] | [3632.0, 3632.0] | [18.0, 99.0] | [452, 448] |
p03252 | u395816772 | 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()\nmemo = {}\nans = 'Yes'\nfor i in range(len(s)):\n if s[i] in memo:\n if t[i] != memo[s[i]]:\n ans = 'No'\n break\n else:\n memo[s[i]] = t[i]\na = memo.values()\nif set(a) != len(a):\n ans = 'No'\nprint(ans)", "s = input()\nt = input()\nmemo = {}\n... | ['Wrong Answer', 'Accepted'] | ['s969523740', 's669178645'] | [9348.0, 9416.0] | [74.0, 72.0] | [263, 286] |
p03252 | u403984573 | 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()\nSkey=sorted(S,key=S.index)\nTkey=sorted(t,ket=T.index)\n\nfor index,i in enumerate(Skey):\n S=S.replace(i,str(index))\nfor index,i in enumerate(Tkey):\n T=T.replace(i,str(index))\n\nif S==T:\n print("Yes")\nelse:\n print("No")\n', 'S=input()\nT=input()\nSkey,Tkey=[],[]\nfor i in range(len(S)... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s011933698', 's724491113', 's026343014'] | [8688.0, 7136.0, 3992.0] | [79.0, 2104.0, 40.0] | [240, 277, 250] |
p03252 | u408620326 | 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\nfrom collections import defaultdict\ninput = sys.stdin.readline\n\nS = input().strip()\nT = input().strip()\ndic = defaultdict(list)\n\ndef check(d):\n for k, i in d.items():\n if k != i:\n return False\n else:\n return True\n\nfor s, t in zip(S, T):\n if t not in dic[s]:... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s297356865', 's698634359', 's894415788', 's807336840'] | [4144.0, 3632.0, 4144.0, 3632.0] | [75.0, 18.0, 73.0, 57.0] | [618, 419, 677, 287] |
p03252 | u416758623 | 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\nfrom collections import defaultdict\ns = input()\nt = input()\nd1 = defaultdict(set)\nd2 = defaultdict(set)\n\nfor i in range(len(s)):\n d1[t[i]].add(s[i])\n d2[s[i]].add(t[i])\n print(d1,d2)\n if len(d1[t[i]])>1 or len(d2[s[i]])>1:\n print("No")\n sys.exit()\nprint("Yes")\n', 'i... | ['Wrong Answer', 'Accepted'] | ['s866173930', 's895917716'] | [36972.0, 3932.0] | [2104.0, 176.0] | [298, 281] |
p03252 | u417794477 | 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\nfor i in range(len(s)):\n if s[i] == t[i]:\n continue\n else:\n s = s.translate(str.maketrans({s[i]: t[i], t[i]: s[i]}))\nif s == t:\n print("yes")\nelse:\n print("no")', 'S = input()\nT = input()\nSdictionary = {}\nTdictionary = {}\nans = "Yes"\nfor i in range(le... | ['Wrong Answer', 'Accepted'] | ['s192590310', 's858318726'] | [4400.0, 3632.0] | [2104.0, 124.0] | [211, 441] |
p03252 | u440161695 | 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()\nA=[]\nB=[]\nc,d=0,0\nfor i in range(len(S)):\n if S[i]==S[i+1]:\n c+=1\n else:\n A.append(c)\n c=0\n\nfor i in range(len(T)):\n if T[i]==T[i+1]:\n d+=1\n else:\n B.append(d)\n d=0\nprint("Yes" if A==B else "No")', 'S=input()\nT=input()\nRs=[-1]*26\nRt=[-1]*26\nfor i in rang... | ['Runtime Error', 'Accepted'] | ['s836728042', 's415410167'] | [5168.0, 3632.0] | [75.0, 169.0] | [237, 268] |
p03252 | u442581202 | 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 ... | ['str1 = list(input())\nstr2 = list(input())\n\nn = len(str1)\n\nfor i in range(n):\n if str1[i]==str2[i]:\n continue\n for j in range(i+1,n):\n if str1[j]==str1[i]:\n tmp = str2[i]\n str2[i] = str1[j]\n str1[j] = tmp\n break\n elif str2[j] == str1[... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s264135184', 's670070195', 's169594361'] | [8488.0, 6704.0, 3632.0] | [616.0, 26.0, 183.0] | [543, 633, 457] |
p03252 | u442877951 | 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 = str(input())\nT = str(input())\nalp = "abcdefghijklmnopqrstuvwxyz"\nfor i in range(0,len(S)//2):\n if S[i] != T[i]:\n S = S.translate(str.maketrans({S[i]:T[i], T[i]:S[i]}))\n if S == T:\n print("Yes")\n exit()\nprint("No")', 'from collections import Counter\nS = str(input())\nT = str(input())\ns = Coun... | ['Wrong Answer', 'Accepted'] | ['s550371048', 's157873654'] | [4512.0, 4016.0] | [2104.0, 41.0] | [228, 175] |
p03252 | u444398697 | 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=input()\nb=input()\n\nwhile (1):\n if a=='':\n break\n a=a.replace(a[0],'')\n b=b.replace(b[0],'')\n print(a,b)\n \n\n if len(a)!=len(b):\n print('No')\n exit()\n\nprint('Yes')\n", "a=input()\nb=input()\n\nwhile (1):\n if a=='':\n break\n a=a.replace(a[0],'')\n ... | ['Wrong Answer', 'Accepted'] | ['s307456737', 's813115417'] | [5484.0, 3632.0] | [32.0, 31.0] | [203, 187] |
p03252 | u445619807 | 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\nimport copy\n\ndef main():\n data0 = np.array(list(input()))\n data1 = np.array(list(input()))\n\n flag = True\n data_tmp = data0\n count = 0\n len_data = len(data0)\n while(count <= len_data):\n if not list(data0):\n break\n count += 1\n c0 = d... | ['Runtime Error', 'Accepted'] | ['s421349972', 's051654786'] | [2940.0, 3760.0] | [17.0, 31.0] | [741, 415] |
p03252 | u445624660 | 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()\nsd, td = {}, {}\nfor i in range(len(s)):\n if s[i] not in sd and t[i] not in td:\n sd[s[i]] = t[i]\n td[t[i]] = s[i]\n else:\n # if sd[s[i]] != t[i] or td[t[i]] != s[i]:\n if s[i] in sd and t[i] in td:\n pass\n else:\n print("N... | ['Wrong Answer', 'Accepted'] | ['s071753750', 's291239831'] | [3692.0, 12236.0] | [79.0, 87.0] | [488, 750] |
p03252 | u448747186 | 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\ncount1 = collections.Counter(S)\ncount2 = collections.Counter(T)\n\ncount1=sorted(count1.items(), key=lambda x: x[1])\ncount2=sorted(count2.items(), key=lambda x: x[1])\n\nif len(S) == len(T):\n if len(count1) != len(count2):\n print('No')\n else:\n ... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s830584005', 's838011999', 's857649051', 's990336552', 's392324667'] | [15892.0, 15892.0, 15880.0, 3932.0, 20344.0] | [603.0, 647.0, 625.0, 42.0, 616.0] | [756, 756, 756, 776, 797] |
p03252 | u449863068 | 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 = {}\n\nfor s, t in zip(S, T):\n if s in d:\n \n if d[s] != t:\n print("No")\n exit()\n else:\n d[s] = t\n\nprint(d)\nprint(len(d))\nprint(len(set(d.values())))\n\n\nif len(d) != len(set(d.values())):\n print("No")\nelse:\n print("Yes")\n\n', 'S = input()\nT = input(... | ['Wrong Answer', 'Accepted'] | ['s977445758', 's472143570'] | [3632.0, 3632.0] | [58.0, 53.0] | [460, 408] |
p03252 | u451017206 | 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 math import sqrt, ceil, factorial\nfrom collections import Counter\n\nm = 10**9+7\ndef is_prime(n):\n if n == 1: return False\n if n == 2: return True\n for i in range(2, ceil(sqrt(n))+1):\n if n % i == 0: return False\n return True\n\ndef prime_factorization(n):\n if is_prime(n):return [n]... | ['Runtime Error', 'Accepted'] | ['s050355510', 's447585529'] | [3824.0, 3632.0] | [22.0, 124.0] | [726, 327] |
p03252 | u456353530 | 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 ... | ['Ga={}\nGb={}\nA=list(input())\nB=list(input())\nflag = True\nfor i in range(len(A)):\n if A[i] in Ga and Ga[A[i]] != B[i]:\n flag = False\n break\n else:\n Ga[A[i]] = B[i]\nfor i in range(len(B)):\n if B[i] in Gb and Gb[B[i]] != A[i]:\n flag = False\n break\n else:\n Gb[B[i]] = A[i]\nif flag:\n ... | ['Wrong Answer', 'Accepted'] | ['s907982684', 's959228927'] | [6704.0, 6704.0] | [186.0, 203.0] | [333, 309] |
p03252 | u463655976 | 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\nU = set()\nfor s, t in sorted(zip(S, T)):\n U.add((s, t))\n\nfor x, y in zip(U[0:-1], U[1:]):\n if x == y:\n print("No")\n break\nelse:\n print("Yes")\n\n \n\n', 'S = input()\nT = input()\n\nU = set()\nfor s, t in sorted(zip(S, T)):\n U.add((s, t))\n\nU = sorted(U)\nprint(U)\nfo... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s274552922', 's536303485', 's370177929'] | [18728.0, 18728.0, 17968.0] | [196.0, 206.0, 81.0] | [181, 205, 273] |
p03252 | u465691148 | 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\ni = 0\nhis = []\nlength = len(s)\nflag = True\nfor i in range(0, length-1):\n\tss = s[i:i+1]\n\ttt = t[i:i+1]\n\tif ss != tt:\n\t\tif tt in his:\n\t\t\tflag = False\n\t\t\tbreak\n\t\telse:\n\t\t\this.append(tt)\n\t\t\tit1 = re.finditer(ss, s)\n\t\t\tit2 = re.finditer(tt, s)\n\t\t\tfor matc... | ['Runtime Error', 'Accepted'] | ['s376803572', 's163024660'] | [3632.0, 3632.0] | [19.0, 118.0] | [447, 369] |
p03252 | u466331465 | 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())\ndics ={}\ndic ={}\nfor i in range(len(S)):\n if S[i] in dics:\n \tdics[S[i]]=[dics[S[i]],i]\n else :\n dics[S[i]]=[i]\n if T[i] in dic:\n dic[T[i]]=[dic[T[i]],i]\n else:\n dic[T[i]]=[i]\nprint(dic)\nfor i in range(len(S)):\n if dics[S[i]]!=dic[T[i]] and (T[i] in di... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s092768492', 's261302387', 's032610820'] | [50480.0, 6704.0, 3632.0] | [692.0, 25.0, 75.0] | [375, 351, 236] |
p03252 | u480200603 | 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())\ns = list(set(s))\nt = list(set(t))\nif len(s) == len(t):\n for i in range(len(s)):\n if s[i] == t[i]:\n print("No")\n exit()\n else:\n print("Yes")\nelse:\n print("No")\n', 's = list(input())\nt = list(input())\nx = list(set(s)... | ['Wrong Answer', 'Accepted'] | ['s109008905', 's837343232'] | [6704.0, 6704.0] | [30.0, 134.0] | [248, 278] |
p03252 | u485716382 | 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 solve(S, T):\n StoT = {}\n TtoS = {}\n for s, t in zip(S, T):\n print('----------------')\n print(s, t)\n if s not in StoT:\n StoT[s] = t\n if t not in TtoS:\n TtoS[t] = s\n \n if StoT[s] != t or TtoS[t] != s:\n return False\n ... | ['Wrong Answer', 'Accepted'] | ['s621670542', 's999775289'] | [49960.0, 6704.0] | [1217.0, 62.0] | [473, 378] |
p03252 | u492447501 | 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\nd = {}\n\nfor i in range(len(S)):\n if T[i] in d and d[T[i]]!=S[i]:\n print("NO")\n sys.exit()\n d[T[i]] = S[i]\nprint("YES")', 'import sys\n\nS = input()\nT = input()\n\nd_T = {}\nd_S = {}\n\nfor i in range(len(S)):\n if T[i] in d_T and d_T[T[i]]!=S[i]... | ['Wrong Answer', 'Accepted'] | ['s620409478', 's339231981'] | [3632.0, 3632.0] | [105.0, 194.0] | [175, 319] |
p03252 | u501750652 | 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\ncs = sorted(Counter(S).values())\nct = sorted(Counter(T).values())\n\nprint(cs)\nprint(ct)\n\nif cs == ct:\n print('Yes')\nelse:\n print('No')", 'import numpy as np\nS = str(input())\nT = str(input())\n\nS_and_T = list(set(S) & set(T))\n... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s084350987', 's890902953', 's882757571'] | [6960.0, 20392.0, 6960.0] | [49.0, 288.0, 48.0] | [209, 316, 188] |
p03252 | u506689504 | 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\nRs = {}\nRt = {}\nfor i in range(len(S)):\n if S[i] in Rs.keys:\n if Rs[S[i]] != T[i]:\n print("No")\n exit()\n else:\n Rs[S[i]] = T[i]\n\n if T[i] in Rt.keys:\n if Rt[T[i]] != S[i]:\n print("No")\n exit()\n else:\n... | ['Runtime Error', 'Accepted'] | ['s343219452', 's443125990'] | [3632.0, 3632.0] | [18.0, 149.0] | [337, 341] |
p03252 | u509368316 | 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=[[] for i in range(26)]\nfor i,c in enumerate(S):\n d[ord(c)-ord('a')].append(i)\nd2=[[] for i in range(26)]\nfor i,c in enumerate(T):\n d2[ord(c)-ord('a')].append(i)\nd.sort(key=lambda x:x[0])\nd2.sort(key=lambda x:x[0])\nf=1\nfor i in range(26):\n if len(d[i])!=len(d2[i]):\n ... | ['Runtime Error', 'Accepted'] | ['s737860732', 's650868292'] | [26688.0, 29680.0] | [159.0, 182.0] | [424, 265] |
p03252 | u511379665 | 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()\nL=len(S)\n\ndds=defaultdict(int)\nddt=defaultdict(int)\n\nfor i in range(L):\n s=S[i]\n t=T[i]\n if dds[s]==0:\n dds[s]=t\n else:\n if dds[s]!=t:\n print("No")\n exit()\n if ddt[t]==0:\n ddt[t]=s\n else:\n if ddt[t]!=s:\n ... | ['Runtime Error', 'Accepted'] | ['s860856376', 's431228661'] | [3632.0, 4144.0] | [18.0, 135.0] | [346, 383] |
p03252 | u513081876 | 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()\nfor i in range(len(S)):\n kensa1 = [index for index, word in enumerate(S) if S[i] == word]\n kensa2 = [index for index, word in enumerate(S) if T[i] == word]\n if kensa1 != kensa2:\n print('No')\n break\nelse:\n print('Yes')", "S = input()\nT = input()\ncnt = []\nan... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s873515717', 's890705153', 's537079097'] | [15540.0, 3632.0, 3888.0] | [113.0, 18.0, 121.0] | [267, 583, 435] |
p03252 | u517447467 | 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 = input()\nB = input()\n\nflag = True\nif len(A) != len(B):\n flag = False \n\npair_dict = dict()\nreverse_dict = dict()\nfor i in range(len(A)):\n if A[i] not in pair_dict:\n pair_dict[A[i]] = B[i]\n elif pair_dict[A[i]] != B[i]:\n flag = False\n break\n if B[i] not in reverse_dict:\n reverse_dict[... | ['Wrong Answer', 'Accepted'] | ['s760878746', 's011689526'] | [3632.0, 3632.0] | [126.0, 127.0] | [421, 421] |
p03252 | u518042385 | 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 ... | ['d={}\nw1=input()\nw2=input()\nnum=len(w1)\nb=True\nfor i in list("qwertyuiopasdfghjklzxcvbnm"):\n d[i]=""\nfor i in range(num):\n if d[w1[i]]=="":\n d[w1[i]]=w2[i]\n elif d[w1[i]]==w2[i]:\n pass\n elif d[w1[i]]!=w2[i]:\n b=False\n break\nif b:\n print("No")\nelse:\n l=[]\n for i in d:\n if d[i] ... | ['Wrong Answer', 'Accepted'] | ['s688432107', 's805002529'] | [3632.0, 3632.0] | [82.0, 81.0] | [436, 441] |
p03252 | u519452411 | 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()\nfor i in range(len(s)):\n if s[i] == t[i]:\n else:\n s = s.translate(str.maketrans(s[i]+t[i],t[i]+s[i]))\n\nif s == t:\n print("Yes")\nelse:\n print("No")', 's = input()\nt = input()\nused_str = []\nfor i in range(len(s)):\n if s[i] != t[i] and not s[i] in used_str and not t[i] in us... | ['Runtime Error', 'Accepted'] | ['s789169183', 's598207359'] | [2940.0, 4400.0] | [17.0, 266.0] | [177, 285] |
p03252 | u527261492 | 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\ns=input()\nt=input()\ndef hanten(*S,c1,c2):\n for i range(len(S)):\n if S[i]==c1:\n S[i]=c2\n if S[i]==c2:\n S[i]=c1\nfor j,k in s:\n if hanten(s,j,k)==t:\n print('Yes')\n sys.exit()\nprint('No')", "import collections\ns=input()\nt=input()\ncnt1=1\ncnt2=1\nlst1=[]\nlst2=[]\nfor i i... | ['Runtime Error', 'Accepted'] | ['s810271071', 's565312050'] | [2940.0, 9112.0] | [17.0, 154.0] | [218, 419] |
p03252 | u543173665 | 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()\ncount = 0\nfor i in range(26):\n start[i] = -1\n goal[i] = -1\nfor i in range(0,len(s)):\n a = s[i]\n b = t[i]\n if start[a] != -1 or goal[b] != -1:\n if start[a] != b or goal[b] != a:\n count = 1\n break\n else:\n start[a] = b\n g... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s267860403', 's416347154', 's566859424', 's688274345', 's789214508', 's801437892', 's887656122', 's039860275'] | [3632.0, 3632.0, 3632.0, 3632.0, 3632.0, 3632.0, 6704.0, 3632.0] | [18.0, 18.0, 156.0, 154.0, 18.0, 18.0, 25.0, 157.0] | [367, 375, 361, 361, 395, 384, 397, 382] |
p03252 | u543411290 | 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=input()\nb=input()\nc={}\nstate=True\nfor i in range(len(a)):\n if b[i] not in c:\n c[b[i]]=a[i]\n if b[i] in c:\n if c[b[i]]!=a[i]:\n state=False\n else:\n state=False\nif state:\n print('Yes')\nelse:\n print('No')", "a=input()\nb=input()\nc={}\nstate=True\nfor i in range(len(a)):\n b[i] not in c... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s020431884', 's285207983', 's566690955'] | [2940.0, 2940.0, 3632.0] | [17.0, 17.0, 93.0] | [219, 199, 249] |
p03252 | u547167033 | 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()\nc1=Counter(s)\nc2=Counter(t)\nc1.sort()\nc2.sort()\nprint('Yes' if c1==c2 else 'No')", "from collections import Counter\ns=input()\nt=input()\nc1=list(Counter(s).values())\nc2=list(Counter(t).values())\nc1.sort()\nc2.sort()\nprint('Yes' if c1==c2 else 'No')\n"] | ['Runtime Error', 'Accepted'] | ['s641947167', 's837358574'] | [4016.0, 4144.0] | [42.0, 41.0] | [132, 163] |
p03252 | u556672233 | 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_to_t = {}\nt_to_s = {}\n\nfor i in range(len(s)):\n if s[i] not in s_to_t:\n if t[i] not in t_to_s:\n s_to_t[s[i]] = t[i]\n t_to_s[t[i]] = s[i]\n continue\n else:\n print('No')\n exit(0)\n elif s_to_t[s[i]] == t[i] and t_to_s[t[i]] == s[i]:\... | ['Runtime Error', 'Accepted'] | ['s743543755', 's885537317'] | [3064.0, 3632.0] | [18.0, 100.0] | [403, 434] |
p03252 | u558720836 | 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_str = [ord(i) for i in input()]\nt_str = [ord(i) for i in input()]\n\ns = sorted(s_str)\nt = sorted(t_str)\n\ncnt_s = 1\ncnt_t = 1\ns_num = []\nt_num = []\n\nfor i in range(len(s)-1):\n if s[i] == s[i+1]:\n cnt_s += 1\n if i == len(s)-2:\n s_num.append(cnt_s)\n else:\n s_num.ap... | ['Wrong Answer', 'Accepted'] | ['s408705780', 's543347824'] | [10572.0, 10508.0] | [246.0, 248.0] | [618, 592] |
p03252 | u562015767 | 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 collections\n\ns = list(map(str,input()))\nt = list(map(str,input()))\ncnts = collections.Counter(s)\ncntt = collections.Counter(t)\ncs = sorted(cnts.values())\nct = sorted(cntt.values())\n\nprint(cs)\nprint(ct)\n\nif len(s) != len(t):\n print("No")\n sys.exit()\n\nfor i,j in zip(cs,ct):\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s280573840', 's694861061', 's042193543'] | [7056.0, 6972.0, 7056.0] | [75.0, 76.0, 75.0] | [364, 390, 343] |
p03252 | u575431498 | 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\ndic = {}\ndic_rev = {}\n\n\ndef solve():\n for s, t in zip(S, T):\n if t in dic.keys():\n if s != dic[t]:\n print('No')\n return\n else:\n dic[t] = s\n for s, t in zip(S, T):\n if t in dic_rev.keys():\n ... | ['Runtime Error', 'Accepted'] | ['s641749726', 's622769742'] | [3632.0, 3632.0] | [80.0, 88.0] | [454, 453] |
p03252 | u580327099 | 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 python3\n# -*- coding: utf-8 -*-\n\nimport sys\n\ninput = sys.stdin.readline\n\ndef main():\n T2 = T[:]\n for i in range(len(S)):\n if S[i] == T2[i]:\n continue\n from_c = T2[i]\n to_c = S[i]\n T2 = T2.translate(str.maketrans({from_c: to_c, to_c: from_c}))\n... | ['Runtime Error', 'Accepted'] | ['s510226433', 's360736657'] | [3056.0, 4640.0] | [18.0, 191.0] | [379, 595] |
p03252 | u581403769 | 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())\nn = len(s)\n\ns_par = [i for i in range(n + 1)]\nt_par = [i for i in range(n + 1)]\n\ndef operation(x, par):\n for i in range(n):\n for j in range(i):\n if x[i] == x[j]:\n par[i] = par[j]\n return par\n\nif operation(s, s_par) ==... | ['Wrong Answer', 'Accepted'] | ['s345420690', 's251257639'] | [28004.0, 28052.0] | [70.0, 537.0] | [364, 374] |
p03252 | u597374218 | 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(map(list(input()).count,set(s)))\nt=sorted(map(list(input()).count,set(t)))\nprint("Yes" if s==t else "No")', 'from collections import Counter\ns=Counter(input())\nt=Counter(input())\nS=sorted(s.values())\nT=sorted(t.values())\nprint("Yes" if S==T else "No")'] | ['Runtime Error', 'Accepted'] | ['s670434060', 's436315715'] | [4784.0, 3828.0] | [20.0, 41.0] | [114, 142] |
p03252 | u597455618 | 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\nfrom collections import Counter\n\n\ndef main():\n s = input()\n t = input()\n s_count = [0]*26\n t_count = [0]*26\n for i in range(ord("a"), ord("z")+1):\n s_count[i-97] = s.count(chr(i))\n t_count[i-97] = t.count(chr(i))\n print(s_count[i-97], t_count[i-97])\n s_co... | ['Wrong Answer', 'Accepted'] | ['s944848426', 's574612503'] | [9528.0, 9660.0] | [38.0, 36.0] | [453, 409] |
p03252 | u598229387 | 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()\nn=len(s)\n\ndic={}\nans='Yes'\nfor i in range(n):\n if s[i] in dic:\n if dic[t[i]]==t[i]:\n continue\n else:\n ans='No'\n break\n \n if t[i] not in dic:\n dic[t[i]]=s[i]\n else:\n if dic[t[i]]==s[i]:\n continue\n... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s195505403', 's228687810', 's405316811', 's423109228', 's765154547', 's805041830'] | [2940.0, 3632.0, 3632.0, 2940.0, 3632.0, 3632.0] | [17.0, 103.0, 18.0, 17.0, 99.0, 81.0] | [380, 396, 307, 295, 364, 274] |
p03252 | u603958124 | 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 math import ceil,floor,comb,factorial,gcd,pow,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf\nfrom itertools import accumulate,permutations,combinations,product,combinations_with_replacement\nfrom collections import deque,defaultdict,Counter\nfrom bisect import bisect_left,bisect_right\nfrom operato... | ['Wrong Answer', 'Accepted'] | ['s749612466', 's117297911'] | [10588.0, 10276.0] | [101.0, 149.0] | [980, 864] |
p03252 | u604398799 | 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\nlen_S = len(S)\nS_Converted = S\nfor i in range (len(S)):\n tmp_S = S_Converted[i]\n tmp_T = T[i]\n if tmp_S == tmp_T:\n continue\n S_Converted = list(S_Converted) \n list_indexT = [j for j, tmp_SC in enumerate(S_Converted) if tmp_SC == tmp_T]\n if (n... | ['Wrong Answer', 'Accepted'] | ['s022607659', 's506926512'] | [10496.0, 10112.0] | [349.0, 325.0] | [775, 770] |
p03252 | u606045429 | 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, T = [input() for _ in range(2)]\nsmemo, tmemo = {}, {}\nfor si, ti in zip(S, T):\n if si in smemo and smemo[si] != ti or ti in tmemo and tmemo[ti] != si:\n print("NO")\n quit()\n smemo[si], tmemo[ti] = ti, si\nprint("YES")\n', 'S, T = [input() for _ in range(2)]\nsmemo, tmemo = {}, {}\nfor si, ... | ['Wrong Answer', 'Accepted'] | ['s039767854', 's640913693'] | [3632.0, 3632.0] | [121.0, 119.0] | [239, 239] |
p03252 | u620846115 | 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\na = list(input())\nb = list(input())\nA = collections.Counter(a)\nB = collections.Counter(b)\nAsort = sorted(A.values())\nBsort = sorted(B.values())\nif list(Asort.values()) == list(Bsort.values()):\n print("Yes")\nelse:\n print("No")', 'import collections\na = list(str(input()))\nb = list(str(i... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s408417034', 's423689385', 's426982397', 's520791976', 's982545799', 's077301689'] | [12556.0, 12580.0, 9992.0, 12404.0, 12520.0, 12428.0] | [55.0, 54.0, 28.0, 56.0, 51.0, 56.0] | [246, 256, 268, 244, 234, 256] |
p03252 | u623814058 | 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\nD={}\n\nans=1\nfor s,t in zip(S,T):\n x=D.get(t, '')\n print(s,t,x)\n if x=='':\n D[t]=s\n else:\n print(s,t,x)\n if x!=s:\n ans=0\n break\n \n\nprint('Yes' if ans else 'No')", "S=input()\nT=input()\n\nD1={}\nD2={}\n\nans=1\nfor... | ['Wrong Answer', 'Accepted'] | ['s600518344', 's977256108'] | [9456.0, 9380.0] | [285.0, 93.0] | [246, 330] |
p03252 | u628538573 | 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()\na = "abcdefghijklmnopqrstuvwxyz"\n\nflag = 0\ni = 0 \nwhile i < len(s):\n\tif s[i] != t[i]:\n\t\tif t[i] in a:\n\t\t\tc = s[i]\n\t\t\ts = s.replace(c, "1")\n\t\t\ts = s.replace(t[i], c)\n\t\t\ts = s.replace("1", t[i])\n\t\t\ta = a.replace(t[i], "1")\n\t\telse:\n\t\t\tbreak\n\ti += 1\nif s ==... | ['Wrong Answer', 'Accepted'] | ['s528663679', 's192879188'] | [3632.0, 3632.0] | [77.0, 90.0] | [317, 313] |
p03252 | u629350026 | 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=str(input())\nt=str(input())\ntemp=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]\ns=list(set(s))\nt=list(set(t))\ntemps=[0]*len(temp)\ntempt=[0]*len(temp)\nfor i in range(0,len(temp)):\n temps[i]=s.count(temp[i])\n tempt[i]=t.count(temp[i])\nif temps==te... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s193005763', 's299990905', 's585283959', 's982860592', 's508188995'] | [3632.0, 3632.0, 8832.0, 8832.0, 6704.0] | [28.0, 27.0, 201.0, 201.0, 187.0] | [347, 281, 273, 273, 363] |
p03252 | u637824361 | 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 ... | ['ch_S = input()\nch_T = input()\n\nind_S = []\nind_T = []\nfor i in list("abcdefghijklmnopqrstuvwxyz"):\n L = [ch_S.find(i)]\n ind_S.append(L, )\n R = [ch_T.find(i)]\n ind_T.append(R,)\n\nif set(ind_S) == set(ind_T):\n print("Yes")\nelse:\n print("No")\n', 'S = input()\nT = input()\nls = [0]*26\nlt =... | ['Runtime Error', 'Accepted'] | ['s461485349', 's194656661'] | [3632.0, 3632.0] | [18.0, 254.0] | [256, 271] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.