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
|
---|---|---|---|---|---|---|---|---|---|---|
p03250 | u798260206 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['a = sorted(list(input().split()))\nans = int(a[0])+int(a[1]+a[2])\nprint(ans)\n\n', 'a = sorted(list(input().split()))\nans = int(a[0])+int(a[2]+a[1])\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s477392530', 's484085069'] | [9156.0, 8912.0] | [27.0, 26.0] | [77, 76] |
p03250 | u798316285 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['a,b,c=map(int,input().split())\nprint(max(a,b,c)*9+a+b+C)', 'a,b,c=map(int,input().split())\nprint(max(a,b,c)*9+a+b+c)'] | ['Runtime Error', 'Accepted'] | ['s040676584', 's129701683'] | [2940.0, 2940.0] | [18.0, 17.0] | [56, 56] |
p03250 | u806855121 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['A, B, C = list(map(int, input().split()))\n\nif A >= B and A >= C:\n print(A*10 + B + C)\nelif B >= A and B >= C:\n print(B*10 + B + C)\nelse:\n print(C*10 + A + C)', 'A, B, C = list(map(int, input().split()))\n\nif A >= B and A >= C:\n print(A*10 + B + C)\nelif B >= A and B >= C:\n print(B*10 + B + C)\nelse:\n print(C*10 + A + C)', 'A, B, C = list(map(int, input().split()))\n\nif A >= B and A >= C:\n print(A*10 + B + C)\nelif B >= A and B >= C:\n print(B*10 + A + C)\nelse:\n print(C*10 + A + B)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s195065336', 's746870770', 's682387876'] | [3060.0, 3060.0, 3060.0] | [18.0, 17.0, 18.0] | [166, 166, 166] |
p03250 | u814781830 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['N = [i for i in input().split()]\nN.reverse()\nprint(int(N[0] + N[1]) + int(N[2]))\n', 'N = [int(i) for i in input().split()]\nN.sort()\nprint(int(str(N[2]) + str(N[1])) + N[0])\n'] | ['Wrong Answer', 'Accepted'] | ['s783389945', 's746649232'] | [2940.0, 2940.0] | [17.0, 17.0] | [81, 88] |
p03250 | u815498317 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ["def main():\n num = list(map(int, input().split()))\n num.sort()\n num.reverse()\n print(num)\n print(num[0] * 10 + num[1] + num[2])\n\nif __name__ == '__main__':\n main()", 'array = sorted(map(int, input().split()))\nprint(array[2]*10 + array[1] + array[0])'] | ['Wrong Answer', 'Accepted'] | ['s709516945', 's980383624'] | [2940.0, 9052.0] | [17.0, 27.0] | [181, 82] |
p03250 | u816919571 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['n = []\na,b,c = map(int,input().split(" "))\nn.append(a)\nn.append(b)\nn.append(c)\nprint(int(str(n[0])+str(n[1]))+n[2])', 'n = []\na,b,c = map(int,input().split(" "))\nn.append(a)\nn.append(b)\nn.append(c)\nn.sort(reverse=True)\nprint(int(str(n[0])+str(n[1]))+n[2])'] | ['Wrong Answer', 'Accepted'] | ['s407127416', 's326875607'] | [3060.0, 3060.0] | [17.0, 17.0] | [115, 136] |
p03250 | u819939299 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['a,b,c=sorted(map(int,input()))\nprint(10*c+b+a)\n ', 'a,b,c=sorted(map(int,input().split()))\nprint(10*c+b+a)\n '] | ['Runtime Error', 'Accepted'] | ['s363904179', 's246957331'] | [2940.0, 2940.0] | [17.0, 17.0] | [48, 56] |
p03250 | u820351940 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['a = list(map(int, input().split()))\nmax(a) * 9 + sum(a)', 'a = list(map(int, input().split())); print(max(a) * 9 + sum(a))'] | ['Wrong Answer', 'Accepted'] | ['s738842595', 's201454664'] | [2940.0, 2940.0] | [17.0, 17.0] | [55, 63] |
p03250 | u821775079 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['A,B,C=sorted(input().split())\n\nprint(int(A+B)+int(C))', 'A,B,C=sorted(input().split())\n\nprint(int(C+B)+int(A))'] | ['Wrong Answer', 'Accepted'] | ['s894958175', 's487079905'] | [3064.0, 2940.0] | [18.0, 17.0] | [53, 53] |
p03250 | u824337972 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['a, b, c = (int(i) for i in input().split()) \nintegers = [a, b, c]\nintegers = [a, b, c]\nprint(integers[2]*10+integers[1]+integers[0])', 'a, b, c = (int(i) for i in input().split()) \nintegers = [a, b, c]\nintegers = [a, b, c].sort()\nprint(integers[2]*10+integers[1]+integers[0])', 'a, b, c = (int(i) for i in input().split()) \nintegers = [a, b, c]\nintegers.sort()\nprint(integers[2]*10+integers[1]+integers[0])'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s519846956', 's976848339', 's536350701'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [133, 140, 128] |
p03250 | u827141374 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['A = list(map(int, input().split()))\nA.sort(reverse=True)\nprint(A)\nprint(A[0]*10+A[1]+A[2])\n', 'A = list(map(int, input().split()))\nA.sort()\nprint(A[0]*10+A[1]+A[2])', 'A = list(map(int, input().split()))\nA.sort(reverse=True)\nprint(A[0]*10+A[1]+A[2])\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s805650258', 's920276198', 's534443751'] | [2940.0, 2940.0, 2940.0] | [19.0, 17.0, 18.0] | [91, 69, 82] |
p03250 | u827202523 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['a, b, c = list(map(int, input().split()))\n\nbig = max([a,b,c])\n\nprint(sum[a,b,c] + 9*big)', 'a, b, c = list(map(int, input().split()))\n\nbig = max([a,b,c])\n\nprint(sum([a,b,c]) + 9*big)'] | ['Runtime Error', 'Accepted'] | ['s980441519', 's941298285'] | [2940.0, 2940.0] | [18.0, 18.0] | [88, 90] |
p03250 | u829369995 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['n = input().split()\nn = sorted(n, reverse=True)\n\nans = int(n[0]+n[1]) + int(n[2])', 'n = input().split()\nn = sorted(n, reverse=True)\n \nans = int(n[0]+n[1]) + int(n[2])\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s243602245', 's405341340'] | [2940.0, 2940.0] | [17.0, 17.0] | [81, 93] |
p03250 | u830162518 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['a,b,c=map(int,input().split())\nL[a,b,c]\nL.sort()\nprint(L[2]*10+L[1]+L[0])\n', 'a,b,c=map(int,input().split())\nL=[a+b,b+c,c+a]\nL.sort()\nprint(L[2])', 'a,b,c=map(int,input().split())\nL=[a,b,c]\nL.sort()\nprint(L[2]*10+L[1]+L[0])'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s013206560', 's056243051', 's531168742'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [74, 67, 74] |
p03250 | u834415466 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['a,b,c=map(int,input().split())\nprint(max(a,b,c)*9+a+b+c-min(a,b,c))', 'a,b,c=map(int,input().split())\nprint(max(a+b,b+c,c+a))', 'a,b,c=map(int,input().split())\nprint(max(a,b,c)*9+a+b+c)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s630897170', 's971061493', 's015637357'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [67, 54, 56] |
p03250 | u836737505 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['a = sorted(list(map(str, input().split())))\nprint(int(a[0]+a[1])+int(a[2]))\n', 'a = sorted(list(map(str, input().split())))\nprint(int(a[2]+a[1])+int(a[0]))'] | ['Wrong Answer', 'Accepted'] | ['s737750585', 's840472705'] | [2940.0, 2940.0] | [18.0, 17.0] | [76, 75] |
p03250 | u840958781 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['li=list(map(int,input().split()))\nli.sort()\nprint(li[2]*10+li[1]+li[1])', 'li=list(map(int,input().split()))\nli.sort()\nprint(li[0]*10+li[1]+li[2])', 'li=list(map(int,input().split()))\nli.sort()\nprint(li[2]*10+li[1]+li[0])\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s497368160', 's951401722', 's459088837'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [71, 71, 72] |
p03250 | u843318346 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['arr = list(map(int,input().split()))\narr.sort()\nprint(int(arr[0]) + int(arr[2]+arr[1]))', 'arr = list(map(str,input().split()))\narr.sort()\nprint(int(arr[0]) + int(arr[2]+arr[1]))\n'] | ['Wrong Answer', 'Accepted'] | ['s191216143', 's363295271'] | [2940.0, 2940.0] | [17.0, 18.0] | [87, 88] |
p03250 | u845427284 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['N = input().split()\nN.sort()\nprint(N)\n\nN1 = N[2] + N[1]\nprint(int(Nmax) + int(N[0]))\n', 'N = input().split()\nN.sort()\nprint(N)\n\nNmax = N[2] + N[1]\nprint(int(Nmax) + int(N[0]))\n', 'N = input().split()\nN.sort()\nprint(N)\n\nN1 = N[2] + N[1]\nNmax = int(N1) + int(N[0])\nprint(str(Nmax))\n', 'N = input().split()\nN.sort()\n\nNmax = N[2] + N[1]\nprint(int(Nmax) + int(N[0]))\n'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s094572714', 's387861715', 's629800129', 's262518096'] | [2940.0, 2940.0, 2940.0, 2940.0] | [18.0, 18.0, 17.0, 18.0] | [85, 87, 100, 78] |
p03250 | u845937249 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['l = list(map(int,input().split()))\nl.sort\nprint(int(l[2]*10+l[1]+l[0]))', 'l = list(map(int,input().split()))\nl.sort\nprint(l[2]*10+l[1]+l[0])', 'l = list(map(int,input().split()))\n\nl.sort()\n\nprint(l[2]*10+l[1]+l[0])\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s166075066', 's812511885', 's947283651'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [71, 66, 71] |
p03250 | u846218099 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['a,b,c=map(int,input().split())\nprint(a,b,c)\nif b<=c:\n d=b\n b=c\n c=d\nif a<=b:\n d=a\n a=b\n b=d\nif b<=c:\n d=b\n b=c\n c=d\nprint(a,b,c)\n\nprint(10*a+b+c)\n ', 'List=sorted(list(map(int,input().split())))\n\nprint(List[-1]*10+List[-2]+List[0])'] | ['Wrong Answer', 'Accepted'] | ['s163420475', 's560181939'] | [3060.0, 2940.0] | [17.0, 17.0] | [177, 80] |
p03250 | u856169020 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['nums = list(map(int, input().split()))\nnums.sort()\nprint(nums[2] * 10 + num[1] + num[0])', 'nums = list(map(int, input().split()))\nnums.sort()\nprint(nums[2] * 10 + nums[1] + nums[0])'] | ['Runtime Error', 'Accepted'] | ['s550970600', 's549170957'] | [2940.0, 2940.0] | [17.0, 17.0] | [88, 90] |
p03250 | u859897687 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ["print(eval('+'.join(input().sort())+'*10'))\n", 'a,b,c=map(int,input().split());print(max(a,b,c)*9+a,b,c)', 'a,b,c=map(int,input().split());print(max(a,b,c)*9+a+b+c)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s273286006', 's587369240', 's671148509'] | [2940.0, 2940.0, 2940.0] | [18.0, 21.0, 17.0] | [44, 56, 56] |
p03250 | u860657719 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['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[ind] != T2:\n print("No")\n flag = True\n break\n if flag:\n break\nelse:\n for alph in alphs:\n T3 = T\n indlist = []\n while alph in T3:\n i = T.index(alph)\n indlist.append(i)\n T3 = T3[i+1:]\n if indlist != []:\n S3 = S[indlist[0]]\n for ind in indlist:\n if S[ind] != T3:\n print("No")\n flag = True\n break\n if flag:\n break\n else:\n print("Yes")\n', 'N, M = map(int, input().split())\ndef factor(n):\n for i in range(2, int(n)):\n if n%i == 0:\n return(i)\n break\n else:\n return(int(n))\nM2 = M\ndic = {}\nflag = True\nwhile flag:\n p = factor(M2)\n dic[p] = dic.get(p, 0) + 1\n M2 = M2/p\n if M2 ==1:\n flag = False\n\ndef comb(n, r):\n s = 1\n for i in range(1, r+1):\n s *= (n-r+i)/i\n return(int(s%(10**9+7)))\ns = 1\nprint(dic)\nfor value in dic.values():\n s *= int(comb(value+N-1, value)%(10**9+7))\nprint(s%(1e9+7))\n', 'nums = list(map(int, input().split()))\nnums.sort()\nprint(nums[2]*10+nums[1]+nums[0])\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s086715518', 's548529617', 's048983836'] | [3064.0, 3064.0, 2940.0] | [18.0, 18.0, 17.0] | [843, 528, 85] |
p03250 | u862296914 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['n = sorted(list(map(int,"1 2 3".split())),reverse=True)\nprint(n[0]*10+n[1]+n[2])', 'n = sorted(list(map(int,input().split())),revese=True)\nprint(10*n[0]+n[1]+n[2])\n\n', 'n = sorted([int(num) for num in input().split()])\nprint(n[2]*10+n[1]+n[0])\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s913369806', 's990659330', 's655549684'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [80, 81, 75] |
p03250 | u866769581 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['a = list(map(int,input()))\na.sort(reverse=True)\nprint(int(str(a[0])+str(a[1])) + a[2])', 'a = list(map(int,input().split()))\na.sort(reverse=True)\nprint(int(str(a[0])+str(a[1])) + a[2])\n'] | ['Runtime Error', 'Accepted'] | ['s544152049', 's774224725'] | [2940.0, 2940.0] | [17.0, 17.0] | [86, 95] |
p03250 | u868237899 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['a = list(map(int, input().split())).sort()\nprint(a[-1] * 10 + a[0] + a[1])', 'a = sorted(map(int, input().split()))\nprint(a[-1] * 10 + a[0] + a[1])'] | ['Runtime Error', 'Accepted'] | ['s718266049', 's586122305'] | [2940.0, 2940.0] | [17.0, 17.0] | [74, 69] |
p03250 | u868628468 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['A, B, C = map(int, input().split())\nX = 10*A + B + C\nY = 10*B + A + C\nZ = 10*C + A + B\nprint(max[X, Y, Z])', 'A, B, C = map(int, input().split())\nX = 10*A + B + C\nY = 10*B + A + C\nZ = 10*C + A + B\nprint(max(X, Y, Z))'] | ['Runtime Error', 'Accepted'] | ['s144674656', 's184056311'] | [2940.0, 2940.0] | [17.0, 17.0] | [106, 106] |
p03250 | u872887731 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['n, m, X,Y = map(int,input().split())\nx = list(int(i) for i in input().split())\ny = list(int(i) for i in input().split())\n\nx.sort()\ny.sort()\n\nif x[-1] < Y and y[0] >X and x[-1] < y[0]:\n print("No War")\nelse:\n print("War")', 'a = list(int(i) for i in input().split())\na.sort()\nprint(10*a[0]+a[1] + a[2])\n', 'a = list(int(i) for i in input().split())\na.sort()\nprint(10*a[2]+a[1] + a[0])\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s365783878', 's964831996', 's118529482'] | [3060.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [226, 78, 78] |
p03250 | u874333466 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['A = list(map(int, input().split()))\nA.sort(reverse = True)\n\nprint(A[0] * 10 + A[1] + A[2]', 'A = list(map(int, input().split()))\nA.sort(reverse = True)\n\nprint(A[0] * 10 + A[1] + A[2])'] | ['Runtime Error', 'Accepted'] | ['s953010010', 's332614655'] | [8904.0, 9068.0] | [23.0, 25.0] | [89, 90] |
p03250 | u875291233 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['# coding: utf-8\n# Your code here!\nN,M,X,Y=[int(i) for i in input().split()]\nx=[int(i) for i in input().split()]\ny=[int(i) for i in input().split()]\n\nx.sort()\ny.sort()\n\n#print(x,y)\n\nif x[-1] < y[0]:\n print("No War")\nelse:\n print("War")\n\n\n', '# coding: utf-8\n# Your code here!\na,b,c=[int(i) for i in input().split()]\n\n\nprint(10*max(a,b,c) + a+b+c - max(a,b,c) )\n'] | ['Runtime Error', 'Accepted'] | ['s279873598', 's855745790'] | [3188.0, 2940.0] | [19.0, 17.0] | [243, 119] |
p03250 | u877415670 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['a=list(map(int,input().split()))\na.sort()\nprint(a[0]*10+a[1]+a[2])', 'a=list(map(int,input().split()))\na.sort(reverse=True)\nprint(a[0]*10+a[1]+a[2])\n'] | ['Wrong Answer', 'Accepted'] | ['s620521124', 's721353401'] | [2940.0, 2940.0] | [19.0, 17.0] | [66, 79] |
p03250 | u879876900 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['a,b,c= map(int, input().split())\n\nm=max(a,b,c)\n\nif m==a:\n print((a+10)+b+c)\nelif:m==b:\n print((b+10)+a+c)\nelse:\n print((c+10)+a+b)', 'a,b,c= map(int, input().split())\n\nm=max(a,b,c)\n\nif m==a:\n print(a*10+b+c)\nelif m==b:\n print(b*10+a+c)\nelse:\n print(c*10+a+b)'] | ['Runtime Error', 'Accepted'] | ['s036375083', 's079899539'] | [2940.0, 3060.0] | [17.0, 17.0] | [139, 133] |
p03250 | u882209234 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ["l = sorted(map(int,input().split()),reversed=True)\nprint(eval(''.join(l[:2])+'+'+str(l[2])))", "l = sorted(map(int,input().split()),reverse=True)\nprint(eval(''.join(map(str,l[:2]))+'+'+str(l[2])))"] | ['Runtime Error', 'Accepted'] | ['s881782737', 's630608324'] | [2940.0, 2940.0] | [17.0, 17.0] | [92, 100] |
p03250 | u882359130 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['ABC = [int(abc) for abc in input().split()]\nABC.sort()\nprint(ABC[0]*10 + ABC[1] + ABC[2])', 'ABC = [int(abc) for abc in input().split()]\nABC.sort(reverse=True)\nprint(ABC[0]*10 + ABC[1] + ABC[2])'] | ['Wrong Answer', 'Accepted'] | ['s803993658', 's645743974'] | [2940.0, 2940.0] | [17.0, 17.0] | [89, 101] |
p03250 | u888512581 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['N = list(map(int, input().split()))\nN.sort(reverse=True)\nprint(N)\nprint(N[0]*10 + N[1] + N[2])\n', 'N = list(map(int, input().split()))\nN.sort(reverse=True)\nprint(N[0]*10 + N[1] + N[2])\n'] | ['Wrong Answer', 'Accepted'] | ['s219087805', 's264965572'] | [2940.0, 2940.0] | [17.0, 17.0] | [95, 86] |
p03250 | u893239355 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['l = list(map(int,input().split()))\nl.sort()\na =list[2]*10+list[1]+list[2]\nprint(a)', 'import os\nl = list(map(int,input().split()))\nl.sort()\na =l[2]*10+l[1]+l[2]\nprint(a)\n', 'import os\nl = list(map(int,input().split()))\nl.sort()\na =l[2]*10+l[1]+l[0]\nprint(a)\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s739638278', 's943842680', 's145537310'] | [9136.0, 9156.0, 9044.0] | [28.0, 28.0, 30.0] | [82, 84, 84] |
p03250 | u902462889 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['\nlst_A = input().split()\n\nprint(lst_A)\n\nlst_A.sort()\n\nans = int(lst_A[2]) * 10 + int(lst_A[0]) + int(lst_A[1])\n\nprint(ans)', '\nA = input()\n\nlst_A = list(A)\n\nlst_A.sort()\n\nans = int(lst_A[2]) * 10 + int(lst_A[0]) + int(lst_A[1])\n\nprint(ans)', '\nlst_A = input().split()\n\nlst_A.sort()\n\nans = int(lst_A[2]) * 10 + int(lst_A[0]) + int(lst_A[1])\n\nprint(ans)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s197464968', 's530967214', 's813137000'] | [2940.0, 2940.0, 2940.0] | [17.0, 18.0, 17.0] | [122, 113, 108] |
p03250 | u903005414 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['V = list(map(int, input().split()))\nV = sorted(V, reversed=True)\nans = V[0] * 10 + V[1] + V[2]\nprint(ans)', 'V = list(map(int, input().split()))\nV = sorted(V, reverse=True)\nans = V[0] * 10 + V[1] + V[2]\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s130828624', 's377515757'] | [3064.0, 2940.0] | [17.0, 17.0] | [105, 105] |
p03250 | u903948194 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['n = list(map(int, input().split()))\n\nnmax = max(n)\nn.remove(nmax)\nans = max(n) * 10 + sum(n) \nprint(ans)', 'n = list(map(int, input().split()))\nnmax = max(n)\nprint(nmax * 10 + sum(n.remove(nmax)))', 'n = list(map(int, input().split()))\nprint(max(n) * 10 + sum(n.remove(nmax)))', 'n = list(map(int, input().split()))\nnmax = max(n)\nn.remove(nmax)\nprint(nmax * 10 + sum(n)) '] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s057002404', 's380504375', 's456185700', 's317954839'] | [2940.0, 2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0, 18.0] | [104, 88, 76, 91] |
p03250 | u904995051 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['a,b,c = sorted(map(int,input().split()))\nprint(a*10+b+c)', '#ABC110A\na = sorted(list(map(int,input().split())))\nprint(a[2]*10+a[1]+a[0])'] | ['Wrong Answer', 'Accepted'] | ['s821244442', 's711923490'] | [2940.0, 9040.0] | [17.0, 27.0] | [56, 76] |
p03250 | u906337264 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['a = list(map(int, input().split()))\nprint(a[0] + a[1] + a[2] * 10)', 'a = sorted(list(map(int, input().split())))\nprint(a[0] + a[1] + a[2] * 10)'] | ['Wrong Answer', 'Accepted'] | ['s022952210', 's927826086'] | [2940.0, 2940.0] | [17.0, 17.0] | [66, 74] |
p03250 | u906481659 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['N, M, X, Y = map(int, input().split())\n\nx = list(map(int, input().split()))\ny = list(map(int, input().split())) \nfor z in range(X+1, Y+1):\n if (max(x) < z) and (z <= min(y)):\n print("No War")\n break\n else:\n print("War")', 'N, M, X, Y = map(int, input().split())\n\nx = list(map(int, input().split()))\ny = list(map(int, input().split())) \n\nfor z in range(-100, 101):\n if (X < z) and (max(x) < z) and (z <= min(y) and (z <= Y):\n print("No War")\n else:\n print("War")', 'N, M, X, Y = map(int, input().split())\n\nx = list(map(int, input().split()))\ny = list(map(int, input().split())) \n\nfor z in range(-100, 101):\n if (X < z) and (max(x) < z) and (min(y) >= z) and (Y >= z):\n print("No War")\n else:\n print("War")', 'A = int(input("A =",))\nB = int(input("B =",))\nC = int(input("C =",))\n\nif A == max(A, B, C):\n x = 10*A + B + C\n print("お小遣いは", x)\nelif B == max(A, B, C):\n x = A + 10*B + C\n print("お小遣いは", x)\nelif C == max(A, B, C):\n x = A + B + 10*C\n print("お小遣いは", x)\n', 'N, M, X, Y = map(int, input().split())\n \nx = list(map(int, input().split()))\ny = list(map(int, input().split())) \n \nfor z in range(-100, 101):\n if (X < z) and (max(x) < z) and (z <= min(y)) and (z <= Y):\n print("No War")\n else:\n print("War")', 'A = int()\nB = int()\nC = int()\n\nif A == max(A, B, C):\n x = 10*A + B + C\n print("お小遣いは", x)\nelif B == max(A, B, C):\n x = A + 10*B + C\n print("お小遣いは", x)\nelif C == max(A, B, C):\n x = A + B + 10*C\n print("お小遣いは", x)\n', 'a, b, c = (int(x) for x in input().split())\nprint(a + b + c + max(a, b, c)*9)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s002951739', 's042091184', 's053308337', 's550636438', 's802164764', 's910311214', 's884425575'] | [3060.0, 2940.0, 3064.0, 3064.0, 3064.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0] | [249, 261, 262, 299, 264, 260, 77] |
p03250 | u910358825 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['a=list(map(int, input().split()))\na.sort()\nprint(10*a[0]+a[1]+a[2])', 'a=list(map(int, input().split()))\na.sort()\nprint(10*a[2]+a[1]+a[0])'] | ['Wrong Answer', 'Accepted'] | ['s944810390', 's821064052'] | [9064.0, 9116.0] | [24.0, 22.0] | [67, 67] |
p03250 | u910756197 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['a, b, c = sorted(map(int(), input().split(" ")))\nprint(c * 10 + a + b)', 'a, b, c = sorted(map(int, input().split()))\nprint(c * 10 + b + a)\n'] | ['Runtime Error', 'Accepted'] | ['s021854796', 's284854863'] | [2940.0, 2940.0] | [18.0, 17.0] | [70, 66] |
p03250 | u914330401 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['list1 = map(list(int, input().split()))\nlist1 = sorted(list1, reverse=True)\nprint(list1[0]*10 +list[1]+list[2])\n', 'list1 = list(map(int, input().split()))\nlist1 = sorted(list1, reverse=True)\nprint(list1[0]*10 +list[1]+list[2])', 'list1 = list(map(int, input().split()))\nlist1 = sorted(list1, reverse=True)\nprint(list1[0]*10 +list1[1]+list1[2])\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s110189401', 's515345825', 's783113652'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [112, 111, 114] |
p03250 | u919633157 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ["N,M,X,Y=map(int,input().split())\nx=list(map(int,input().split()))\ny=list(map(int,input().split()))\nprint('No War' if max(max(x),X)<min(min(y),Y) else 'War')", 's=sorted(map(int,input().split()))\nprint(int(str(s[2])+str(s[1]))+s[0])\n'] | ['Runtime Error', 'Accepted'] | ['s392582352', 's056950223'] | [3060.0, 2940.0] | [18.0, 17.0] | [156, 72] |
p03250 | u919730120 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['abc=list(map(int,input().split()))\nabc.sort(reverse=True)\nprint(sum(abc[:2])+abc[2])', 'abc=list(map(int,input().split()))\nabc.sort(reverse=True)\nprint(abc[0]*10+abc[1]+abc[2])'] | ['Wrong Answer', 'Accepted'] | ['s243885083', 's718165508'] | [2940.0, 2940.0] | [17.0, 17.0] | [84, 88] |
p03250 | u920299620 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['x,y,z = input().split()\nx=int(x) \ny=int(y)\nz=int(z)\nif (x>=y and x>=z):\n print(10*x + y + z)\n if (x<y and y>=z):\n print(x+10*y+z)\n if (x<z and y<z):\n print(x+y+10*z)', 'def com(n,m):\n if(n-m < m):\n m=n-m\n result=1\n mylist=[i for i in range(1,m+1)]\n j=1\n for i in range(1,m+1):\n result*=(n+1-i)\n if(j<m):\n while(result%mylist[j]==0):\n result//=mylist[j]\n j+=1\n if(j>=m):\n break\n return result\n\ndef yakusuu(i,m):\n _i=i\n while(i**2<=m):\n if(m%i==0):\n return i\n else:\n i+=1\n for j in range(_i-1,0,-1):\n if(m%j==0):\n break\n return m//j\n \n\nN,M=map(int,input().split())\nsoinsuubunkai={}\ntmp=2\ni=2\n_M=M\nwhile(tmp <=M):\n tmp=yakusuu(tmp,M)\n\n if(tmp in soinsuubunkai):\n soinsuubunkai[tmp]+=1\n else:\n soinsuubunkai[tmp]=1\n M//=tmp\n if(M==1):\n break\n\n\ntmp=1\nfor k in list(soinsuubunkai.values()):\n tmp*=com(k+N-1,k)\n tmp%=10**9+7\nprint(tmp)', 'x,y,z = input().split()\nx=int(x) \ny=int(y)\nz=int(z)\nif (x>=y and x>=z):\n print(10*x + y + z)\nif (x<y and y>=z):\n print(x+10*y+z)\nif (x<z and y<z):\n print(x+y+10*z)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s112107427', 's338760116', 's564392825'] | [3060.0, 3188.0, 3060.0] | [18.0, 18.0, 17.0] | [196, 884, 173] |
p03250 | u921027074 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['N,M,X,Y=map(int, input().split())\nx=list(map(int,input().split()))\ny=list(map(int,input().split()))\nprint("No War" if (max(x)<min(y) and X<Y and X<min(y) and Y>max(x)) else "War")', "N,M,X,Y=map(int, input().split())\nx=list(map(int,input().split()))\ny=list(map(int,input().split()))\nprint('War' if int(X-max(x))>=int(Y-max(y)) else 'No War')", "N,M,X,Y=map(int, input().split())\nx=list(map(int,input().split()))\ny=list(map(int,input().split()))\nprint('War' if max(x)>=max(y) else 'No War')", 'A,B,C=sorted(map(int,input().split()))\nprint(10*C+B+A)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s780539737', 's915645936', 's992083919', 's185499353'] | [3060.0, 2940.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [179, 158, 144, 54] |
p03250 | u921563073 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['# -*- coding: utf-8 -*-\nn,m,x,y = map(int,input().split())\nxi = list(map(int,input().split()))\nyi = list(map(int,input().split()))\n\nxi.append(x)\nyi.append(y)\n\nxi.sort()\nxi.reverse()\nyi.sort()\n\nif xi[0]<yi[0]:\n print("No War")\nelse:\n print("War")\n', '# -*- coding: utf-8 -*-\nlist1 = list(map(int, input().split()))\nlist1.sort()\nprint(10*list1[2]+list1[1]+list1[0])\n'] | ['Runtime Error', 'Accepted'] | ['s392479991', 's041129603'] | [2940.0, 2940.0] | [17.0, 17.0] | [252, 114] |
p03250 | u921773161 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['l = list(map(int,input().split()))\nl.sort()\nprint(l[0]*10 +l[1]+l[2])', 'l = list(map(int,input().split()))\nl.sort()\nprint(l[2]*10 +l[1]+l[0])'] | ['Wrong Answer', 'Accepted'] | ['s902341019', 's750423866'] | [2940.0, 2940.0] | [18.0, 18.0] | [69, 69] |
p03250 | u924406834 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['abc = list(map(int,input().split()))\nabc.sort()\npritn((abc[2]*10)+abc[1]+abc[0])', 'abc = list(map(int,input().split()))\nabc.sort()\nprint((abc[2]*10)+abc[1]+abc[0])'] | ['Runtime Error', 'Accepted'] | ['s432855050', 's848972448'] | [2940.0, 2940.0] | [17.0, 17.0] | [80, 80] |
p03250 | u928784113 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['# -*- coding: utf-8 -*-\nA,B,C=map(int,input().split())\nprint(max(A*10+B+C, B*10+C+A C*10+A+B))', '# -*- coding: utf-8 -*-\nA,B,C=map(int,input().split())\nprint(max(A*10+B+C, B*10+C+A, C*10+A+B))'] | ['Runtime Error', 'Accepted'] | ['s604542434', 's774897116'] | [2940.0, 2940.0] | [17.0, 17.0] | [94, 96] |
p03250 | u929582923 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['a,b,c = sorted(map(int,input().split()))\nprint(10*a + b+c)', 'a,b,c = sorted(map(int,input().split()))\nprint(10*c+b+a)'] | ['Wrong Answer', 'Accepted'] | ['s441680777', 's721663901'] | [2940.0, 2940.0] | [18.0, 18.0] | [58, 56] |
p03250 | u938486382 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ["N, M = list(map(int, input().split(' ')))\nMOD = int(1e9 + 7)\nseeds = []\np = 2\nwhile p*p > M:\n while M % p == 0:\n seeds.append(p)\n M = M // p\n p += 1\nif M > 1:\n seeds.append(M)\n \ndef comb(n, k):\n ans = 1\n for i in range(1, k + 1):\n ans = (ans * (n + 1 - i) // i)\n return ans\n \nans = 1\nhogehoge = set(seeds)\nfor i in hogehoge:\n a_ct = seeds.count(i)\n ans = (ans * comb(a_ct + N-1, min(a_ct, N-1))) % MOD\nprint(ans)\n", "a, b, c = list(map(int, input().split(' ')))\nprint (max(a, b, c) * 9 + a + b + c)"] | ['Runtime Error', 'Accepted'] | ['s705135445', 's218867158'] | [3064.0, 2940.0] | [17.0, 17.0] | [430, 81] |
p03250 | u942033906 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['A,B,C = map(int,input().split())\nL = [A, B, C]\nL.sort()\nprint(A + B + 10 * C)', 'A,B,C = map(int,input().split())\nL = [A, B, C]\nL.sort()\nprint(L[0] + L[1] + 10 * L[2])'] | ['Wrong Answer', 'Accepted'] | ['s864952394', 's847576842'] | [2940.0, 2940.0] | [17.0, 17.0] | [77, 86] |
p03250 | u942868244 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['# coding: utf-8\n\na, b, c = map(int, input().split())\n\nx = a*10 + b\ny = b*10 + c\nz = c*10 + a\n\nif x >= y and x >= z:\n print(x + c)\nelif y >= x and y >= z:\n print(y + a)\nelse\n print(z + b)', '# coding: utf-8\n \nn, m, x, y = map(int, input().split())\nxn = list(map(int, input().split()))\nym = list(map(int, input().split()))\n \nif x < y:\n for i in range(x, y+1):\n if max(xn) < i and min(ym)>=i:\n print("War")\n elif i == y:\n print("No War")\nelse:\n print("No War")', '# coding: utf-8\n \nn, m, x, y = map(int, input().split())\nxn = list(map(int, input().split()))\nym = list(map(int, input().split()))\n\nif x < y:\n for i in range(x, y+1):\n if max(xn) < i and min(ym)>=i:\n print("No War")\n break\n elif i == y:\n print("War")\nelse:\n print("War")', '# coding: utf-8\n \nn, m, x, y = map(int, input().split())\nxn = list(map(int, input().split()))\nym = list(map(int, input().split()))\nxn.append(x)\nym.append(y)\nflag = 0\n \nif x < y:\n for i in range(min(xn), max(ym)+1):\n if max(xn) < i and min(ym)>=i:\n print("No War")\n flag = 1\n if flag == 0:\n print("War")\nelse:\n print("War")', '# coding: utf-8\n \nn, m, x, y = map(int, input().split())\nxn = list(map(int, input().split()))\nym = list(map(int, input().split()))\nflag = 0\n\nif x < y:\n for i in range(x+1, y+1):\n if max(xn) < i and min(ym)>=i:\n print("No War")\n flag = 1\n elif flag == 0 and i == y:\n print("War")\nelse:\n print("War")', '# coding: utf-8\n \na, b, c = map(int, input().split())\n \nx = a*10 + b\ny = b*10 + c\nz = c*10 + a\n \nif x >= y and x >= z:\n print(x + c)\nelif y >= x and y >= z:\n print(y + a)\nelse:\n print(z + b)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s242278184', 's568454594', 's617580414', 's840033259', 's942846696', 's910666302'] | [2940.0, 3060.0, 3060.0, 3064.0, 3064.0, 3060.0] | [16.0, 17.0, 17.0, 18.0, 25.0, 17.0] | [195, 309, 323, 367, 351, 199] |
p03250 | u946424121 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['l = map(int,input().split())\nl.sort()\nprint(10*l[0] + l[1] + l[2])', 'l = list(map(int,input().split()))\nl.sort()\nprint(10*l[2] + l[1] + l[0])'] | ['Runtime Error', 'Accepted'] | ['s971496725', 's057489847'] | [2940.0, 2940.0] | [17.0, 17.0] | [66, 72] |
p03250 | u951601135 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ["N,M,X,Y=map(int,input().split())\nx=list(map(int,input().split()))\ny=list(map(int,input().split()))\n#print(N,M,X,Y,x,y)\nx.append(X)\ny.append(Y)\nif(max(x)>min(y)):\n print('War')\nelse:\n print('Np War')\n\n", 'l=sorted(list(map(int,input().split())))\nprint(l[2]*10+l[1]+l[0])'] | ['Runtime Error', 'Accepted'] | ['s544621539', 's740764131'] | [2940.0, 2940.0] | [18.0, 18.0] | [202, 65] |
p03250 | u957722693 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['l=list(map(int,input().split()))\nl2=sort(l)\nprint(10*l2[2]+l2[1]+l2[0])', 'l=list(map(int,input().split()))\nl2=sorted(l)\nprint(10*l2[2]+l2[1]+l2[0])'] | ['Runtime Error', 'Accepted'] | ['s935335647', 's247565144'] | [2940.0, 2940.0] | [17.0, 17.0] | [71, 73] |
p03250 | u957872856 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['a,b,c = map(int,input().split())\nlist = [a,b,c]\nlist1 = sorted(list)\nd = list1[-1] + list1[-2]\nnum = int(d) + int(list1[0])\nprint(num)', 'a,b,c = map(int,input().split())\nlist = [a,b,c]\nlist1 = sorted(list)\nd = str(list1[-1]) + str(list1[-2])\nnum = int(d) + list1[0]\nprint(num)'] | ['Wrong Answer', 'Accepted'] | ['s321445682', 's691085989'] | [2940.0, 2940.0] | [17.0, 17.0] | [134, 139] |
p03250 | u959651981 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['a,b,c = map(int,input().split())\nd = max(a,b,c)\nprint(9 * d + sum(a,b,c))', 'a, b, c = map(int, (input().split()))\nd = max(a,b,c)\nprint(d * 9 + a + b + c)\n'] | ['Runtime Error', 'Accepted'] | ['s047264525', 's473349775'] | [2940.0, 2940.0] | [18.0, 19.0] | [73, 78] |
p03250 | u959759457 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['N=sorted(list(map(int,input().split())))\nprint(N[0]*10+N[1]+N[2])', 'N=list(map(int,input().split()))\nN.sort(reverse=True)\nprint(N[0]*10+N[1]+N[2])'] | ['Wrong Answer', 'Accepted'] | ['s439080568', 's318590495'] | [2940.0, 2940.0] | [20.0, 17.0] | [65, 78] |
p03250 | u960171798 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['x = split(input()," ")\nfor i in range(len(x)):\n if int(x[i]) >= int(x[i-1]) and int(x[i]) >= int(x[i+1]):\n print (10*int(x[i])+int(x[i-1])+int(x[i+1]))', 'a,b,c = sorted(map(int, input().split()))\nprint(a+b+c*10)'] | ['Runtime Error', 'Accepted'] | ['s282438869', 's792394930'] | [2940.0, 2940.0] | [18.0, 17.0] | [155, 57] |
p03250 | u960947353 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['one=list(input())\n#print(one)\ntwo=list(input())\n\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=[]\n#print(p)\n#print(z)\nfor k,v in z.items():\n w.append(v)\no=[]\nfor k,v in p.items():\n o.append(v)\nprint("Yes") if w==o else print("No")', 'one=list(map(int,input().split()))\n\none.sort()\nprint(10*one[2]+one[1]+one[0])'] | ['Runtime Error', 'Accepted'] | ['s827631460', 's717685603'] | [3064.0, 2940.0] | [17.0, 17.0] | [401, 77] |
p03250 | u961674365 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['a,b,c=map(int,input())\nprint(9*max(a,b,c)+a+b+c)', 'a,b,c=map(int,input().split())\nprint(9*max(a,b,c)+a+b+c)'] | ['Runtime Error', 'Accepted'] | ['s415056177', 's667957135'] | [2940.0, 2940.0] | [17.0, 17.0] | [48, 56] |
p03250 | u971329386 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ["line = input().rstrip().split(' ')\n\nfst_point = int(line[0]) * 10 + int(line[1])\nsec_point = int(line[1]) * 10 + int(line[2])\n\nif fst_point > sec_point:\n return print(fst_point + int(line[2]))\nelse:\n return print(sec_point + int(line[0]))\n ", "line = input().rstrip().split(' ')\n\nfst_point = int(line[0]) * 10 + int(line[1])\nsec_point = int(line[1]) * 10 + int(line[2])\n\nif fst_point >= sec_point:\n return print(fst_point + int(line[2]))\nelse:\n return print(sec_point + int(line[0]))\n ", 'x, y, z = map(int,input().split())\n\nmax_lines = [[int(x + y), int(z)],\n\t\t\t [int(x + z), int(y)],\n [int(y + x), int(z)],\n [int(y + z), int(x)],\n [int(z + x), int(y)],\n [int(z + y), int(x)]]\n\nmax_point = 0\none_point = 0\nfor max_line in max_lines:\n if max_line[0] >= max_point:\n \tmax_point = max_line[0]\n one_point = max_line[1]\n\nprint(max_point + one_point)', "line = input().rstrip().split(' ')\n\nmax_lines = [[int(line[0] + line[1]), int(line[0])],\n\t\t\t [int(line[0] + line[2]), int(line[1])],\n [int(line[1] + line[0]), int(line[2])],\n [int(line[1] + line[2]), int(line[0])],\n [int(line[2] + line[0]), int(line[1])],\n [int(line[2] + line[1]), int(line[0])]]\n\nmax_point = 0\none_point = 0\nfor max_line in max_lines:\n if max_line[0] >= max_point:\n \tmax_point = max_line[0]\n one_point = max_line[1]\n\nprint(max_point + one_point)", 'x, y, z = map(int,input().split())\n\nmax_lines = [[int(x + y), int(z)],\n\t\t\t [int(x + z), int(y)],\n [int(y + x), int(z)],\n [int(y + z), int(x)],\n [int(z + x), int(y)],\n [int(z + y), int(x)]]\n\nmax_point = 0\none_point = 0\nfor max_line in range(max_lines):\n if max_line[0] >= max_point:\n \tmax_point = max_line[0]\n one_point = max_line[1]\n\nprint(max_point + one_point)', 'x, y, z = map(int,input().split())\n\nmax_lines = [[int(x + y), int(z)],\n\t\t\t [int(x + z), int(y)],\n [int(y + x), int(z)],\n [int(y + z), int(x)],\n [int(z + x), int(y)],\n [int(z + y), int(x)]]\n\nmax_point = 0\none_point = 0\nfor max_line in max_lines:\n if max_line[0] >= max_point:\n \tmax_point = max_line[0]\n one_point = max_line[1]\n\nprint(max_point + one_point)', "line = input().rstrip().split(' ')\n\nfst_point = int(line[0]) * 10 + int(line[1])\nsec_point = int(line[1]) * 10 + int(line[2])\n\nif fst_point >= sec_point then:\n return print(fst_point + int(line[2]))\nelse:\n return print(sec_point + int(line[0]))\n ", 'x, y, z = map(int,input().split())\n\nmax_lines = [[x * 10 + y, z],\n [x * 10 + z, y],\n [y * 10 + x, z],\n [y * 10 + z, x],\n [z * 10 + x, y],\n [z * 10 + y, x]]\n\nmax_point = 0\none_point = 0\nfor max_line in max_lines:\n if max_line[0] >= max_point:\n max_point = max_line[0]\n one_point = max_line[1]\n\nprint(max_point + one_point)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s082733755', 's242272808', 's482450147', 's560890002', 's621300519', 's648318630', 's986990464', 's480357289'] | [2940.0, 2940.0, 3064.0, 3188.0, 3064.0, 3188.0, 2940.0, 3064.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0] | [247, 248, 416, 524, 423, 416, 253, 418] |
p03250 | u972658925 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['lst = list(map(int,input().split()))\nlst_2 = []\nfor i in range(len(lst)):\n lstt = lst\n x = lstt[i]\n del lstt[i]\n num = x + int("".join(lstt))\n lst_2.append(num)\nprint(max(lst_2))', 'lst = list(map(int,input().split()))\nlst_2 = []\nfor i in range(len(lst)):\n lstt = lst\n x = lstt[i]\n del lstt[i]\n num = int(x) + int("".join(lstt))\n lst_2.append(num)\nprint(int(max(lst_2)))', 'import itertools\nlst = list(map(str,input().split()))\nlst1 = list(itertools.permutations(lst))\n\nans_array = []\nfor i in range(len(lst1)):\n num1 = int(lst1[i][0]+lst1[i][1]) + int(lst1[i][2])\n num2 = int(lst1[i][0]) + int(lst1[i][1]+lst1[i][2])\n ans_array.append(num1)\n ans_array.append(num2)\nprint(max(ans_array))'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s810537624', 's881461299', 's780997148'] | [3060.0, 3060.0, 3064.0] | [17.0, 17.0, 18.0] | [193, 203, 325] |
p03250 | u973840923 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ["N,M,X,Y = map(int, input().split())\nnum_list = [list(map(int, input().split())) for _ in range(2)]\n\nx_max = max(num_list[0])\ny_max = max(num_list[1])\n\nif x_max >= y_max:\n print('War')\nelif x_max < X or y_max > Y:\n print('War')\nelse:\n print('No war')\n", "N,M,X,Y = map(int, input().split())\nnum_list = [list(map(int, input().split())) for _ in range(M)]\n\nZ = list(range(X+1,Y+1))\n\nfor z in Z:\n if max(num_list[0]) < z and min(num_list[1]) >= z:\n print('No War')\n break\n if z == Z[-1]:\n print('War')", "A,B,C = map(int, input().split())\n\nnum = sorted([A,B,C],reverse=True)\nprint(eval(str(num[0])+str(num[1])+'+'+str(num[2])))"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s283143114', 's696506020', 's032272331'] | [3060.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0] | [259, 270, 122] |
p03250 | u981931040 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['a , b , c = soted(map(int, input().split()))\nprint(c * 10 + b + a)', 'a , b , c = soted(map(int, input().split()))\nprint(a * 10 + b + c)', 'A = list(map(int,input().split()))\nprint(sum(A) - max(A) + max(A) * 10)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s080562789', 's082380964', 's913778722'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [66, 66, 71] |
p03250 | u982594421 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['a, b, c = map(int, input().split())\na, b, c = sorted([a, b, c])\nprint(c * 10 + b + c)\n', 'a, b, c = map(int, input().split())\na, b, c = sorted([a, b, c])\nprint(c * 10 + b + a)'] | ['Wrong Answer', 'Accepted'] | ['s927045440', 's550224768'] | [2940.0, 2940.0] | [17.0, 17.0] | [86, 85] |
p03250 | u993622994 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['a, b, c = reversed(input().split())\nans = eval(a + b) + int(c)\nprint(ans)', 'a, b, c = map(int, input().split())\nans = max(a*10+b+c, a+b*10+c, a+b+c*10)\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s685901136', 's790314376'] | [2940.0, 2940.0] | [17.0, 17.0] | [73, 86] |
p03250 | u994767958 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['a = [int(i) for i in input().split())]\na.sort()\nprint(a[2]*10+a[1]+a[0])', 'a = [int(i) for i in input().split()]\na.sort()\nprint(a[2]*10+a[1]+a[0])'] | ['Runtime Error', 'Accepted'] | ['s279638864', 's426078165'] | [2940.0, 2940.0] | [17.0, 17.0] | [72, 71] |
p03250 | u994985556 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['#coding: utf-8\nl=list(map(int,input().split()))\nl.sort()\nA=l[0]\nB=l[1]\nC=l[2]\nprint(10*A+B+C)', '#coding: utf-8\nl=list(map(int,input().split()))\nl.sort()\nC=l[0]\nB=l[1]\nA=l[2]\nprint(10*A+B+C)\n'] | ['Wrong Answer', 'Accepted'] | ['s720593325', 's980384466'] | [2940.0, 2940.0] | [18.0, 18.0] | [93, 94] |
p03250 | u996434204 | 2,000 | 1,048,576 | You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance. | ['buf=[int(x) for x in input().split()]\n\nbuf.sort\n\nprint(max(buf)*10+buf[1]+buf[0])', 'buf=[int(x) for x in input().split()]\n\nbuf.sort()\n\nprint(max(buf)*10+buf[1]+buf[0])'] | ['Wrong Answer', 'Accepted'] | ['s700993457', 's550094444'] | [2940.0, 2940.0] | [17.0, 17.0] | [81, 83] |
p03252 | u017415492 | 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 be made equal by performing the operation zero or more times. | ['s=input()\nt=input()\nn=len(s)\nsabc={}\ntabc={}\nal=list("abcdefghijklmnopqrstuvwxyz")\nfor i in range(26):\n sabc[al[i]]=0\n tabc[al[i]]=0 \ns=list(s)\nt=list(t)\ns.sort()\nt.sort()\ncount=1\nfor i in range(n-1):\n if s[i]==s[i+1]:\n count+=1\n else:\n sabc[s[i]]=count\n count=1\n syu+=1\nsabc[s[-1]]=count\ncount=1\nsyu=0\nfor i in range(n-1):\n if t[i]==t[i+1]:\n count+=1\n else:\n tabc[t[i]]=count\n count=1\n syu+=1\ntabc[t[-1]]=count\n\nfor i in al:\n if tabc[i]!=0 and sabc!=0:\n if tabc[i]!=sabc[i]:\n print("No")\n count=-1\n break\nif count!=-1:\n print("Yes")', 's=input()\nt=input()\nd=dict()\nflag=True\nds=set()\nfor i in range(len(s)):\n\n if not(t[i] in d):\n if s[i] in ds:\n flag=False\n break\n d[t[i]]=s[i]\n ds.add(s[i])\n else:\n if d[t[i]]!=s[i]:\n flag=False\n break\nif flag:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s073216047', 's136854045'] | [7472.0, 3632.0] | [103.0, 74.0] | [583, 278] |
p03252 | u020373088 | 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 be made equal by performing the operation zero or more times. | ['s = np.array(list(input()))\nt = np.array(list(input()))\nnum = 0\nfor i in set(t):\n if np.sum(s==i) == np.sum(t==i):\n num += 1\n continue\n if len(set(s[t==i])) == 1:\n num += 1\n continue\nif num == len(set(t)):\n print("Yes")\nelse:\n print("No")', 'from collections import Counter\ns = input()\nt = input()\n\nsc = Counter(s)\ntc = Counter(t)\n\nif sorted(sc.values()) == sorted(tc.values()):\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s613747385', 's640145169'] | [3064.0, 4144.0] | [18.0, 45.0] | [254, 171] |
p03252 | u020390084 | 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 be made equal by performing the operation zero or more times. | ['s = input()\ntarget = input()\nfor index in xrange(len(s)):\n ss = s[index]\n tt = target[index]\n\t\n if s[:index] != target[:index]:\n break\n if ss == tt:\n continue\n else: \n s = s.replace(ss,"0").replace(tt,ss).replace("0",tt)\n\nif s == target:\n print("Yes")\nelse:\n print("No")', 's = list(input())\nt = list(input())\n\nt_set = [tt for tt in set(t) if t.count(tt)>1]\nfor tt in list(t_set):\n index_num = [n for n, v in enumerate(s) if v == tt]\n \n s_id = []\n for index in index_num:\n s_id.append(s[index])\n \n if len(set(s_id)) == 1:\n continue\n else:\n print("No")\n break\nelse:\n print("Yes")\n', 's = list(input())\nt = list(input())\n\nt_set = [tt for tt in set(t) if t.count(tt)>1]\nfor tt in list(t_set):\n index_num = [n for n, v in enumerate(s) if v == tt]\n \n s_id = []\n for index in index_num:\n if t[index] != s[index]:\n s_id.append(s[index])\n \n if len(set(s_id)) == 1:\n continue\n else:\n print("No")\n break\nelse:\n print("Yes")\n', '#!/usr/bin/env python3\nimport sys\n\nYES = "Yes" # type: str\nNO = "No" # type: str\n\n\ndef solve(S: str, T: str):\n table = {}\n for i in range(len(T)):\n if table.get(S[i]) == None:\n table[S[i]] = T[i]\n else:\n if table[S[i]] == T[i]:\n continue\n else:\n \n print(NO)\n return\n\n value_list = []\n for value in table.values():\n value_list.append(value)\n \n \n if len(set(value_list)) == len(table):\n print(YES)\n else:\n print(NO)\n\n return\n\ndef main():\n def iterate_tokens():\n for line in sys.stdin:\n for word in line.split():\n yield word\n tokens = iterate_tokens()\n S = next(tokens) # type: str\n T = next(tokens) # type: str\n solve(S, T)\n\nif __name__ == \'__main__\':\n main()\n'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s051208532', 's136846030', 's396831619', 's353122733'] | [3632.0, 15264.0, 14876.0, 3828.0] | [18.0, 333.0, 346.0, 73.0] | [341, 325, 356, 1008] |
p03252 | u020604402 | 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 be made equal by performing the operation zero or more times. | ['\nimport collections\nimport copy\na=collections.Counter([x for x in input()])\nb=collections.Counter([x for x in input()])\nc=sorted(list(a.values()))\nd=sorted(list(b.values()))\nx=[]\nx.append(c)\ndef join(c):\n for i in range(0,len(c)):\n for j in range(0,i):\n if i != j :\n l= copy.copy(c)\n l.remove(c[i])\n l.remove(c[j])\n l.append(c[i]+c[j])\n x.append(sorted(l))\n if len(l)!=1:\n join(l)\njoin(c)\narr = list(map(list,set(map(tuple, x))))\nprint(arr)\nfor k in arr:\n if k == d:\n print("Yes")\n exit()\nprint("No")\n', 'S = list(input())\nT = list(input())\nL = []\nM = []\nal = list(\'abcdefghijklmnopqrstuvwxyz\')\n\nfor i in range(len(al)):\n l = []\n for j in range(len(S)):\n if al[i] == S[j]:\n l.append(j)\n else:\n pass\n L.append(l)\ni = 0\nfor i in range(len(al)):\n l = []\n for j in range(len(T)):\n if al[i] == T[j]:\n l.append(j)\n else:\n pass\n M.append(l)\nif sorted(L)==sorted(M):\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Accepted'] | ['s310606228', 's849883676'] | [121156.0, 24436.0] | [2111.0, 1668.0] | [648, 483] |
p03252 | u021548497 | 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 be made equal by performing the operation zero or more times. | ['import sys\n\ns = input()\nt = input()\n\ndef replacement(word, a, b):\n return word.replace(a, "0").replace(b, a).replace("0", b)\n\nyet_list = []\nfor i in range(len(s)):\n if s[i] in yet_list:\n print("No")\n sys.exit()\n if s[i] != t[i]:\n if not s[i] in yet_list:\n s = replacement(s, s[i], t[i])\n yet_list.append(s[i])\n yet_list.append(t[i])\nif s == t:\n print("Yes")\nelse:\n print("No")', 'import sys\ns = input()\nt = input()\nyetlist = {}\nyetlist2 = {}\nfor i in range(len(s)):\n if s[i] in yetlist:\n if t[i] != yetlist[s[i]]:\n print("No")\n sys.exit()\n else:\n yetlist[s[i]] = t[i]\n if t[i] in yetlist2:\n if s[i] != yetlist2[t[i]]:\n print("No")\n sys.exit()\n else:\n yetlist2[t[i]] = s[i] \n \nprint("Yes")'] | ['Wrong Answer', 'Accepted'] | ['s598822847', 's796514286'] | [3776.0, 3632.0] | [21.0, 125.0] | [445, 405] |
p03252 | u021916304 | 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 be made equal by performing the operation zero or more times. | ["def ii():return int(input())\ndef iim():return map(int,input().split())\ndef iil():return list(map(int,input().split()))\ndef ism():return map(str,input().split())\ndef isl():return list(map(str,input().split()))\n\ns = list(input())\nt = list(input())\n\nl='abcdefghijklmnopqrstuvwxyz'\nif len(set(t)) == len(set(s)):\n print('No')\n exit()\n\nfor item in l:\n can = [i for i, x in enumerate(t) if x == item]\n if len(can) > 1:\n d = [s[i] for i in can]\n if len(set(d)) != 1:\n print('No')\n exit()\nprint('Yes')\n", "def ii():return int(input())\ndef iim():return map(int,input().split())\ndef iil():return list(map(int,input().split()))\ndef ism():return map(str,input().split())\ndef isl():return list(map(str,input().split()))\n\ns = list(input())\nt = list(input())\n\nl='abcdefghijklmnopqrstuvwxyz'\n\nfor item in l:\n can = [i for i, x in enumerate(t) if x == item]\n# print(can)\n if len(can) > 1:\n d = [s[i] for i in can]\n if len(set(d)) != 1:\n print('No')\n exit()\nfor item in l:\n can = [i for i, x in enumerate(s) if x == item]\n# print(can)\n if len(can) > 1:\n d = [t[i] for i in can]\n if len(set(d)) != 1:\n print('No')\n exit()\nprint('Yes')\n"] | ['Wrong Answer', 'Accepted'] | ['s561020816', 's742914234'] | [11872.0, 15364.0] | [416.0, 869.0] | [542, 708] |
p03252 | u026075806 | 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 be made equal by performing the operation zero or more times. | ["def main():\n S = input()\n T = input()\n\n DICT = {}\n\n for ch_s, ch_t in zip(S, T):\n #print(ch_s, ch_t)\n if ch_s in DICT.keys():\n #print('swap')\n ch_s = DICT[ch_s]\n\n if ch_t in DICT.values():\n #print(DICT)\n print(ch_s, ch_t, DICT[ch_t])\n if DICT[ch_t] != ch_t:\n print('No')\n return\n DICT[ch_s] = ch_t\n print('Yes')\n return\n\n\nmain()", "from collections import defaultdict\ndef main():\n S = input()\n T = input()\n\n s_dict = defaultdict(list)\n t_dict = defaultdict(list)\n\n for ch_s, ch_t in zip(S, T):\n s_dict[ch_s].append(ch_t)\n t_dict[ch_t].append(ch_s)\n\n for value in s_dict.values():\n if len(value) >= 2:\n print('No')\n return\n\n for value in t_dict.values():\n if len(value) >= 2:\n print('No')\n return\n\n print('Yes')\n return\n\n\nmain()", "def main():\n S = input()\n T = input()\n\n DICT = {}\n\n for ch_s, ch_t in zip(S, T):\n #print(DICT)\n if ch_t in DICT.keys():\n #print(ch_t)\n if DICT[ch_t] != ch_t:\n print('No')\n return\n DICT[ch_t] = ch_s\n print('Yes')\n return\n\n\nmain()", "def main():\n S = input()\n T = input()\n\n DICT = {}\n\n for ch_s, ch_t in zip(S, T):\n #print(DICT)\n if ch_t in DICT.values():\n print('No')\n return\n DICT[ch_s] = ch_t\n print('Yes')\n return\n\n\nmain()", "def main():\n S = input()\n T = input()\n\n DICT = {}\n\n for ch_s, ch_t in zip(S, T):\n print(DICT)\n if ch_t in DICT.keys():\n print(ch_t)\n if DICT[ch_t] != ch_t:\n print('No')\n return\n DICT[ch_t] = ch_s\n print('Yes')\n return\n\n\nmain()", 'def main():\n S = input()\n T = input()\n\n s_dict = {}\n t_dict = {}\n\n for ch_s, ch_t in zip(S, T):\n if ch_t in t_dict.keys():\n if t_dict[ch_t] != ch_s:\n print("No")\n return\n else:\n t_dict[ch_t] = ch_s\n\n if ch_s in s_dict.keys():\n if s_dict[ch_s] != ch_t:\n print("No")\n return\n else:\n s_dict[ch_s] = ch_t\n #print("s",s_dict)\n #print("t",t_dict)\n\n print(\'Yes\')\n return\n\n\nmain()'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s215315568', 's242099274', 's356350308', 's502656894', 's597530978', 's115601186'] | [3632.0, 8360.0, 3632.0, 3632.0, 3632.0, 3632.0] | [18.0, 62.0, 18.0, 19.0, 18.0, 74.0] | [459, 494, 319, 253, 317, 539] |
p03252 | u036104576 | 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 be made equal by performing the operation zero or more times. | ['S = input()\nT = input()\n\nx = defaultdict(list)\n\nfor i, t in enumerate(T):\n x[t].append(S[i])\n\nok = True\nfor k, v in x.items():\n a = v[0]\n for c in v:\n if c != a:\n ok = False\n break\nif ok:\n print("Yes")\nelse:\n print("No")\n', 'import sys\nimport itertools\n# import numpy as np\nimport time\nimport math\nimport heapq\nfrom collections import defaultdict\nsys.setrecursionlimit(10 ** 7)\n \nINF = 10 ** 18\nMOD = 10 ** 9 + 7\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\n# map(int, input().split())\n\nS = input()\nT = input()\n\nx = defaultdict(list)\ny = defaultdict(list)\n\nfor i, t in enumerate(T):\n x[t].append(S[i])\n\nfor i, s in enumerate(S):\n y[s].append(T[i])\n\nok = True\nfor k, v in x.items():\n a = v[0]\n for c in v:\n if c != a:\n ok = False\n break\n\nfor k, v in y.items():\n a = v[0]\n for c in v:\n if c != a:\n ok = False\n break\n\nif ok:\n print("Yes")\nelse:\n print("No")\n'] | ['Runtime Error', 'Accepted'] | ['s171656860', 's714583260'] | [9372.0, 14056.0] | [26.0, 121.0] | [265, 773] |
p03252 | u036744414 | 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 be made equal by performing the operation zero or more times. | ['# coding:utf-8\n\n\n\nS = str(input())\nT = str(input())\n\nSdic = [0 for _ in range(26)]\nTdic = [0 for _ in range(26)]\n\nalphabet = [\'a\', \'b\', \'c\', \'d\', \'e\', \'f\', \'g\', \'h\', \'i\', \'j\', \'k\', \'l\' \\\n \'m\', \'n\', \'o\', \'p\', \'q\', \'r\', \'s\', \'t\', \'u\', \'v\', \'w\', \'x\', \'y\', \'z\']\n\nAble = True\n\nfor i in range(len(S)):\n si = S[i]\n ti = T[i]\n if Sdic[alphabet.index(si)] == 0:\n Sdic[alphabet.index(si)] = ti\n elif Sdic[alphabet.index(si)] != 0:\n if Sdic[alphabet.index(si)] == ti:\n pass\n else:\n Able = False\n break\n elif Tdic[alphabet.index(ti)] == 0:\n Tdic[alphabet.index(ti)] = si\n elif Tdic[alphabet.index(ti)] != 0:\n if Tdic[alphabet.index(ti)] == si:\n pass\n else:\n Able = False\n break\n\nprint("Yes" if Able else "No")\n\n', '# coding:utf-8\n\n\n\nS = str(input())\nT = str(input())\n\nSdic = [0 for _ in range(26)]\nTdic = [0 for _ in range(26)]\n\nalphabet = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n",\\\n "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]\n\nAble = True\n\nfor i in range(len(S)):\n si = S[i]\n ti = T[i]\n if Sdic[alphabet.index(si)] == 0:\n Sdic[alphabet.index(si)] = ti\n elif Sdic[alphabet.index(si)] != ti:\n Able = False\n break\n if Tdic[alphabet.index(ti)] == 0:\n Tdic[alphabet.index(ti)] = si\n elif Tdic[alphabet.index(ti)] != si:\n Able = False\n break\n \nprint("Yes" if Able else "No")'] | ['Runtime Error', 'Accepted'] | ['s561388434', 's577314538'] | [3632.0, 3632.0] | [333.0, 435.0] | [857, 699] |
p03252 | u047197186 | 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 be made equal by performing the operation zero or more times. | ['import collections\n\ns = input()\nt = input()\nc1 = collections.Counter(s)\nc2 = collections.Counter(t)\ns_values = sorted(list(c1.values()))\nt_values = sorted(list(c2.values()))\n\nif len(s) == len(t):\n if len(list(set(s))) == len(list(set(t))):\n if s_values == v_values():\n print("Yes")\n else:\n print("No")\n else:\n print("No")\nelse:\n print("No")', 'import collections\n\ns = input()\nt = input()\nc1 = collections.Counter(s)\nc2 = collections.Counter(t)\ns_values = sorted(list(c1.values()))\nt_values = sorted(list(c2.values()))\n\nif len(s) == len(t):\n if len(list(set(s))) == len(list(set(t))):\n if s_values == t_values:\n print("Yes")\n else:\n print("No")\n else:\n print("No")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s289343844', 's382257213'] | [4016.0, 4144.0] | [60.0, 52.0] | [362, 360] |
p03252 | u050428930 | 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 be made equal by performing the operation zero or more times. | ['s=list(map(int,input().split()))\nt=list(map(int,input().split()))\na=[0]*26\nfor i in range(len(s)):\n if a[ord(s[i])]==0:\n a[ord(s[i])]=ord(t[i])\n elif a[ord(s[i])]==ord(t[i]):\n continue\n else:\n print("No")\n exit()\nprint("Yes")', 's=list(map(int,input().split()))\nt=list(map(int,input().split()))\na=[0]*26\nfor i in range(len(s)):\n if a[ord(s[i])]==0:\n a[ord(s[i])]=ord(t[i])\n elif a[ord(s[i])]==ord(t[i]):\n continue\n else:\n print("No")\n exit()', 'list(input())\nt=list(input())\na=[0]*27\nfor i in range(len(s)):\n if a[ord(s[i])-96]==0:\n a[ord(s[i])-96]=ord(t[i])-96\n elif a[ord(s[i])-96]==ord(t[i])-96:\n continue\n else:\n print("No")\n exit()\nprint("Yes")\n', 'a=list(input())\nb=list(input())\nfrom collections import Counter\ndef f(s):\n return sorted(Counter(s).values())\nif f(a)==f(b):\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s049501182', 's351445155', 's843084935', 's421891155'] | [3444.0, 3444.0, 5140.0, 6704.0] | [19.0, 19.0, 25.0, 53.0] | [240, 227, 220, 166] |
p03252 | u055941944 | 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 be made equal by performing the operation zero or more times. | ['import collections\n\ns = input()\nt = input()\nS = collections.Counter(s)\nT = collections.Counter(t)\n\nif S.values()==T.values():\n\tprint("Yes")\nelse:\n\tprint("No")', 'import collections\n\ns = input()\nt = input()\nS = collections.Counter(s)\nT = collections.Counter(t)\n\nif sorted(S.values())==sorted(T.values()):\n\tprint("Yes")\nelse:\n\tprint("No")'] | ['Wrong Answer', 'Accepted'] | ['s168434639', 's656135457'] | [4016.0, 3888.0] | [43.0, 41.0] | [158, 174] |
p03252 | u063896676 | 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 be made equal by performing the operation zero or more times. | ['# -*- coding: utf-8 -*-\n\nS = input()\nT = input()\n\nN = len(S)\n\nST = [None] * N\n\nfor i in range(N):\n ST[i] = [S[i], T[i]]\n\nST.sort(key=lambda a_i: a_i[0])\n\n# for st in ST:\n# print(st)\n\ndic = {}\nfor i, st in enumerate(ST):\n if st[0] in dic.keys():\n if i < dic[st[0]]:\n dic[st[0]] = i\n else:\n dic[st[0]] = i\n\ni = 0\nwhile i < N:\n ST_copy = ST\n dic_copy = dic\n if ST[i][0] != ST[i][1]:\n for j in range(i, N):\n if ST[j][0] != ST[i][0]:\n break\n ST_copy[j][0] = ST[i][1]\n if ST[i][1] in dic_copy.keys():\n if j < dic_copy[ST[i][1]]:\n dic_copy[ST[i][1]] = j\n else:\n dic_copy[ST[i][1]] = j\n if ST[i][0] in dic_copy.keys():\n del dic_copy[ST[i][0]]\n if ST[i][1] in dic.keys():\n k = dic[ST[i][1]]\n while k < N:\n if ST[k][0] != ST[i][1]:\n break\n ST_copy[k][0] = ST[i][0]\n if ST[i][0] in dic_copy.keys():\n if k < dic_copy[ST[i][0]]:\n dic_copy[ST[i][0]] = k\n else:\n dic_copy[ST[i][0]] = k\n k += 1\n if ST[i][1] in dic_copy.keys():\n del dic_copy[ST[i][1]]\n ST = ST_copy\n dic = dic_copy\n i += 1\n\nfor st in ST:\n print(st)\n\nequal = True\nfor st in ST:\n if st[0] != st[1]:\n equal = False\n break\n\nif equal:\n print("Yes")\nelse:\n print("No")\n', '# coding: utf-8\n\n\n\n\ndef main():\n S = input()\n T = input()\n N = len(S)\n\n memo1 = {}\n memo2 = {}\n for i in range(N):\n if S[i] not in memo1:\n memo1[S[i]] = T[i]\n else:\n if memo1[S[i]] != T[i]:\n return "No"\n if T[i] not in memo2:\n memo2[T[i]] = S[i]\n else:\n if memo2[T[i]] != S[i]:\n return "No"\n\n return "Yes"\n\n\nprint(main())\n'] | ['Wrong Answer', 'Accepted'] | ['s946400110', 's524457751'] | [27232.0, 3632.0] | [978.0, 91.0] | [1539, 481] |
p03252 | u070561949 | 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 be made equal by performing the operation zero or more times. | ['ss = str(input())\nt = str(input())\n\nfor i in range(len(ss)):\n\n if ss == t :\n print("Yes")\n exit(0)\n\n s = list(ss)\n\n if s[i] != t[i]:\n c1 = s[i]\n c2 = t[i]\n \n ss = ss.replace(c1 ,"-")\n ss = ss.replace(c2 ,c1 )\n ss = ss.replace("-",c2 )\n print(ss)\n\nprint("No")', 's = list(str(input()))\nt = list(str(input()))\n\nsd = {}\ntd = {}\n\nfor k in range(ord(\'a\'),ord(\'z\')+1): \n sd[chr(k)] = 0\n td[chr(k)] = 0\n\nfor i in range(len(s)) :\n if s[i] in sd :\n sd[s[i]] = sd[s[i]] + 1\n\n if t[i] in td :\n td[t[i]] = td[t[i]] + 1\n""" \nfor k in range(ord(\'a\'),ord(\'z\')+1): \n print(str(chr(k)) + ":",end="")\n if chr(k) in sd :\n print(str(sd[chr(k)]) + " ",end="")\n else:\n print("0 ",end="")\nprint()\nfor k in range(ord(\'a\'),ord(\'z\')+1): \n print(str(chr(k)) + ":",end="")\n if chr(k) in td :\n print(str(td[chr(k)]) + " ",end="")\n else:\n print("0 ",end="")\nprint() """\n\nta = []\nsa = []\nfor k in range(ord(\'a\'),ord(\'z\')+1):\n if td[chr(k)] != sd[chr(k)] : \n if td[chr(k)] > 0 :\n ta.append(td[chr(k)])\n if sd[chr(k)] > 0 : \n sa.append(sd[chr(k)])\n#print(ta)\n#print(sa)\n\nta.sort()\nsa.sort()\n\nif ta == sa :\n print("Yes")\nelse :\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s757660513', 's478421409'] | [139324.0, 6704.0] | [2104.0, 153.0] | [331, 972] |
p03252 | u086503932 | 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 be made equal by performing the operation zero or more times. | ['S = input()\nT = input()\nR_s = [-1] * 26\nR_t = [-1] * 26\nans = True\n\nfor i in range(len(S)):\n tmpS = ord(S[i]) - 97\n tmpT = ord(T[i]) - 97\n if R_s[tmpS] < 0:\n R_s[tmpS] = tmpT\n elif R_s[tmpS] != tmpT:\n ans = False\n \n if R_t[tmpT] < 0:\n R_t[tmpT] = tmpS\n elif R_t[tmpT] != tmpS:\n ans = False\n\nprint(ans)', "S = input()\nT = input()\nR_s = [-1] * 26\nR_t = [-1] * 26\nans = 'Yes'\n\nfor i in range(len(S)):\n tmpS = ord(S[i]) - 97\n tmpT = ord(T[i]) - 97\n if R_s[tmpS] < 0:\n R_s[tmpS] = tmpT\n elif R_s[tmpS] != tmpT:\n ans = 'No'\n \n if R_t[tmpT] < 0:\n R_t[tmpT] = tmpS\n elif R_t[tmpT] != tmpS:\n ans = 'No'\n\nprint(ans)"] | ['Wrong Answer', 'Accepted'] | ['s700347455', 's243111625'] | [3632.0, 3632.0] | [149.0, 143.0] | [320, 319] |
p03252 | u094191970 | 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 be made equal by performing the operation zero or more times. | ['chokudai\nredcoder', "s=input()\nt=input()\n\nd={}\nfor i in range(len(s)):\n if s[i]!=t[i]:\n if s[i] in d:\n if d[s[i]]!=t[i]\n print('No')\n exit()\n else:\n pass\n else:\n d[s[i]]=t[i]\n else:\n if s[i] in d and d[s[i]]!=t[i]:\n print('No')\n exit()\nprint('Yes')", "from collections import Counter\n\ns=input()\nt=input()\n\ncs=Counter(s)\nct=Counter(t)\n\nprint('Yes' if sorted(cs.values())==sorted(ct.values()) else 'No')"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s419261217', 's498077848', 's879553927'] | [2940.0, 2940.0, 4016.0] | [17.0, 18.0, 43.0] | [17, 283, 149] |
p03252 | u094565093 | 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 be made equal by performing the operation zero or more times. | ["S=list(input())\nT=list(input())\ndef bSort(a):\n for i in range(len(a)):\n for j in range(len(a)-1, i, -1):\n if a[j] < a[j-1]:\n a[j], a[j-1] = a[j-1], a[j]\n\n return a\nif bSort(S)==bSort(T):\n print('Yes')\nelse:\n print('No')", "S=list(input())\nT=list(input())\nSS=list(set(S))\nST=list(set(T))\nScounter=[]\nTcounter=[]\nfor i in range(len(SS)):\n Scounter.append(S.count(SS[i]))\nfor j in range(len(ST)):\n Tcounter.append(T.count(ST[j]))\nif Scounter==Tcounter:\n print('Yes')\nelse:\n print('No')", "S=input()\nT=input()\nstart=[-1]*26\ngoal=[-1]*26\nans='Yes'\nfor 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]!=b or goal[b]!=a:\n ans='No'\n else:\n start[a]=b;\n goal[b]=a;\nprint(ans)"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s138992468', 's426427915', 's867552172'] | [7216.0, 6960.0, 3632.0] | [2104.0, 128.0, 166.0] | [264, 271, 285] |
p03252 | u102960641 | 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 be made equal by performing the operation zero or more times. | ['from operator import itemgetter\ns = input()\nt = input()\na = []\nfor i in range(len(s)-1):\n b = [s[i],t[i]]\n a.append(b)\na.sort()\nprint(a)\nfor i in range(len(s)-2):\n if a[i][0] == a[i+1][0]:\n if a[i][1] != a[i+1][1]:\n print("No")\n exit()\na.sort(key=itemgetter(1))\nfor i in range(len(s)-2):\n if a[i][0] == a[i+1][0]:\n if a[i][1] != a[i+1][1]:\n print("No")\n exit()\nprint("Yes")', 'def isOK(s,t):\n m = [None] * 26\n for i,j in zip(s,t):\n num = ord(i) - ord("a")\n if m[num] == None:\n m[num] = j\n else:\n if m[num] != j:\n return False\n return True\n\ns = input()\nt = input()\nif isOK(s,t) and isOK(t,s):\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s646186012', 's109064176'] | [32412.0, 3632.0] | [509.0, 113.0] | [403, 278] |
p03252 | u103902792 | 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 be made equal by performing the operation zero or more times. | ["s = input()\nt = input()\n\ntable = [[0 for i in range(26)] for j in range(26)]\nfor i in range(len(s)):\n table[ord(t[i])-ord('a')][ord(s[i])-ord('a')] += 1\nfor t_row in table:\n counter = 0\n for v in t_row:\n if v != 0:\n counter += 1\n if counter >= 2:\n break\n#else:\n# print('Yes')\n# exit(0)\nprint('No')\n ", "s = input()\nt = input()\n\ntable = [[0 for i in range(26)] for j in range(26)]\nfor i in range(len(s)):\n table[ord(t[i])-ord('a')][ord(s[i])-ord('a')] += 1\nfor t_row in table:\n counter = 0\n for v in t_row:\n if v != 0:\n counter += 1\n if counter >= 2:\n break\nelse:\n for i in range(26):\n counter = 0\n for j in range(26):\n if table[j][i] != 0:\n counter += 1\n if counter >= 2:\n break\n else:\n print('Yes')\n exit(0)\nprint('No')"] | ['Wrong Answer', 'Accepted'] | ['s447886436', 's448874680'] | [3632.0, 3632.0] | [123.0, 122.0] | [317, 466] |
p03252 | u106797249 | 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 be made equal by performing the operation zero or more times. | ['def resolve():\n S = input()\n T = input()\n\n for i in range(len(S)-1):\n if S[i] != T[i]:\n c1 = S.find(S[i], i+1)\n if c1 != -1 and T[c1] != T[i]:\n print("No")\n return\n c2 = S.find(T[i], i+1)\n if c2 != -1 and S[i] != T[c2]:\n print("No")\n return\n print("{} <-> {}".format(S[i], T[i]))\n print("Yes")\n\n\n\nif \'__main__\' == __name__:\n resolve()', 'def resolve():\n S = input()\n T = input()\n smap = {}\n tmap = {}\n for i in range(len(S)):\n if S[i] in smap: \n if smap[S[i]] != T[i]:\n print("No")\n return\n else:\n smap[S[i]] = T[i]\n \n if T[i] in tmap: \n if tmap[T[i]] != S[i]:\n print("No")\n return\n else:\n tmap[T[i]] = S[i]\n\n print("Yes")\n return\n\n\nif \'__main__\' == __name__:\n resolve()'] | ['Wrong Answer', 'Accepted'] | ['s232623414', 's078416158'] | [5168.0, 3632.0] | [1013.0, 90.0] | [471, 495] |
p03252 | u108990937 | 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 be made equal by performing the operation zero or more times. | ['S = input()\nT = input()\nalphabets = "abcdefghijklmnopqrstuvwxyz"\n\nS_list=[]\nT_list=[]\nfor c in alphabets:\n Scnt = S.count(c)\n Tcnt = T.count(c)\n if Scnt > 0:\n S_list.append(Scnt)\n if Tcnt > 0:\n T_list.append(Tcnt)\n\nif sorted(S_list) is sorted(T_list):\n print(\'Yes\')\nelse:\n print(\'No\')', 'S = input()\nT = input()\nalphabets = "abcdefghijklmnopqrstuvwxyz"\n\nS_list=[]\nT_list=[]\nfor c in alphabets:\n Scnt = S.count(c)\n Tcnt = T.count(c)\n if Scnt > 0:\n S_list.append(Scnt)\n if Tcnt > 0:\n T_list.append(Tcnt)\n\nif sorted(S_list) == sorted(T_list):\n print(\'Yes\')\nelse:\n print(\'No\')'] | ['Wrong Answer', 'Accepted'] | ['s975930229', 's121508184'] | [3632.0, 3632.0] | [28.0, 28.0] | [316, 316] |
p03252 | u116233709 | 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 be made equal by performing the operation zero or more times. | ['S=str(input())\nT=str(input())\ndic={}\nfor s,t in zip(S,T):\n if s in dic:\n if dic[s]!=t:\n print("No")\n exit()\n else:\n dic[s]=t\n\nif len(d)!=len(set(d.values())):\n print("No") \nelse:\n print("Yes") \n \n \n', 'S=str(input())\nT=str(input())\nx=[]\ny=[]\ndic={}\n\nfor i in range(len(S)):\n x.append(S[i])\n y.append(T[i])\n \nfor s,t in zip(x,y):\n if s in dic:\n if dic[s]!=t:\n print("No")\n exit()\n else:\n dic[s]=t\n\nif len(dic)!=len(set(dic.values())):\n print("No") \nelse:\n print("Yes") \n \n \n\n'] | ['Runtime Error', 'Accepted'] | ['s947387041', 's189440395'] | [3632.0, 6716.0] | [55.0, 111.0] | [278, 361] |
p03252 | u117348081 | 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 be made equal by performing the operation zero or more times. | ['import collections\ns = input()\nt = input()\ns = collections.Counter(s)\nt = collections.Counter(t)\nif sorted(s.values()) == sorted(t.values):\n print("Yes")\nelse:\n print("No")', 's = input()\nt = input()\n\ndict_st = {}\ndict_st = {}\n\nfor x, y in zip(s, t):\n if x not in dict_st:\n dict_st[x] = y \n else:\n if dict_st[x] != y:\n print("No")\n break\n\n if y not in dict_ts:\n dict_ts[y]=x\n else:\n if dict_ts[y]!=x:\n print("No")\n break\nelse:\n print("Yes")', 's = input()\nt = input()\n\ndict_st = {}\ndict_ts = {}\n\nfor x, y in zip(s, t):\n if x not in dict_st:\n dict_st[x] = y \n else:\n if dict_st[x] != y:\n print("No")\n exit()\n\n if y not in dict_ts:\n dict_ts[y]=x\n else:\n if dict_ts[y]!=x:\n print("No")\n exit()\n\nprint("Yes")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s555915804', 's774156291', 's514594133'] | [4016.0, 3632.0, 3632.0] | [43.0, 18.0, 82.0] | [174, 351, 344] |
p03252 | u123745130 | 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 be made equal by performing the operation zero or more times. | ['l=input()\nm=input()\nll=set(l)-sei(m)\nlll=set(m)-set(l)\nprint(["No","Yes"][len(ll)==len(lll)])', 'a=input()\nb=input()\ndic_a={}\ndic_b={}\nfor i in a:\n if i not in dic_a:\n dic_a[i]=1\n else:\n dic_a[i] += 1\nfor i in b:\n if i not in dic_b:\n dic_b[i]=1\n else:\n dic_b[i] += 1\n\n\nprint("Yes" if (sorted(dic_a.values())==sorted(dic_b.values())) else "No" )'] | ['Runtime Error', 'Accepted'] | ['s955640903', 's186689490'] | [3564.0, 3632.0] | [23.0, 92.0] | [93, 287] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.