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 |
|---|---|---|---|---|---|---|---|---|---|---|
p02730 | u334242570 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['\ndef reverse(s): \n return s[::-1] \n \ndef isPalindrome(s): \n \n rev = reverse(s) \n \n if (s == rev): \n return True\n return False\ndef listToString(s): \n\n str1 = "" \n for ele in s: \n str1 += ele \n \n return str1 \n \ns=input()\nn = len(s)\np=int(round((n-1)/2))\nq=int(round((n+3)/2))\nans = isPalindrome(s)\nprint(ans)\n\nt1=[]\nt2=[]\n\nfor i in range(0,p):\n t1.append(s[i])\nfor i in range(q-1,n):\n t2.append(s[i]) \nprint(t1,t2)\nans1=isPalindrome(listToString(t1))\nans2=isPalindrome(listToString(t2))\nif (ans==1 and ans1==1 and ans2==1):\n print ("Yes")\n \nelse:\n print("No")\n ', '\ndef reverse(s): \n return s[::-1] \n \ndef isPalindrome(s): \n \n rev = reverse(s) \n \n if (s == rev): \n return True\n return False\ndef listToString(s): \n\n str1 = "" \n for ele in s: \n str1 += ele \n \n return str1 \n \ns=input()\nn = len(s)\np=int(round((n-1)/2))\nq=int(round((n+3)/2))\nans = isPalindrome(s)\n\n\nt1=[]\nt2=[]\n\nfor i in range(0,p):\n t1.append(s[i])\nfor i in range(q-1,n):\n t2.append(s[i]) \n\nans1=isPalindrome(listToString(t1))\nans2=isPalindrome(listToString(t2))\nif (ans==1 and ans1==1 and ans2==1):\n print ("Yes")\n \nelse:\n print("No")\n '] | ['Wrong Answer', 'Accepted'] | ['s106136537', 's663177352'] | [3064.0, 3064.0] | [18.0, 17.0] | [631, 609] |
p02730 | u334314337 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['text = str(input())\nn = len(text)\ntarget = (n-1)//2\n \nprint(target)\n \nbef = text[:target]\naft = text[target+1:]\n\n \nif bef == aft:\n print("Yes")\nelse:\n print("No")', 'text = str(input())\nn = len(text)\ntarget = (n-1)//2\n\nprint(target)\n\nbef = text[:target]\naft = text[target+1:]\ntfa = aft[::-1]\n\nif bef == tfa:\n print("Yes")\nelse:\n print("No")', 'text = str(input())\nn = len(text)\ntarget = (n-1)//2\n \nbef = text[:target]\naft = text[target+1:]\n \nif bef == aft:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s224495087', 's479344346', 's626598852'] | [3060.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0] | [164, 176, 147] |
p02730 | u334703235 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['def kaibun(s):\n flg = False\n if len(s) % 2 == 0:\n if s[0:int((len(s)/2)-1)] == s[int(len(s)/2):len(s)-1:-1]:\n flg =True\n else:\n if s[0:int((len(s)-1)/2-1)] == s[int((len(s)+1)/2):len(s)-1:-1]:\n flg = True\n return flg\n\n\n\ns = input()\nans = "No"\n\n\n\nif kaibun(s):\n if kaibun(s[0:int((len(s)-1)/2-1)]) and kaibun(s[int((len(s)+1)/2):len(s)-1]):\n ans = "Yes"\nprint(ans)', 'def kaibun(s):\n flg = False\n if len(s) % 2 == 0:\n if s[0:int((len(s)/2))] == s[int(len(s)/2):len(s)][::-1]:\n flg =True\n else:\n \n if s[0:int((len(s)-1)/2)] == s[int((len(s)+1)/2):len(s)][::-1]:\n flg = True\n return flg\n\n\n\ns = input()\nans = "No"\n\n\n\nif kaibun(s):\n if kaibun(s[0:int((len(s)-1)/2)]) and kaibun(s[int((len(s)+1)/2):len(s)]):\n ans = "Yes"\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s379182011', 's122363513'] | [3064.0, 3064.0] | [17.0, 17.0] | [422, 425] |
p02730 | u336408262 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["s = input()\nt = s[:int(len(s)/2)]\nif t == s[int(len(s)/2-1)::-1] :\n if t[:int(len(s)/2)] == t[int(len(s)/2-1)::-1] :\n print('yes')\nelse :\n print('no')\n", "s = input()\nt = s[:int(len(s)/2)]\nif t == s[int(len(s)/2-1)::-1] :\n if t[:int(len(s)/2)] == t[int(len(s)/2-1)::-1] :\n print('yes')\nelse :\n print('no')\n", "s = input()\nn1 = int(len(s)/2)\nn2 = int(n1/2)\nt1 = s[:n1]\nt2 = s[::-1][:n1]\nif t1 == t2 and t1[:n2] == t1[::-1][:n2] and t2[:n2] == t2[::-1][:n2] :\n print('Yes')\nelse :\n print('No')\n"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s129025541', 's136029542', 's610546502'] | [2940.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0] | [164, 164, 189] |
p02730 | u337626942 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['S=input()\nN=len(S)\ncnt=0\ncnt1=0\ncnt2=0\nfor i in range (N):\n if S[i]==S[N-1-i]:\n cnt+=1\n \nif cnt==N:\n for j in range((N-1)//2):\n if S[j]==S[(N-1)//2 -1-j]:\n cnt1+=1\n if cnt1==(N-1)//2:\n for k in range((N-1)//2):\n if S[(N+3)//2 -1+k]==S[N-1-k]:\n cnt2+=1\n else:\n print("No")\n\t\texit()\n if cnt2==(N-1)//2:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")', 'S=input()\nN=len(S)\ncnt=0\ncnt1=0\ncnt2=0\nfor i in range (N):\n if S[i]==S[N-1-i]:\n cnt+=1\n\nif cnt==N:\n for j in range((N-1)//2):\n if S[j]==S[(N-1)//2 -1-j]:\n cnt1+=1\n if cnt1==(N-1)//2:\n for k in range((N-1)//2):\n if S[(N+3)//2 -1+k]==S[N-1-k]:\n cnt2+=1\n else:\n print("No")\n exit()\n if cnt2==(N-1)//2:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s926787955', 's688745870'] | [3064.0, 3064.0] | [18.0, 18.0] | [454, 459] |
p02730 | u337751290 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['\ndef main():\n s = input()\n if len(s) % 2 == 0:\n print("No")\n return\n N = int(len(s))\n print(N)\n s1 = s[0:int((N-1)/2)]\n s2 = s[int((N+1)/2):N]\n\n print(s1)\n print(s2)\n\n i = 0\n j = int((N - 1) / 2) - 1\n print(j)\n while True:\n if i > j:\n break\n if s1[i] != s1[j]:\n print("No")\n return\n i += 1\n j -= 1\n\n i = 0\n j = int((N - 1) / 2) - 1\n while True:\n if i > j:\n break\n if s2[i] != s2[j]:\n print("No")\n return\n i += 1\n j -= 1\n\n\n print("Yes")\n return\n\n\nif __name__ == \'__main__\':\n main()', '\ndef main():\n s = input()\n sr = s[::-1]\n\n N = int(len(s))\n s1 = s[:int((N-1)/2)]\n s1r = s1[::-1]\n s2 = s[int((N+1)/2):]\n s2r = s2[::-1]\n\n # print(s1)\n # # print(s1r)\n # # print(s2)\n # # print(s2r)\n # # # return\n\n for i in range(len(s)-1):\n if s[i] != sr[i]:\n print("No")\n return\n\n for i in range(len(s1)-1):\n if s1[i] != s1r[i]:\n print("No")\n return\n\n for i in range(len(s2)-1):\n if s2[i] != s2[i]:\n print("No")\n return\n\n print("Yes")\n\n\nif __name__ == \'__main__\':\n main()'] | ['Wrong Answer', 'Accepted'] | ['s707260359', 's556521345'] | [3188.0, 3064.0] | [18.0, 18.0] | [671, 625] |
p02730 | u346308892 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['\nimport numpy as np\nfrom functools import *\nimport sys\nsys.setrecursionlimit(100000)\n\n\ndef is_kaibun(kaibun):\n for i in range(len(kaibun)//2):\n if kaibun[i] != kaibun[-i-1]:\n return False\n return True\n\n\ns=input()\nN=len(s)\nl=int((N-1)/2 -1)\n#r = int((N+3)/2 +1)\nr=l+2\nprint(s,l,r)\nif is_kaibun(s) and is_kaibun(s[:(l+1)]) and is_kaibun(s[r:]):\n print("Yes")\nelse:\n print("No")\n', '\nimport numpy as np\nfrom functools import *\nimport sys\nsys.setrecursionlimit(100000)\n\n\ndef is_kaibun(kaibun):\n for i in range(len(kaibun)//2):\n if kaibun[i] != kaibun[-i-1]:\n return False\n return True\n\n\ns=input()\nN=len(s)\nl=int((N-1)/2 -1)\n#r = int((N+3)/2 +1)\nr=l+2\n#print(s,l,r)\nif is_kaibun(s) and is_kaibun(s[:(l+1)]) and is_kaibun(s[r:]):\n print("Yes")\nelse:\n print("No")\n\n\n#999999999 999999999\n\n'] | ['Wrong Answer', 'Accepted'] | ['s808841286', 's798202186'] | [12508.0, 12476.0] | [152.0, 153.0] | [406, 431] |
p02730 | u346424924 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['s = input()\nm = (len(s) - 1) / 2\nl = s[:m]\nr = s[(len(s) + 3) / 2 - 1:]\n\n\ndef check(s):\n mid = len(s) // 2\n left = s[:mid]\n right = s[mid+1:]\n if left == right[::-1]:\n return True\n else:\n return False\n\nif check(s) and check(r) and check(l):\n print("Yes")\nelse:\n print("No")\n', 's = input()\nm = (len(s) - 1) // 2\nl = s[:m]\nr = s[(len(s) + 3) // 2 - 1:]\n\n\ndef check(s):\n mid = len(s) // 2\n if len(s) % 2 != 0:\n left = s[:mid]\n right = s[mid+1:]\n else:\n left = s[:mid]\n right = s[mid:]\n if left == right[::-1]:\n return True\n else:\n return False\n\nif check(s) and check(r) and check(l):\n print("Yes")\nelse:\n print("No")\n'] | ['Runtime Error', 'Accepted'] | ['s266511437', 's640834008'] | [3060.0, 3064.0] | [19.0, 19.0] | [309, 400] |
p02730 | u347600233 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["def is_p(s):\n return s == s[::-1]\ns = input()\nn = len(s)\nl, r = (n - 1)//2, l + 1\nprint('Yes' if is_p(s) and is_p(s[:l]) and is_p(s[r:]) else 'No')", "def is_p(s):\n return s == s[::-1]\ns = input()\nl = (len(s) - 1)//2\nr = l + 1\nprint('Yes' if is_p(s) and is_p(s[:l]) and is_p(s[r:]) else 'No')"] | ['Runtime Error', 'Accepted'] | ['s859979840', 's082277012'] | [9032.0, 8928.0] | [27.0, 29.0] | [150, 144] |
p02730 | u350093546 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["s=input()\nn=len(s)\nif s[0]==s[(n-3)/2] and s[(n+1)/2]==s[n-1]:\n print ('Yes')\nelse:\n print('No')", "s=input()\na=s[:len(s)//2]\nb=s[(len(s)//2)+1:]\nif a==b:\n if a==reversed(a) and b==reversed(b):\n print('Yes')\nelse:\n print('No')\n", "s=input()\na=s[:len(s)//2]\nb=s[(len(s)//2)+1:]\nif a==b:\n if a==reversed(a) and b==reversed(b):\n print('Yes')\n else:\n print('No')\nelse:\n print('No')\n", "s=input()\na=s[:len(s)//2]\nb=s[(len(s)//2)+2:]\nif a==a.reverse() and b==b.reverse():\n print('Yes')\nelse:\n print('No')", "s=input()\na=s[:len(s)//2]\nb=s[(len(s)//2)+1:]\nif a==reversed(a) and b==reversed(b):\n print('Yes')\nelse:\n print('No')\n", "s=input()\na=s[:len(s)//2]\nb=s[(len(s)//2)+1:]\nif a!=b:\n print('No')\nelif a==reversed(a) and b==reversed(b):\n print('Yes')\nelse:\n print('No')\n", "s=input()\na=s[:len(s)//2]\nb=s[(len(s)//2)+1:]\nif a==a.reverse() and b==b.reverse():\n print('Yes')\nelse:\n print('No')\n", "s=input()\nans='No'\nif s==s[::-1]:\n t=s[:len(s)//2]\n if t==t[::-1]:\n u=s[len(s)//2+1:]\n if u==u[::-1]:\n ans='Yes'\nprint(ans)"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s059516116', 's205318859', 's237324959', 's289086095', 's414567719', 's705733816', 's889239016', 's865046690'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0, 18.0, 17.0, 17.0, 18.0, 17.0] | [98, 130, 154, 118, 119, 144, 119, 136] |
p02730 | u350667455 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["S = input()\nL=len(S)\nans='No'\nfor i in S:\n if S==S[::-1] and S[:(L-1)/2+1]==S[(L-1)/2+1::-1] and S[L+3/2:]==S[:(L+3/2)-1:-1]:\n ans='Yes'\nprint(ans)", "S = input()\nL=len(S)\nans='No'\nfor i in S:\n if S[:(L-1)/2+1]==S[(L-1)/2+1::-1] and S[L+3/2:]==S[:(L+3/2)-1:-1]:\n ans='Yes'\nprint(ans)", "S = input()\nL=len(S)\nans='No'\n if S[:(L-1)/2]==S[(L-1)/2-1::-1] and S[L+3/2-1:]==S[:(L+3/2)-2:-1]:\n ans='Yes'\nprint(ans)", "S = input()\nL=len(S)\nans='No'\n if S[:(L-1)/2+1]==S[(L-1)/2-1::-1] and S[L+3/2:]==S[:(L+3/2)-2:-1]:\n ans='Yes'\nprint(ans)", "S = input()\nL=len(S)\nans=0\nS1=S[:(L-1)//2]\nS2=S[((L+3)//2)-1:]\nif (S==S[::-1]) & (S1==S1[::-1]) & (S2==S2[::-1]):\n ans='Yes'\nelse:\n ans='No'\nprint(ans)"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s069061386', 's687505822', 's839264615', 's995791895', 's817033001'] | [8968.0, 9040.0, 9016.0, 8992.0, 9108.0] | [26.0, 25.0, 28.0, 25.0, 30.0] | [153, 138, 126, 126, 157] |
p02730 | u351480677 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['c=a[0:int((len(a)-1)/2)]\nb=\'\'.join(list(reversed(a)))\nd=a[int((len(a)+3)/2)-1:]\n \nif a!=b:\n print("No")\nelif c!=d:\n print("No")\nelse:\n print("Yes")', 'a=input()\n#b=reversed(a)\nc=a[0:int((len(a)-1)/2)]\nb=\'\'.join(list(reversed(a)))\nd=a[int((len(a)+3)/2)-1:]\n \nif a!=b:\n print("No")\nelif c!=d:\n print("No")\nelse:\n print("Yes")'] | ['Runtime Error', 'Accepted'] | ['s738256257', 's905264675'] | [3060.0, 3064.0] | [17.0, 17.0] | [150, 175] |
p02730 | u353855427 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['S = input()\nif len(S) < 7:\n\tprint("No")\n\texit()\nfor i in range(len(S)//2):\n\tif S[i] != S[-i-1]:\n\t\tprint("No")\n\t\texit()\nS_front = S[:(len(S)//2)]\nprint(S_front)\nfor i in range(len(S_front)//2):\n\tif S_front[i] != S_front[-i-1]:\n\t\tprint("No")\n\t\texit()\nS_back = S[(len(S)+1)//2:]\nprint(S_back)\nfor i in range(len(S_back)//2):\n\tif S_back[i] != S_back[-i-1]:\n\t\tprint("No")\n\t\texit()\nprint("Yes")', 'S = input()\nfor i in range(len(S)//2):\n\tif S[i] != S[-i-1]:\n\t\tprint("No")\n\t\texit()\nS_front = S[:(len(S)//2)]\nfor i in range(len(S_front)//2):\n\tif S_front[i] != S_front[-i-1]:\n\t\tprint("No")\n\t\texit()\nS_back = S[(len(S)+1)//2:]\nfor i in range(len(S_back)//2):\n\tif S_back[i] != S_back[-i-1]:\n\t\tprint("No")\n\t\texit()\nprint("Yes")'] | ['Wrong Answer', 'Accepted'] | ['s361559169', 's489171736'] | [3064.0, 3064.0] | [18.0, 17.0] | [388, 323] |
p02730 | u357120030 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['S = input()\nS2 = S[:(len(S)-1)//2]\nS3 = S[(len(S)+3)//2-1:]\nprint(S2, S3)\nprint("Yes" if S == S[::-1] and S2 == S2[::-1] and S3 == S3[::-1] else "No")', 'S = input()\nS2 = S[:(len(S)-1)//2]\nS3 = S[(len(S)+3)//2-1:]\nprint("Yes" if S == S[::-1] and S2 == S2[::-1] and S3 == S3[::-1] else "No")'] | ['Wrong Answer', 'Accepted'] | ['s518267624', 's662554017'] | [9052.0, 9000.0] | [26.0, 27.0] | [150, 136] |
p02730 | u357751375 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["s = list(input())\nj = -1\n\nfor i in range(len() // 2):\n if s[i] != s[j]:\n print('No')\n exit(0)\n\n j -= 1\n\nprint('Yes')\n", "s = list(input())\nl = len(s)\nj = -1\n\nfor i in range(l // 2):\n if s[i] != s[j]:\n print('No')\n exit(0)\n j -= 1\n\nh = (l + 3) // 2 - 1\nj = h // 2\n\nfor h in range(l):\n if s[h] != s[j]:\n print('No')\n exit(0)\n j -= 1\n \nprint('Yes')", "s = list(input()) \nl = len(s) # l = 29\nj = l - 1 # j = 28\n\nfor i in range(l // 2):\n if s[i] != s[j]:\n print('No')\n exit(0)\n j -= 1\n\n\nh = (l + 3) // 2 - 1 # h = 15\nj = h - 2\n\nfor h in range(l // 2):\n if s[h] != s[j]:\n print('No')\n exit(0)\n j -= 1\n\nprint('Yes')"] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s066180712', 's445906169', 's338270430'] | [2940.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0] | [137, 267, 299] |
p02730 | u362031378 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["def is_kaibun(kaibun):\n for i in range(len(kaibun)//2):\n if kaibun[i] != kaibun[-i-1]:\n return False\n return True\n\ns=input()\nprint(s)\nn=(len(s))\nleft=s[0:(n-1)//2]\nright=s[((n+3)//2-1):]\nif left!=right:\n print('No')\nif is_kaibun(s):\n if is_kaibun(left):\n if is_kaibun(right):\n print('Yes')\n else:\n print('No')\n else:\n print('No')\nelse:\n print('No') \n \n \n \n\n\n\n \n \n \n\n \n\n ", "def is_kaibun(kaibun):\n for i in range(len(kaibun)//2):\n if kaibun[i] != kaibun[-i-1]:\n return False\n return True\n\ns=input()\nn=(len(s))\nleft=s[0:(n-1)//2]\nright=s[((n+3)//2-1):]\n\nif is_kaibun(s):\n if is_kaibun(left):\n if is_kaibun(right):\n print('Yes')\n else:\n print('No')\n else:\n print('No')\nelse:\n print('No') \n "] | ['Wrong Answer', 'Accepted'] | ['s960797688', 's748744106'] | [3064.0, 3064.0] | [17.0, 17.0] | [437, 369] |
p02730 | u362563655 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['s = list(input())\nN = len(s)\nfor i in range(N-1):\n if s[i]=s[N-1-i] and s[i]=s[(N-1)/2-1-i] and s[(N+3)/2-1+i]=s[N-1-i]:\n print("Yes")\n else:\n print("No")', 's = list(input())\nN = len(s)\nc=0\nfor i in range(N-1):\n if s[i] != s[N-1-i]:\n c+=1\n\nfor i in range(N-1):\n if s[i] != s[(N-1)/2-1-i]:\n c+=1\n \nfor i in range(N-1):\n if s[(N+3)/2-1+i] != s[N-1-i]:\n c+=1\n\nif c == 0:\n print("Yes")\nelse:\n print("No")\n', 's = list(input())\nN = len(s)\nc=0\nfor i in range(N-1):\n if s[i]=s[N-1-i] and s[i]=s[(N-1)/2-1-i] and s[(N+3)/2-1+i]=s[N-1-i]:\n c+=1\n \nif c == N:\n print("Yes")\nelse:\n print("No")', 's = list(input())\nn = (len(s)+1)//2\nm = n//2\n if s[:n-1] == s[len(s):n-1:-1] and s[:m-1] == s[n-2:m-1:-1]:\n print("Yes")\n else:\n print("No")', 's = input()\nN = len(s)\nc=0\nfor i in range(N-1):\n if s[i]==s[N-1-i] and s[i]==s[(N-1)/2-1-i] and s[(N+3)/2-1+i]==s[N-1-i]:\n c+=1\n \nif c == N:\n print("Yes")\nelse:\n print("No")\n', 's = list(input())\nN = len(s)\nc=0\nfor i in range(N-1):\n if s[i]==s[N-1-i] and s[i]==s[(N-1)/2-1-i] and s[(N+3)/2-1+i]==s[N-1-i]:\n c+=1\n \nif c == N:\n print("Yes")\nelse:\n print("No")\n', 's = list(input())\nn = (len(s)+1)//2\nif s[:n-1] == s[len(s):n-1:-1] == s[n-2::-1]:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s036285084', 's091744244', 's148624890', 's344330382', 's511499486', 's683326158', 's335118121'] | [2940.0, 3060.0, 2940.0, 2940.0, 3064.0, 3060.0, 3060.0] | [17.0, 18.0, 17.0, 17.0, 17.0, 19.0, 21.0] | [162, 261, 185, 148, 183, 189, 116] |
p02730 | u366886346 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['s=input()\nn=len(s)\na=int(n/2)\ns1a=s[0:a]\ns2a=s[n-a:n]\ns2=s[::-1]\ns1b=s1a[::-1]\ns2b=s2a[::-1]\nprint(s,s2,s1a,s1b,s2a,s2b)\nif s==s2 and s1a==s1b and s2a==s2b:\n\tprint("Yes")\nelse:\n\tprint("No")\n', 's=input()\nn=len(s)\na=int(n/2)\ns1a=s[0:a]\ns2a=s[n-a:n]\ns2=s[::-1]\ns1b=s1a[::-1]\ns2b=s2a[::-1]\nif s==s2 and s1a==s1b and s2a==s2b:\n\tprint("Yes")\nelse:\n\tprint("No")\n'] | ['Wrong Answer', 'Accepted'] | ['s572975724', 's471968980'] | [3060.0, 3060.0] | [17.0, 17.0] | [190, 162] |
p02730 | u367575195 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['S=input()\nL=len(S)\ncount=0\nfor i in range(L//2):\n\tprint(S[i],S[-i-1])\n\tif S[i] == S[-i-1]:\n\t\tcount+=1\n\telse:\n\t\tprint("No")\n\t\texit()\n\nSa=S[:(L-1)//2]\nSb=S[(L+3)//2-1:(L+1)]\nLa=len(Sa)\nLb=len(Sb)\n\nfor j in range(La//2):\n\tprint(Sa[j],Sa[-j-1])\n\tif Sa[j] == Sa[-j-1]:\n\t\tcount+=1\n\telse:\n\t\tprint("No")\n\t\texit()\n \nfor k in range(Lb//2):\n\tif Sb[k] == Sb[-k-1]:\n\t\tcount+=1\n\telse:\n\t\tprint("No")\n\t\texit()\nprint("Yes")', 'S=input()\nL=len(S)\ncount=0\nfor i in range(L//2):\n\tif S[i] == S[-i-1]:\n\t\tcount+=1\n\telse:\n\t\tprint("No")\n\t\texit()\n\nSa=S[:(L-1)//2]\nSb=S[(L+3)//2-1:(L+1)]\nLa=len(Sa)\nLb=len(Sb)\n\nfor j in range(La//2):\n\tif Sa[j] == Sa[-j-1]:\n\t\tcount+=1\n\telse:\n\t\tprint("No")\n\t\texit()\n \nfor k in range(Lb//2):\n\tif Sb[k] == Sb[-k-1]:\n\t\tcount+=1\n\telse:\n\t\tprint("No")\n\t\texit()\nprint("Yes")'] | ['Wrong Answer', 'Accepted'] | ['s778461869', 's374034389'] | [3192.0, 3064.0] | [18.0, 18.0] | [413, 369] |
p02730 | u370721525 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["S = input()\n\nnum = len(S)\nS1 = S[:(num-1)/2]\nS2 = S[(num+3)/2:]\n\nif S == S[::-1] and S1 == [::-1] and S2 == [::-1]:\n print('Yes')\nelse:\n print('No')", "S = input()\n\nnum = len(S)\nS1 = S[:(num-1)//2]\nS2 = S[(num+1)//2:]\n\nif S == S[::-1] and S1 == S1[::-1] and S2 == S2[::-1]:\n print('Yes')\nelse:\n print('No')\n\nprint(S, S1, S2)", "S = input()\n\nnum = len(S)\nS1 = S[:(num-1)/2]\nS2 = S[(num+3)/2:]\n\nif S == S[::-1] and S1 == S1[::-1] and S2 == S2[::-1]:\n print('Yes')\nelse:\n print('No')", "S = input()\n\nnum = len(S)\nS1 = S[:(num-1)//2]\nS2 = S[(num+3)//2:]\n\nif S == S[::-1] and S1 == S1[::-1] and S2 == S2[::-1]:\n print('Yes')\nelse:\n print('No')", "S = input()\n\nnum = len(S)\nS1 = S[:(num-1)//2]\nS2 = S[(num+1)//2:]\n\nif S == S[::-1] and S1 == S1[::-1] and S2 == S2[::-1]:\n print('Yes')\nelse:\n print('No')\n"] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s054958008', 's143538174', 's295802821', 's943647175', 's361323997'] | [2940.0, 3060.0, 3060.0, 3060.0, 2940.0] | [17.0, 17.0, 18.0, 17.0, 18.0] | [150, 174, 154, 156, 157] |
p02730 | u370723637 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["s = input()\nn = len(s)\n\ns_list = list(s)\nr_list = list(s)\nr_list.reverse()\n\nfirst_s_list = s_list[0:(n - 1) // 2]\nfirst_r_list = list(reversed(first_s_list))\n\nlast_s_list = s_list[(n + 2) // 2:n]\nlast_r_list = list(reversed(last_s_list))\n\nif s_list == r_list and first_s_list == first_r_list and last_s_list == last_r_list:\n print('Yes')\nelse:\n print('No')\n\n\nprint(first_s_list, first_r_list)\nprint(last_s_list, last_r_list)\n", "s = input()\nn = len(s)\n\ns_list = list(s)\nr_list = list(s)\nr_list.reverse()\n\nfirst_s_list = s_list[0:(n - 1) // 2]\nfirst_r_list = reversed(first_s_list)\n\nlast_s_list = s_list[(n + 3) // 2:n]\nlast_r_list = reversed(last_s_list)\n\nif s_list == r_list and first_s_list == first_r_list and last_s_list == last_r_list:\n print('Yes')\nelse:\n print('No')", "s = input()\nn = len(s)\n\ns_list = list(s)\nr_list = list(s)\nr_list.reverse()\n\nfirst_s_list = s_list[0:(n - 1) // 2]\nfirst_r_list = list(reversed(first_s_list))\n\nlast_s_list = s_list[(n - 1) // 2 + 1:n]\nlast_r_list = list(reversed(last_s_list))\n\nif s_list == r_list and first_s_list == first_r_list and last_s_list == last_r_list:\n print('Yes')\nelse:\n print('No')\n\nprint(s, n)\nprint(first_s_list, first_r_list)\nprint(last_s_list, last_r_list)", "s = input()\nn = len(s)\n\ns_list = list(s)\nr_list = list(s)\nr_list.reverse()\n\nfirst_s_list = s_list[0:(n - 1) // 2]\nfirst_r_list = list(reversed(first_s_list))\n\nlast_s_list = s_list[(n - 1) // 2 + 1:n]\nlast_r_list = list(reversed(last_s_list))\n\nif s_list == r_list and first_s_list == first_r_list and last_s_list == last_r_list:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s532962360', 's780537526', 's808363947', 's576349815'] | [3060.0, 3064.0, 3064.0, 3064.0] | [17.0, 18.0, 18.0, 17.0] | [431, 350, 445, 366] |
p02730 | u371435984 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['s = input()\n\ndef palind(word):\n l = len(word)\n i=0\n j=l-1 \n while i <= j:\n if word[i] != word[j]:\n return False\n i += 1\n j -= 1\n return True\n\nn = len(s)\n\nif palind(s) and palind(s[:(((n-1)//2))]) and palind(s[(((n+3)//2)-1):]):\n print("YES")\nelse:\n print("NO")', 's = input()\n\ndef palind(word):\n l = len(word)\n i=0\n j=l-1 \n while i <= j:\n if word[i] != word[j]:\n return False\n i += 1\n j -= 1\n return True\n\nn = len(s)\n\nif palind(s) and palind(s[:(((n-1)//2))]) and palind(s[(((n+3)//2)-1):]):\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s038416377', 's426476385'] | [3064.0, 3064.0] | [19.0, 17.0] | [313, 313] |
p02730 | u372670441 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['N=list(str(input()))\na=len(N)\nif N[0]==N[(a-1)/2] and N[a]==N[(a+3)/2]:\n print("yes")\nelse:\n print("No")', 'S=list(map(str,input()))\nif S[0]==S[int((len(S)-1)/2-1)] and S[:int((len(S)-1)/2)]==S[int((len(S)+1)/2):]:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s199272314', 's093728429'] | [2940.0, 3060.0] | [17.0, 17.0] | [106, 145] |
p02730 | u374146618 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['s = input()\n\nN = len(s)\nif s==s[::-1] and s[:(N-1)//2]==s[:(N-1)//2][::-1] \\\n and s[(N+3)//2:N]==s[(N+3)//2:N][::-1]:\n print("Yes")\nelse:\n print("No")', 's = input()\n\nN = len(s)\nif s==s[::-1] and s[:(N-1)//2]==s[:(N-1)//2][::-1] \\\n and s[(N+3)//2-1:]==s[(N+3)//2-1:][::-1]:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s029276970', 's754665468'] | [3060.0, 3060.0] | [18.0, 18.0] | [183, 185] |
p02730 | u375193358 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["\ndef kaibuncheck(S):\n N=len(S)\n N_val=N-1\n center=int((N-1)/2)\n checkpoint=0\n for i in range(center-1):\n if S[i] == S[N_val]:\n checkpoint+=1\n N_val -= 1\n\n if checkpoint == center-1:\n return 1\n else:\n return 0\n\nS = list(input())\nN = len(S)\nN2 = int((N-1)/2)\n\nS_start=list()\nS_end=list()\nfor i in range(N2):\n S_start.append(S[i])\n S_end.append(S[N-1-i])\n\nprint(S_start)\nprint(S_end)\n\nif kaibuncheck(S) == 1 and kaibuncheck(S_start) == 1 and kaibuncheck(S_end) == 1:\n print('Yes')\nelse:\n print('No')\n", "\ndef kaibuncheck(S):\n N=len(S)\n if N == 1:\n return 1\n\n N_val=N-1\n center=int((N-1)/2)\n checkpoint=0\n if N == 1:\n return 1\n for i in range(center-1):\n if S[i] == S[N_val]:\n checkpoint+=1\n N_val -= 1\n\n if checkpoint == center-1:\n return 1\n else:\n return 0\n\nS = list(input())\nN = len(S)\nN2 = int((N-1)/2)\n\nS_start=list()\nS_end=list()\nfor i in range(N2):\n S_start.append(S[i])\n S_end.append(S[N2+1+i])\n\nif N%2 == 1:\n if kaibuncheck(S) == 1 and kaibuncheck(S_start) == 1 and kaibuncheck(S_end) == 1:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s979305389', 's108419282'] | [3064.0, 3064.0] | [18.0, 17.0] | [597, 685] |
p02730 | u377834804 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["def is_kaibun(st):\n f = True\n for x,y in zip(st, st[::-1]):\n if x != y:\n f = False\n break\n return f\n\nS = input()\nans = False\nif is_kaibun(S):\n if is_kaibun(S[:(len(S)-1)/2+1]):\n ans = is_kaibun(S[(len(S)+3)/2+1])\nif ans:\n print('Yes')\nelse:\n print('No')\n ", "def is_kaibun(st):\n f = True\n for x,y in zip(st, st[::-1]):\n if x != y:\n f = False\n break\n return f\n \nS = input()\nans = False\nif is_kaibun(S):\n if is_kaibun(S[:(len(S)-1)//2]):\n ans = is_kaibun(S[(len(S)+3)//2-1:])\nif ans:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s317826902', 's909653271'] | [9044.0, 9148.0] | [28.0, 32.0] | [278, 277] |
p02730 | u378299699 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['S = input()\nN = len(S)\n\n\nsubS = S[:int((N - 1) / 2)]\nprint(subS)\nif S[int((N + 3) / 2) - 1:] == subS:\n print("Yes")\nelse:\n print("No")\n', 'S = input()\nN = len(S)\n\n\nsubS1 = S[:int((N - 1) / 2)]\nsubS2 = S[int((N + 3) / 2) - 1:]\n\nif subS1 == subS1[::-1] and subS2 == subS2[::-1] and S == S[::-1]:\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Accepted'] | ['s426144780', 's009485370'] | [8912.0, 8960.0] | [30.0, 29.0] | [141, 194] |
p02730 | u382407432 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['S=input()\nT=S[:N//2]\nU=S[N//2+1:]\nN=len(S)\nflg=0\nfor i in range(int((N-1)/2)):\n if(S[i]!=S[-i]):\n break\n flg+=1\n\nfor j in range(len(T)//2):\n if(T[j]!=T[-j]):\n break\n flg+=1\n\nfor k in range(len(U)//2):\n if(U[k]!=U[-k]):\n break\n flg+=1\n\nif(flg==3):\n print("Yes")\nelse:\n print("No")', 'S=input()\nT=S[:N//2]\nU=S[N//2+1:]\nN=len(S)\nflg=0\n\nfor i in range(int((N-1)/2)):\n if(S[i]!=S[-i-1]):\n print(S[i],S[-i])\n flg=1\n break\n \nfor j in range(len(T)//2):\n if(T[j]!=T[-j-1]):\n flg=1\n break\n \nfor k in range(len(U)//2):\n if(U[k]!=U[-k-1]):\n flg=1\n break\n\nif(flg==0):\n print("Yes")\nelse:\n print("No")', 'S=input()\nN=len(S)\nT=S[:N//2]\nU=S[N//2+1:]\n\nflg=0\n\nfor i in range(int((N-1)/2)):\n if(S[i]!=S[-i-1]):\n flg=1\n break\n \nfor j in range(len(T)//2):\n if(T[j]!=T[-j-1]):\n flg=1\n break\n \nfor k in range(len(U)//2):\n if(U[k]!=U[-k-1]):\n flg=1\n break\n\nif(flg==0):\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s670427261', 's844175187', 's247697587'] | [3064.0, 3064.0, 3064.0] | [18.0, 18.0, 18.0] | [296, 332, 311] |
p02730 | u382639013 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['S = input()\nN = len(S)\n\npre = S[0 : int((N-1)/2)]\nprint(pre)\nbck = S[int((N+1)/2) : N]\nprint(bck)\n\nif S == S[::-1] and pre == pre[::-1] and bck == bck[::-1]:\n print("Yes")\nelse:\n print("No")', 'S = input()\nN = len(S)\n\npre = S[0 : int((N-1)/2)]\n\nbck = S[int((N+1)/2) : N]\n\nif S == S[::-1] and pre == pre[::-1] and bck == bck[::-1]:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s393914460', 's537118344'] | [3060.0, 3060.0] | [17.0, 18.0] | [196, 175] |
p02730 | u391066416 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['S=input()\nfor i in range(len(S)//4):\n print(i)\n if not S[i]==S[-i-len(S)//2-2]==S[i+len(S)//2+1]==S[-i-1]:\n exit()\nprint("Yes")', 'S=input()\nc=len(S)//2\nprint("Yes" if S[:c]==S[c+1:] else "No")'] | ['Wrong Answer', 'Accepted'] | ['s024208678', 's309030719'] | [2940.0, 2940.0] | [18.0, 17.0] | [140, 62] |
p02730 | u394950523 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['S = input()\nN = len(S) \nans = ""\nfor i in range(N):\n if S[0 + i] == S[(N - 1) - i]:\n ans = "Yes"\n if S[0 + i] == S[((N - 1) // 2) - 1 - i]:\n ans = "Yes"\n else:\n ans = "No"\n break\n if S[((N + 3) // 2) - 1 - i] == S[(N - 1) - i]:\n ans = "Yes"\n else:\n ans = "No"\n break\n else:\n ans = "No"\n break\nprint(ans)', 'S = input()\nN = len(S)\na = S[0:N//2]\nb = S[N//2+1:N]\nif S == S[::-1] and a == a[::-1] and b == b[::-1]:\n ans = "Yes"\nelse:\n ans = "No"\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s918338321', 's928495989'] | [3064.0, 3060.0] | [17.0, 18.0] | [475, 151] |
p02730 | u395894569 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["s=input()\nn=len(s)+1\na=s[0:int((n-1)/2)]\nb=s[int((n+3)/2)-1:n-1]\nprint(a,b)\nif a==b:\n print('Yes')\nelse:\n print('No')", "s=input()\nn=len(s)+1\na=s[0:int((n-1)/2)]\nb=s[int((n+3)/2)-1:n-1]\nif a==b:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s870300481', 's173938984'] | [3064.0, 2940.0] | [18.0, 17.0] | [119, 108] |
p02730 | u396858476 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['n, m = map(int, input().split())\na = list(input().split())\n\nfor i in range(len(a)):\n n = n - int(a[i])\n\nif n >= 0:\n print(n)\nelse:\n print(-1)\n', 's = str(input())\n\ndef check(text):\n n = len(text)\n if n == 1:\n return True\n\n left = int((n-1)/2)\n right = int((n+3)/2 - 1)\n\n print(text[0:left], text[right:n])\n if len(text[0:left]) == len(text[right:n]):\n if text[0:left] == text[right:n] and check(text[0:left]):\n return True\n else:\n if text[0:left] == text[right+1:n] and check(text[0:left]):\n return True\n return False\n\nif check(s):\n print("Yes")\nelse:\n print("No")\n', 's = str(input())\n\ndef check(text):\n n = len(text)\n if n == 1:\n return True\n\n left = int((n-1)/2)\n right = int((n+3)/2 - 1)\n\n print(text[0:left], text[right:n])\n if len(text[0:left]) == len(text[right:n]):\n if text[0:left] == text[right:n] and check(text[0:left]):\n return True\n else:\n if text[0:left] == text[right+1:n] and check(text[0:left]):\n return True\n return False\n\nif check(s):\n print("Yes")\nelse:\n print("No")\n', 'def isKaibun(str):\n for i in range(len(str)):\n if str[i] != str[len(str)-i-1]:\n return False\n return True\n\ns = input()\n\nif not isKaibun(s):\n print("No")\nelif not isKaibun(s[0:int((len(s) - 1) / 2)]):\n print("No")\nelif not isKaibun(s[int((len(s) + 3) / 2)-1:len(s)]):\n print("No")\nelse:\n print("Yes")\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s593652275', 's847979465', 's981847683', 's017478111'] | [2940.0, 4084.0, 4084.0, 3060.0] | [17.0, 80.0, 74.0, 17.0] | [151, 492, 492, 336] |
p02730 | u399973890 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["S = list(input())\nN = len(S)\nprint((N-1)/2)\nif S[:int((N-1)/2)] == list(reversed(S[:int((N-1)/2)])) and S[int((N+1)/2):] == list(reversed(S[int((N+1)/2):])):\n print('Yes')\nelse:\n print('No')", "S = list(input())\nN = len(S)\nif S[:int((N-1)/2)] == list(reversed(S[:int((N-1)/2)]))\\\n and S[int((N+1)/2):] == list(reversed(S[int((N+1)/2):]))\\\n and S == list(reversed(S)):\n\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s510499576', 's961379120'] | [3060.0, 3060.0] | [17.0, 17.0] | [196, 219] |
p02730 | u404789658 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['S = input()\nl = len(S)\n\ncount = 0\nharf = int(l/2)\na = S[:harf]\nb = S[harf+1:][::-1]\n\nprint(a,b)\n\nif a == b :\n count+=1\n\nl = int((l-1)/2)\na = S[:l]\nl1_harf = int(len(a)/2)\na1 = a[:l1_harf]\na2 = a[l1_harf+1:][::-1]\n\nprint(a,a1,a2)\n\nif a1==a2:\n count+=1\n\nl2 = int((l+3)/2)+1\nb = S[:l2]\nl2_harf = int(len(b)/2)\nb1 = b[:l2_harf]\nb2 = b[l2_harf+1:][::-1]\n\nprint(b,b1,b2)\n\nif b1 == b2:\n count += 1\n\nif count == 3:\n print("Yes")\nelse:\n print("No")', 'S = input()\nl = len(S)\n\ncount = 0\nharf = int(l/2)\na = S[:harf]\nb = S[harf+1:][::-1]\n\nprint(a,b)\n\nif a == b :\n count+=1\n\nl = int((l-1)/2)\na = S[:l]\nl1_harf = int(len(a)/2)\na1 = a[:l1_harf]\na2 = a[l1_harf+1:][::-1]\n\nprint(a,a1,a2)\n\nif a1==a2:\n count+=1\n\nl2 = int((l+3)/2)\nb = S[l2:l]\nl2_harf = int(len(b)/2)\nb1 = b[:l2_harf-1]\nb2 = b[l2_harf+1:][::-1]\n\nprint(l2,l2_harf,b,b1,b2)\n\nif b1 == b2:\n count += 1\n\nif count == 3:\n print("Yes")\nelse:\n print("No")', 'def kaibun(S):\n N = len(S)\n harf = int(N / 2)\n if harf != 0:\n a = S[:harf]\n b = S[-harf:][::-1]\n else:\n a = S[:1]\n b = S[-1:][::-1]\n return a,b\n\nS = input()\nflag = 0\na,b = kaibun(S)\nif a == b:\n a1,a2 = kaibun(a)\n if a1 == a2:\n b1,b2 = kaibun(b)\n if b1 == b2:\n flag = 0\n else:\n flag = 1\n else:\n flag = 1\nelse:\n flag = 1\n\nif flag == 0:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s328840567', 's400549172', 's444687316'] | [3064.0, 3064.0, 3064.0] | [17.0, 18.0, 17.0] | [454, 466, 477] |
p02730 | u405483159 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['s = input()\n\ndef is_palindrome( s ):\n for i in range( len( s ) // 2 ):\n if s[i] != s[-i-1]:\n return False\n return True\n\nret = is_palindrome( s ) \nret &= is_palindrome( s[:(len(s)-1)//2 ] ) \nret &= is_palindrome( s[ (len(s)+3)//2-1: ] )\nprint( ret )', "s = input()\n \ndef is_palindrome( s ):\n for i in range( len( s ) // 2 ):\n if s[i] != s[-i-1]:\n return False\n return True\n \nret = is_palindrome( s ) \nret &= is_palindrome( s[:(len(s)-1)//2 ] ) \nret &= is_palindrome( s[ (len(s)+3)//2-1: ] )\nif ret:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s545047238', 's924444337'] | [3060.0, 3064.0] | [18.0, 17.0] | [258, 290] |
p02730 | u405660020 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["s=input()\nn=len(s)\ns1=s[:(n-1)//2]\ns2=s[(n+3)//2-1:]\nprint(s1,s2)\nif s==s[::1] and s1==s1[::-1] and s2==s2[::-1]:\n print('Yes')\nelse:\n print('No')", "s=input()\nn=len(s)\ns1=s[:(n-1)//2]\ns2=s[(n+3)-1//2:]\nprint(s1,s2)\nif s==s[::1] and s1==s1[::-1] and s2==s2[::-1]:\n print('Yes')\nelse:\n print('No')", "s=input()\nn=len(s)\ns1=s[:(n-1)//2]\ns2=s[(n-1)//2+1:]\n\nif s==s[::-1] and s1==s1[::-1] and s2==s2[::-1]:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s133536455', 's204940532', 's246637426'] | [3060.0, 3060.0, 3064.0] | [17.0, 17.0, 18.0] | [152, 152, 141] |
p02730 | u407512888 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['a = input()\ndef p(s,n):\n for i in range(n//2):\n if s[i] != s[-(i+1)]:\n return 0\n return 1\nr = len(a)\nprint(a[(r+3)//2-1:],r-(r+3)//2+1)\nif p(a,r) == 1 and p(a[:((r-1)//2)],(r-1)//2) == 1 and p(a[(r+3)//2-1:],r-(r+3)//2+1)== 1:\n print("Yes")\nelse:\n print("No")\n \n', 'a = input()\ndef p(s,n):\n for i in range(n//2):\n if s[i] != s[-(i+1)]:\n return 0\n return 1\nr = len(a)\nif p(a,r) == 1 and p(a[:((r-1)//2)],(r-1)//2) == 1 and p(a[(r+3)//2-1:],r-(r+3)//2+1)== 1:\n print("Yes")\nelse:\n print("No")\n \n'] | ['Wrong Answer', 'Accepted'] | ['s976391157', 's884895855'] | [3060.0, 3060.0] | [17.0, 17.0] | [295, 260] |
p02730 | u408692629 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["\ndef ispalindrome(s):\n h = len(s)\n if (h % 2) == 0:\n h = int(h/2)\n for a, b in zip(s[:h], reversed(s[h:])):\n if a != b: return 0\n else:\n h = int(h/2)\n for a, b in zip(s[:h], reversed(s[h+1:])):\n if a != b: return 0\n return 1\n\nstr_in = input()\nN = len(str_in)\nresult = ispalindrome(str_in)\n\nif result == 0:\n print('No')\nelse:\n str_half = str_in[:int((N-1)/2)]\n result &= ispalindrome(str_half)\n\n if result == 0:\n print('No')\n else:\n str_half = str_in[int((N+3)/2):]\n result &= ispalindrome(str_half)\n\n if result == 0:\n print('No')\n else:\n print('Yes')\n", "\ndef ispalindrome(s):\n h = len(s)\n if (h % 2) == 0:\n h = int(h/2)\n for a, b in zip(s[:h], reversed(s[h:])):\n if a != b: return 0\n else:\n h = int(h/2)\n for a, b in zip(s[:h], reversed(s[h+1:])):\n if a != b: return 0\n return 1\n\nstr_in = input()\nN = len(str_in)\nresult = ispalindrome(str_in)\n\nif result == 0:\n print('No')\nelse:\n if N == 3:\n print('Yes')\n else:\n str_half = str_in[:int((N-1)/2)]\n result &= ispalindrome(str_half)\n\n if result == 0:\n print('No')\n else:\n str_half = str_in[int(((N+3)/2)-1):]\n result &= ispalindrome(str_half)\n\n if result == 0:\n print('No')\n else:\n print('Yes')\n"] | ['Wrong Answer', 'Accepted'] | ['s211521886', 's362380314'] | [3064.0, 3064.0] | [18.0, 17.0] | [683, 779] |
p02730 | u411302151 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['def palindrome(s):\n return s == reversed(s)\n\nS = input()\nN = len(S)\n\nprint("Yes" if palindrome(S[:(N-1)//2]) and palindrome(S[(N+3)//2 - 1:]) else "No")', 'def palindrome(s):\n return s == "".join(list(reversed(s)))\n\nS = input()\nN = len(S)\n\ns1 = S[:(N-1)//2]\ns2 = S[(N+3)//2 -1:]\nprint("Yes" if palindrome(s1) and palindrome(s2) and palindrome(S) else "No")'] | ['Wrong Answer', 'Accepted'] | ['s276270955', 's297037686'] | [2940.0, 3060.0] | [17.0, 17.0] | [155, 203] |
p02730 | u411858517 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["s = input()\n\nans = 'Yes'\n\nif s != s[::-1]:\n ans = 'No'\n \nif s[:(len(s) - 1)//2] != s[(len(s) - 1)//2:]:\n ans = 'No'\n \nif s[:(len(s) + 3)//2] != s[(len(s) + 1)//2:]:\n ans = 'No'\n \n \nprint(ans)", "s = input()\n\nans = 'Yes'\n\nif s != s[::-1]:\n ans = 'No'\n \nif s[:(len(s) - 1)//2] != s[(len(s) - 1)//2::-1]:\n ans = 'No'\n \nif s[:(len(s) + 3)//2] != s[(len(s) + 3)//2::-1]:\n ans = 'No'\n \n \nprint(ans)\n", "s = input()\n\nans = 'Yes'\n\nif s != s[::-1]:\n ans = 'No'\n \nif s[:(len(s) - 1)//2] != s[(len(s) - 1)//2:]:\n ans = 'No'\n \nif s[:(len(s) + 3)//2] != s[(len(s) + 3)//2:]:\n ans = 'No'\n \n \nprint(ans)\n", "s = input()\n\nans = 'Yes'\nif s != s[::-1]:\n ans ='No'\n\ntmp = s[:(len(s)- 1) // 2]\nif tmp != tmp[::-1]:\n ans = 'No'\n\ntmp = s[(len(s)+3) //2 - 1:]\nif tmp != tmp[::-1]:\n ans = 'No'\n\nprint(ans)"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s091167513', 's471148752', 's971646116', 's123228242'] | [3060.0, 2940.0, 2940.0, 3060.0] | [17.0, 18.0, 18.0, 17.0] | [198, 205, 199, 191] |
p02730 | u412139296 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["S = input()\n\n#initialize\nIsKaibun = 'NO'\n\nN = len(S)\n\ndef check_kaibun( mojiretu ):\n names = len(mojiretu)\n IsKaibunLocal = 'YES'\n for name in range((names + 1) // 2):\n if mojiretu[name] != mojiretu[names - 1 - name]:\n IsKaibunLocal = 'NO'\n\n return IsKaibunLocal\n\n\nif N%2 != 1 and N < 3 and N > 99 :\n PRE_CHECK = 1\n\n\nIsKaibun = check_kaibun(S)\n\n#2nd check\nif IsKaibun == 'YES':\n IsKaibun = check_kaibun(S[ 0 : int((N-1)/2) ])\n\n\nif IsKaibun == 'YES':\n IsKaibun = check_kaibun(S[ int((N+3)/2 - 1) : N ])\n\n#output\nprint(IsKaibun)\n", 'S = input()\n\n#initialize\nIsKaibun = 0\n\nN = len(S)\n\ndef check_kaibun( mojiretu ):\n names = len(mojiretu)\n for name in range((names + 1) // 2):\n if mojiretu[name] != mojiretu[names - 1 - name]:\n IsKaibun = 0\n break\n IsKaibun = 1\n return IsKaibun\n\n\nif N%2 != 1 and N < 3 and N > 99 :\n PRE_CHECK = 1\n\n\ncheck_kaibun(S)\n#print(IsKaibun)\n\n#2nd check\n#print(S[ 0 : int((N-1)/2) ])\ncheck_kaibun(S[ 0 : int((N-1)/2) ])\n#print(IsKaibun)\n\n\ncheck_kaibun(S[ int((N+3)/2) : N ])\n\n#output\nprint(IsKaibun)\n', "S = input()\n\n#initialize\nIsKaibun = 'No'\n\nN = len(S)\n\ndef check_kaibun( mojiretu ):\n names = len(mojiretu)\n IsKaibunLocal = 'Yes'\n for name in range((names + 1) // 2):\n if mojiretu[name] != mojiretu[names - 1 - name]:\n IsKaibunLocal = 'No'\n\n return IsKaibunLocal\n\n\nif N%2 != 1 and N < 3 and N > 99 :\n PRE_CHECK = 1\n\n\nIsKaibun = check_kaibun(S)\n\n#2nd check\nif IsKaibun == 'Yes':\n IsKaibun = check_kaibun(S[ 0 : int((N-1)/2) ])\n\n\nif IsKaibun == 'Yes':\n IsKaibun = check_kaibun(S[ int((N+3)/2 - 1) : N ])\n\n#output\nprint(IsKaibun)\n"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s556891371', 's697985797', 's713770630'] | [3064.0, 3064.0, 3064.0] | [17.0, 18.0, 18.0] | [598, 564, 598] |
p02730 | u412760429 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['s = input()\nn = len(s)\ns1 = s[:(n - 1) // 2]\ns2 = s[(n + 2) // 2:]\nprint(s == s[::-1] and s1 == s1[::-1] and s2 == s2[::-1])\n', 's = input()\nn = len(s)\ns1 = s[:(n - 1) // 2]\ns2 = s[(n + 2) // 2:]\nprint("Yes" if s == s[::-1] and s1 == s1[::-1] and s2 == s2[::-1] else "No")\n'] | ['Wrong Answer', 'Accepted'] | ['s954541631', 's805561025'] | [2940.0, 2940.0] | [18.0, 17.0] | [125, 144] |
p02730 | u419246138 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['a = input()\nb = ""\ni = len(a)\nwhile i>0:\n i -= 1\n b += a[i]\nif a == b:\n i = int((len(a)-1)/2)\n if a[0:i-1] == b[0:i-1]:\n print("yes")', 'a = input()\nb = ""\ni = len(a)\ncode = "No"\nif a == a[::-1]:\n i = int((len(a)-1)/2)\n b = a[0:i]\n if b == b[::-1]:\n i = int((len(a)+3)/2)\n b = a[i-1:]\n if b == b[::-1]:\n code = \'Yes\'\nprint(code)'] | ['Wrong Answer', 'Accepted'] | ['s023921358', 's766756079'] | [2940.0, 3064.0] | [18.0, 18.0] | [140, 208] |
p02730 | u419354839 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['S = input()\nN = len(S)\n\ndef evaluate(string):\n return string[:] == string[::-1]\n\nprint(S[:int((N-1)/2)])\nprint("Yes" if evaluate(S[:int((N-1)/2)]) else "No")', 'S = input()\nN = len(S)\n\ndef evaluate(string):\n return string[:] == string[::-1]\n\nprint(S[:int((N-1)/2)])\nprint("Yes" if evaluate(S[:int((N-1)/2)]) and evaluate(S) else "No")', 'S = input()\nN = len(S)\n\ndef evaluate(string):\n return string[:] == string[::-1]\n\nprint("Yes" if evaluate(S[:int((N-1)/2)]) and evaluate(S) else "No")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s173440100', 's513917905', 's014369138'] | [3060.0, 3060.0, 2940.0] | [17.0, 17.0, 18.0] | [158, 174, 150] |
p02730 | u420399048 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['def g(S):\n N=len(S)\n if palindrome(S)==True and palindrome(S[((N+3)//2)-1])==True and palindrome(S[(N-1)//2])==True:\n return "Yes"\n else:\n return "No"\nS=input()\nprint(g(S))', 'def palindrome(S):\n N=len(S)\n for i in range(N):\n if S[i]!=S[N-i-1]:\n return False\n return True\ndef g(S):\n N=len(S)\n if palindrome(S)==True and palindrome(S[(((N+3)//2)-1):])==True and palindrome(S[:((N-1)//2)])==True:\n return "Yes"\n else:\n return "No"\nS=input()\nprint(g(S))\n '] | ['Runtime Error', 'Accepted'] | ['s833874579', 's623960727'] | [3060.0, 3060.0] | [17.0, 17.0] | [195, 329] |
p02730 | u423193302 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['s = input()\nl = len(s)\ns1 = s[:int((l-1)/2)]\ns2 = s1[::-1]\ns3 = s[int((l+1)/2):]\ns4 = s3[::-1]\n\nm = s[:int((l-1)/2)]\nn = len(m)\nm1 = m[:int((n-1)/2)]\nm2 = m1[::-1]\nm3 = m[int((n+1)/2):]\nm4 = m3[::-1]\n\na = s[int((l+3)/2-1):]\nb = len(a)\na1 = a[:int((b-1)/2)]\na2 = a1[::-1]\na3 = a[int((b+1)/2):]\na4 = a3[::-1]\n\nprint(s, s1, s2, s3, s4)\nprint(m, m1, m2, m3, m4)\nprint(a, a1, a2, a3, a4)\n\nif (s2 in s4) & (m2 in m4) & (a2 in a4):\n print("Yes")\nelse:\n print("No")', 's = input()\nl = len(s)\ns1 = s[:int((l-1)/2)]\ns3 = s[int((l+1)/2):]\ns4 = s3[::-1]\n\nm = s[:int((l-1)/2)]\nn = len(m)\nm1 = m[:int((n)/2)]\nm3 = m[int((n+1)/2):]\nm4 = m3[::-1]\n\na = s[int((l+3)/2-1):]\nb = len(a)\na1 = a[:int((b-1)/2)]\na3 = a[int((b+1)/2):]\na4 = a3[::-1]\n\n\nif (s1 in s4) & (m1 in m4) & (a1 in a4):\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s849465688', 's905275840'] | [3064.0, 3064.0] | [19.0, 18.0] | [463, 344] |
p02730 | u425236751 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["s = input()\n\ndef check(s):\n if(s==s[::-1]):\n return True\n else:\n return False\n \nn = len(s)\nif(check(s[:(n-1)//2])):\n if(check(s[((n+3)//2)-1:])):\n if(check(2)):\n \tprint('Yes')\n else:\n print('No')\n else:\n print('No')\nelse:\n print('No')", "s = input()\n\ndef check(s):\n if(s==s[::-1]):\n return True\n else:\n return False\n \nn = len(s)\nif(check(s[:(n-1)//2])):\n if(check(s[((n+3)//2)-1:])):\n if(check(2)):\n print('Yes')\n else:\n print('No')\n else:\n print('No')\nelse:\n print('No')", "s = input()\n\ndef check(s):\n if(s==s[::-1]):\n return True\n else:\n return False\n \nn = len(s)\nif(check(s[:(n-1)//2])):\n if(check(s[((n+3)//2)-1:])):\n if(check(s)):\n \tprint('Yes')\n else:\n print('No')\n else:\n print('No')\nelse:\n print('No')"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s593631747', 's820116902', 's923287042'] | [3064.0, 3060.0, 3060.0] | [18.0, 18.0, 17.0] | [266, 267, 266] |
p02730 | u425762225 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['S = input()\n\ndef judge(x):\n if "".join(list(reversed(x))) == x:\n return True\n else:\n return False\n \ndef solve(x):\n if judge(x) and judge(x[0:(len(x)-1)/2]) and judge(x[(len(x)+1)/2:]):\n print("Yes")\n else:\n print("No")\n \n \nsolve(S)', 'S = input()\n\ndef judge(x):\n if reversed(x) == x and x[0] == x[2] and x[-3] == x[-1]:\n return "Yes"\n else:\n return "No"\n \nprint(judge(S))', 'S = input()\n\ndef judge(x):\n if "".join(list(reversed(x))) == x:\n return True\n else:\n return False\n \ndef solve(x):\n if judge(x) and judge(x[0:int((len(x)-1)/2)]) and judge(x[int((len(x)+1)/2):]):\n print("Yes")\n else:\n print("No")\n \n \nsolve(S)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s898796835', 's910121195', 's562593156'] | [3060.0, 2940.0, 2940.0] | [18.0, 18.0, 17.0] | [254, 145, 264] |
p02730 | u427984570 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['s = input()\nflg = 0\nn = len(s)\ns1 = s[0:(n-1)//2]\ns2 = s[(n+3)//2-1:]\nprint(s1,s2,len(s1)//2-1)\nfor i in range(1,len(s1)//2-1):\n print(s1[i-1], s1[-i], s2[i-1], s2[-i])\n if s1[i-1] != s1[-i]:\n flg = 1\n break\n if s2[i-1] != s2[-i]:\n flg = 1\n break \n\nprint("Yes" if flg == 0 else "No")\n', 's = input()\nflg = 0\nn = len(s)\ns1 = s[0:(n-1)//2]\ns2 = s[(n+3)//2-1:]\nt1 = s1[::-1]\nt2 = s2[::-1]\n#print(s1,s2,t1,t2)\n\nfor i in range(len(s1)):\n if s1[i] != t1[i] or s2[i] != t2[i]:\n flg = 1\n break\nfor i in range(n//2):\n if s[i] != s[-(i+1)]:\n flg = 1\n break\n \nprint("Yes" if flg == 0 else "No")\n'] | ['Wrong Answer', 'Accepted'] | ['s096183242', 's518569748'] | [3064.0, 3064.0] | [18.0, 17.0] | [299, 310] |
p02730 | u428895738 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["a = input()\nif a == a[::-1]:\n b = a[:int((len(a) - 1) / 2)]\n c = a[int((len(a) + 3) / 2):]\n if b == b[::-1] and c == c[::-1]:\n print('Yes')\n exit(0)\nprint('No')\n", "a = input()\nif a == a[::-1]:\n b = a[:int((len(a) - 1) / 2)]\n c = a[int((len(a) + 3) / 2) - 1:]\n if b == b[::-1] and c == c[::-1]:\n print('Yes')\n exit(0)\nprint('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s309966562', 's996946341'] | [2940.0, 2940.0] | [17.0, 17.0] | [184, 188] |
p02730 | u430336181 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['S = list(input())\nN = len(S)\n\nmae = S[:(N-1)/2]\nushiro = S[(N+3)/2:]\n\n\nfor i in range(N):\n if S[i] == S[-(i+1)]:\n for j in range(len(mae)):\n if mae[j] != mae[-(j + 1)] or ushiro[j] != ushiro[-(j + 1)]:\n print("No")\n break\n\n\n else:\n print("Yes")\n break\n break\n\n\n\n\n else:\n print("No")\n break\n\n\n\n\n\n\n\n\n', 's = input()\n\n\nif s != s[::-1]:\n print("No")\n exit()\n\nmae = s[:len(s)//2]\nushiro = s[(len(s)+1)//2:]\n\n\nif mae != mae[::-1]:\n print("No")\n exit()\n\n\nif ushiro != ushiro[::-1]:\n print("No")\n exit()\n\nprint("Yes")'] | ['Runtime Error', 'Accepted'] | ['s208101284', 's376407185'] | [3064.0, 3060.0] | [18.0, 17.0] | [414, 377] |
p02730 | u430726059 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['l=int(input())\nprint((l/3)**3)', 'S=input()\nN=len(S)\nA=S[:(N-1)//2]\nB=S[(N+3)//2-1:]\nif S!=S[::-1] or A!=A[::-1] or B!=B[::-1]:\n print("No")\nelse:\n print("Yes")'] | ['Runtime Error', 'Accepted'] | ['s374935754', 's047132589'] | [9036.0, 9112.0] | [24.0, 27.0] | [30, 132] |
p02730 | u432098488 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["S = input()\nN = len(S)\n\nN_2 = (N+1) // 2 -1\n\nif (N+1) % 4 == 0:\n N1 = N2 = (N+1) // 4 -1\n N3 = N4 = (N1+1) * 3 -1\nelse:\n N1 = (N-1) // 4 -1 \n N2 = N1 + 1\n N3 = N_2 + N1 +1\n N4 = N3 + 1\n \n#print(N1, N2, N3, N4)\n#print(S[0:N1+1], S[N2:N_2], S[N_2+1:N3+1], S[N4:N])\n\nif S[0:N_2] == S[N_2:N][::-1] and S[0:N1+1] == S[N2:N_2][::-1] and S[N_2+1:N3+1] == S[N4:N][::-1]:\n print('Yes')\nelse:\n print('No')", "S = input()\nN = len(S)\n\nN_2 = (N+1) // 2 -1\n\nif (N+1) % 4 == 0:\n N1 = N2 = (N+1) // 4 -1\n N3 = N4 = (N1+1) * 3 -1\nelse:\n N1 = (N-1) // 4 -1 \n N2 = N1 + 1\n N3 = N_2 + N1 +1\n N4 = N3 + 1\n \n#print(N1, N2, N3, N4)\n#print(S[0:N1+1], S[N2:N_2], S[N_2+1:N3+1], S[N4:N], S[0:N_2], S[N_2+1:N])\n\nif S[0:N_2] == S[N_2+1:N][::-1] and S[0:N1+1] == S[N2:N_2][::-1] and S[N_2+1:N3+1] == S[N4:N][::-1]:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s792640237', 's094267069'] | [3064.0, 3064.0] | [17.0, 18.0] | [404, 428] |
p02730 | u435593586 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["n = input()\nx = len(n)\n\nif n == n[::-1]:\n if n[:((x-1)//2)] == n[:((x-1)//2)][::-1]:\n if n[:((x+3)//2)] == n[:((x+3)//2)][::-1]:\n print('Yes')\nelse:\n print('No')", "n = input()\nx = len(n)\n\nif n == n[::-1]:\n if n[:((x-1)//2)] == n[:((x-1)//2)][::-1]:\n if n[((x+3)//2)-1:] == n[((x+3)//2)-1:][::-1]:\n print('Yes')\n else:\n print('No')\n else:\n print('No')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s453197371', 's405759121'] | [3060.0, 3064.0] | [17.0, 17.0] | [171, 257] |
p02730 | u437351386 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['s=input()\nc=list(reversed(s))\nn=len(s)\nt=list(s[:int((n-1)/2)])\na=list(reversed(t))\nu=list(s[int((n+3)/2)-1:])\nb=list(reversed(u))\n#print(b)\nif t==a and u==b and s==c:\n print("Yes") \nelse:\n print("No")\n ', 's=list(input())\nc=list(reversed(s))\nn=len(s)\nt=list(s[:int((n-1)/2)])\na=list(reversed(t))\nu=list(s[int((n+3)/2)-1:])\nb=list(reversed(u))\n#print(b)\nif t==a and u==b and s==c:\n print("Yes") \nelse:\n print("No")\n '] | ['Wrong Answer', 'Accepted'] | ['s558103152', 's397358564'] | [3188.0, 3060.0] | [19.0, 18.0] | [214, 220] |
p02730 | u439176910 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['S = input().rstrip()\nN = len(S)\nfor i in range((N - 1) // 2):\n if S[i] != S[N-1-i]:\n print("No")\n exit(0)\ns = S[:(N-1) // 2]\nn = len(s)\nif n == 2 and s[0] != s[1]:\n print("No")\n exit(0)\n\nfor i in range((n - 1) // 2):\n print(s[i])\n print(s[n-1-i])\n if s[i] != s[n-1-i]:\n print("No")\n exit(0)\nprint("Yes")\n', 'S = input().rstrip()\nN = len(S)\nfor i in range((N - 1) // 2):\n if S[i] != S[N-1-i]:\n print("No")\n exit(0)\ns = S[:(N-1) // 2]\nn = len(s)\nif n == 2 and s[0] != s[1]:\n print("No")\n exit(0)\n\nfor i in range((n - 1) // 2):\n if s[i] != s[n-1-i]:\n print("No")\n exit(0)\nprint("Yes")\n'] | ['Wrong Answer', 'Accepted'] | ['s375096875', 's558482302'] | [3064.0, 3064.0] | [17.0, 17.0] | [350, 314] |
p02730 | u442855260 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["S=input()\nN=len(S)\ni=0\n\nif((N-1)/2%2==1):\n while (i<((N-1)/2-1)/2):\n print(S[i],S[int((N-1)/2-i-1)],S[int((N-1)/2+1+i)],S[int(N-1-i)])\n if( (S[i]==S[int((N-1)/2-i-1)]) & (S[i]==S[int((N-1)/2+1+i)]) & (S[i]==S[int(N-1-i)]) ):\n i+=1\n else:\n break;\n if(i==int((N-1)/2-1)/2):\n print('Yes')\n else:\n print('No')\n \nelse:\n while (i<=(N-1)/4):\n print(S[i],S[int((N-1)/2-i-1)],S[int((N-1)/2+1+i)],S[int(N-1-i)])\n if( (S[i]==S[int((N-1)/2-i-1)]) & (S[i]==S[int((N-1)/2+1+i)]) & (S[i]==[int(N-1-i)]) ):\n i+=1\n else:\n break;\n if(i==(N-1)/4):\n print('Yes')\n else:\n print('No')", "S=input()\nN=len(S)\ni=0\nif((N-1)/2%2==1):\n while (i<((N-1)/2-1)/2):\n if( (S[i]==S[int((N-1)/2-i-1)]) & (S[i]==S[int((N-1)/2+1+i)]) & (S[i]==S[int(N-1-i)]) ):\n i+=1\n else:\n break;\n if(i==int((N-1)/2-1/2)):\n print('Yes')\n else:\n print('No')\n \nelse:\n while (i<(N-1)/4):\n if( (S[i]==S[int((N-1)/2-i-1)]) & (S[i]==S[int((N-1)/2+1+i)]) & (S[i]==S[int(N-1-i)]) ):\n i+=1\n else:\n break;\n if(i==int((N-1)/4)):\n print('Yes')\n else:\n print('No')\n", "S=input()\nN=len(S)\ni=0\nif((N-1)/2%2==1):\n while (i<=((N-1)/2-1)/2):\n if( (S[i]==S[int((N-1)/2-i-1)]) & (S[i]==S[int((N-1)/2+1+i)]) & (S[i]==S[int(N-1-i)]) ):\n i+=1\n else:\n break;\n if(i==int(((N-1)/2-1)/2+1)):\n print('Yes')\n else:\n print('No')\n \nelse:\n while (i<=(N-1)/4):\n if( (S[i]==S[int((N-1)/2-i-1)]) & (S[i]==S[int((N-1)/2+1+i)]) & (S[i]==S[int(N-1-i)]) ):\n i+=1\n else:\n break;\n if(i==int((N-1)/4+1)):\n print('Yes')\n else:\n print('No')"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s027941396', 's449611889', 's021519320'] | [3064.0, 3064.0, 3064.0] | [18.0, 18.0, 17.0] | [697, 554, 561] |
p02730 | u446261066 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['s = input()\nll = len(s)\nl = ll // 2\n\nans = True\nt = l\nif len(s) % 2 != 0:\n t = l - 1\n\nfor i in range(0, t):\n if s[i] != s[t-i]:\n ans = False\n\nt = l\nif len(s) % 2 != 0:\n t = l + 1\n\nll -= 1\nc = 0\nfor i in range(t, ll):\n if s[i] != s[ll-c]:\n ans = False\n c += 1\n\nif s[:t-1] != s[t:]:\n ans = False\n\nprint(ans)\n\n', 's = input()\nll = len(s)\nl = ll // 2\n\nans = True\nt = l\nif len(s) % 2 != 0:\n t = l - 1\n\nfor i in range(0, t):\n if s[i] != s[t-i]:\n ans = False\n\nt = l\nif len(s) % 2 != 0:\n t = l + 1\n\nll -= 1\nc = 0\nfor i in range(t, ll):\n if s[i] != s[ll-c]:\n ans = False\n c += 1\n\nif s[:t-1] != s[t:]:\n ans = False\n\nif ans:\n x = "Yes"\nelse:\n x = "No"\nprint(x)\n\n'] | ['Wrong Answer', 'Accepted'] | ['s500803655', 's621210559'] | [3064.0, 3064.0] | [17.0, 17.0] | [339, 378] |
p02730 | u453623947 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['S = list(input())\nN = len(S)\nif S == S[::-1] :\n if S[:int((N-1)/2):] == S[:int((N-1)/2):-1] and S[int(((N+3)/2)-1):int(N):] == S[int(((N+3)/2)-1):int(N):-1] :\n print("Yes")\n else :\n print("No")\n', 'S = list(input())\nN = len(S)\ns1 = S[:int((N-1)/2):]\ns2 = S[int(((N+3)/2)-1):int(N):]\nif S == S[::-1] :\n if s1 == s1[::-1] and s2 == s2[::-1] :\n print("Yes")\n else:\n print("No")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Accepted'] | ['s004753823', 's852456670'] | [3060.0, 3060.0] | [17.0, 17.0] | [217, 219] |
p02730 | u458834822 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["# -*- coding: utf-8 -*-\n\ns = input()\n\ndef kaibun(s):\n for i in range(len(s)-(len(s)%2)):\n \tif s[i] != s[-1*i-1]:\n return False\n return True\n\nif kaibun(s):\n s_half = s[:(len(s)-1)//2]\n if kaibun(s_half):\n ans = 'Yes'\n else:\n ans = 'No'\nelse:\n ans = 'No'\n\n\nprint(ans)", "def kaibun(s):\n for i in range(len(s)-(len(s)%2)):\n if s[i] != s[-1*i-1]:\n return False\n return True\n\nif kaibun(s):\n s_half = s[:(len(s)-1)//2]\n if kaibun(s_half):\n ans = 'Yes'\n else:\n ans = 'No'\nelse:\n ans = 'No'", "# -*- coding: utf-8 -*-\n\ns = input()\n\ndef kaibun(s):\n for i in range(len(s)-(len(s)%2)):\n if s[i] != s[-1*i-1]:\n return False\n return True\n\nif len(s) < 3:\n ans = 'No'\nelse:\n if kaibun(s):\n s_half = s[:(len(s)-1)//2]\n if kaibun(s_half):\n ans = 'Yes'\n else:\n ans = 'No'\n else:\n ans = 'No'\n \nprint(ans)"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s095370970', 's968821451', 's928192528'] | [2940.0, 3060.0, 3064.0] | [17.0, 17.0, 18.0] | [299, 263, 345] |
p02730 | u460009487 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["S = str(input())\nN = len(S)\n\nif L > 5:\n small = round((N-1)/2)\n big = round((N+3)/2)-1\n smallS = S[0:small]\n bigS = S[big:N]\n\n if smallS == bigS:\n print('Yes')\n else:\n print('No')", "S = str(input())\nN = len(S)\n\nsmall = round((N-1)/2)\nbig = round((N+3)/2)-1\nsmallS = S[0:small]\nbigS = S[big:N]\n\nif L > 5:\n if smallS == bigS:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')", "s = input()\nn = len(s)\n\nfront = s[:(n-1)//2]\nrear = s[(n+1)//2:]\n\nif s == s[::-1] and front == front[::-1] ans rear == rear[::-1]:\n print('Yes')\nelse:\n print('No')", "if L > 5:\n small = round((N-1)/2)\n big = round((N+3)/2)-1\n smallS = S[0:small]\n bigS = S[big:N]\n\n if smallS == bigS:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')", "s = input()\nn = len(s)\n\nfront = s[:(n-1)//2]\nrear = s[(n+1)//2:]\n\nif s == s[::-1] and front == front[::-1] and rear == rear[::-1]:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s002884419', 's451429828', 's464167418', 's529411167', 's894386381'] | [3060.0, 3064.0, 2940.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0, 18.0, 17.0] | [211, 217, 165, 204, 165] |
p02730 | u460386402 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["s=input()\nn=len(s)\ncount=0\na=(n-1)//2\nb=(n+3)//2\nfor i in range(n//2):\n if s[i]!=s[-abs(i+1)]:\n count+=1\n \nfor i in range(a//2):\n c=ord(s[i])\n d=ord(s[(a-1-i)])\n if c!=d:\n count+=1\n\nfor i in range((n-b+1)//2):\n c=ord(s[n-i])\n d=ord(s[b-1+i])\n if c!=d:\n count+=1\n\nif count!=0:\n print('No')\nelse:\n print('Yes')", "s=input()\nn=len(s)\ncount=0\na=(n-1)//2\nb=(n+3)//2\nfor i in range(n//2):\n if s[i]!=s[-abs(i+1)]:\n count+=1\n \nfor i in range(a//2):\n if s[i]!=s[(a-1-i)]:\n count+=1\n\nfor i in range((n-b+1)//2):\n if s[-(i+1)]!=s[b-1+i]:\n count+=1\n\nif count!=0:\n print('No')\nelse:\n print('Yes')\n"] | ['Runtime Error', 'Accepted'] | ['s220121162', 's981429231'] | [3064.0, 3064.0] | [18.0, 17.0] | [329, 289] |
p02730 | u461454424 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['#input\nS = input()\n\n#output\nN = len(S)\nk = N//2\nl = (N-3)//4\nm = (3*N-1)//4\nif N == 3:\n if S[0] == S[3]:\n print("Yes"):\n else:\n print("No"):\nelse:\n if (S[0:k] == S[-1:k:-1] )and (S[0:l] == S[(N-3)//2:l:-1]) and (S[(N+1)//2:m] == S[N-1:m:-1]):\n print("Yes")\n else:\n print("No")', '#input\nS = input()\n\n#output\nN = len(S)\n\nif (S == S[::-1]) and (S[:(N-1)//2] == S[:(N-1)//2][::-1]) and (S[(N+3)//2-1:] == S[(N+3)//2-1:][::-1]):\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s578589251', 's970220305'] | [2940.0, 3060.0] | [17.0, 17.0] | [316, 183] |
p02730 | u461833298 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["S = input()\nN = len(S)\n\na = S[0:(N - 1) // 2]\nb = S[(N + 3) // 2 - 1:]\n\nN2 = len(a)\nc = a[::-1]\nd = b[::-1]\n\nprint(a[0:(N2 + 1) // 2])\nprint(b[0:(N2 + 1) // 2])\nprint(c[0:(N2 + 1) // 2])\nprint(d[0:(N2 + 1) // 2])\n\n\nif N2 % 2 == 0:\n if a[0:N2//2] == c[0:N2//2] and b[0:N2//2] == d[0:N2//2]:\n print('Yes')\n else:\n print('No')\n\nif N2 % 2 == 1:\n if a[0:(N2+1)//2] == c[0:(N2+1)//2] and b[0:(N2+1)//2] == d[0:(N2+1)//2]:\n print('Yes')\n else:\n print('No')\n", "S = input()\nN = len(S)\n\na = S[0:(N - 1) // 2]\nb = S[(N + 3) // 2 - 1:]\n\nif S[::] != S[::-1]:\n print('No')\n exit()\n\nN2 = len(a)\nc = a[::-1]\nd = b[::-1]\n#print(a, b)\n\nif N2 % 2 == 0:\n # print(a[0:N2 // 2])\n # print(c[0:N2 // 2])\n # print(b[0:N2 // 2])\n # print(d[0:N2 // 2])\n if a[0:N2//2] == c[0:N2//2] and b[0:N2//2] == d[0:N2//2]:\n print('Yes')\n else:\n print('No')\n\nif N2 % 2 == 1:\n # print(a[0:(N2 + 1) // 2])\n # print(c[0:(N2 + 1) // 2])\n # print(b[0:(N2 + 1) // 2])\n # print(d[0:(N2 + 1) // 2])\n if a[0:(N2+1)//2] == c[0:(N2+1)//2] and b[0:(N2+1)//2] == d[0:(N2+1)//2]:\n print('Yes')\n else:\n print('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s385503013', 's723819676'] | [3064.0, 3064.0] | [18.0, 18.0] | [490, 678] |
p02730 | u465652095 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['S = input()\nN = len(S)\nSF_num = int((N-1)/2)\nSF = S[:SF_num]\nSF_rev = SF[::-1]\nSB = S[SF_num-1:]\nSB_rev = SB[::-1]\n\nif SF == SB_rev:\n if SF == SF_rev:\n if SB == SB_rev:\n print("Yes")\nelse:\n print("No")', 'S = input()\nN = len(S)\nSF_num = int((N-1)/2)\nSF = S[:SF_num]\nSF_rev = SF[::-1]\nSB = S[:SF_num-1]\nSB_rev = SB[::-1]\n\nif SF == SB_rev:\n if SF == SF_rev:\n if SB == SB_rev:\n print("Yes")\nelse:\n print("No")', 'S = input()\nN = len(S)\nSF_num = int((N-1)/2)\nSF = S[:SF_num]\nSF_rev = SF[::-1]\nSB_num = int((N+3)/2)\nSB = S[SB_num-1:]\nSB_rev = SB[::-1]\n\nif SF == SB_rev and SF == SF_rev and SB == SB_rev:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s356327005', 's952610793', 's187144856'] | [3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0] | [225, 225, 227] |
p02730 | u468206018 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["n = input()\nm = len(n)\nif n == n[::-1]:\n k = n[0:(m-1)//2]\n l = n[(m+3)//2-1:m]\n print(k,l)\n if k == k[::-1]:\n if l == l[::-1]:\n print('Yes')\n exit()\nprint('No')\n", "n = input()\nm = len(n)\nif n == n[::-1]:\n k = n[0:(m-1)//2]\n l = n[(m+3)//2-1:m]\n if k == k[::-1]:\n if l == l[::-1]:\n print('Yes')\n exit()\nprint('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s953361151', 's116375890'] | [3060.0, 3060.0] | [18.0, 17.0] | [179, 166] |
p02730 | u468972478 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['s = input()\nfor i in [s, s[:len(s)//2], s[len(s)//2+1:]]:\n if i != i[::-1]:\n print("No")\n break\nelse:\n print("Yes")', 's = input()\nfor i in [s, s[:len(s)], s[len(s)+1:]]:\n if i != i[::-1]:\n print("No")\n break\nelse:\n print("Yes")', 's = input()\nprint("Yes" if s == sorted(s) and s[:len(s)] == sorted(s[:len(s)]) and s[len(s)+1:] == sorted(s[:len(s)+1]) else "No")\n', 's = input()\nfor i in [s, s[:len(s)//2], s[len(s)//2+1:]]:\n if i != i[::-1]:\n print("No")\n break\nelse:\n print("Yes")'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s254505498', 's858550671', 's996970810', 's454210153'] | [9060.0, 8960.0, 9092.0, 9096.0] | [30.0, 26.0, 30.0, 31.0] | [121, 115, 131, 123] |
p02730 | u471214054 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["S = input()\nN = len(S)\n\n\ndef is_palindrome(s):\n s_reverse = s[::-1]\n if s == s_reverse:\n return True\n else:\n return False\n\nprint(is_palindrome(S))\n\nif is_palindrome(S) and is_palindrome(S[:(N-1)//2]) and is_palindrome(S[(N+3)//2-1:]):\n print('Yes')\nelse:\n print('No')\n", "S = input()\nN = len(S)\n\n\ndef is_palindrome(s):\n s_reverse = s[::-1]\n if s == s_reverse:\n return True\n else:\n return False\n\nif is_palindrome(S) and is_palindrome(S[:(N-1)//2]) and is_palindrome(S[(N+3)//2-1:]):\n print('Yes')\nelse:\n print('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s492886658', 's075977620'] | [3064.0, 2940.0] | [17.0, 18.0] | [297, 272] |
p02730 | u472197237 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["def main():\n S = input()\n len_s = len(S)\n flag = False\n if S == S[::-1]:\n if S[len_s // 2] == S[len_s // 2:-1:-1]:\n if S[len_s // 2:] == S[-1:len_s // 2:-1]:\n flag = True\n if flag:\n print('Yes')\n else:\n print('No')\n\n\nif __name__ == '__main__':\n main()", "def main():\n S = input()\n len_s = len(S)\n flag = False\n if S == S[::-1]:\n if S[0:len_s // 2] == S[len_s // 2 - 1::-1]:\n if S[len_s // 2 + 1:] == S[-1:len_s // 2:-1]:\n flag = True\n # print(S[0:len_s // 2], S[len_s // 2 - 1::-1])\n # print(S[len_s // 2 + 1:], S[-1:len_s // 2:-1])\n if flag:\n print('Yes')\n else:\n print('No')\n\n\nif __name__ == '__main__':\n main()\n"] | ['Wrong Answer', 'Accepted'] | ['s890430570', 's790275937'] | [3060.0, 2940.0] | [17.0, 17.0] | [319, 433] |
p02730 | u472696272 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["s = list(input())\nn = len(s)\nif n==n[::-1] and n[0:int((n-1)/2)]==n[0:int((n-1)/2)][::-1] and n[int((n+3)/2-1):n]==n[int((n+3)/2-1):n][::-1]:\n print('Yes')\nelse:\n print('No')\n", "s = list(input())\nn = len(s)\nif s==s[::-1] and s[0:int((n-1)/2)]==s[0:int((n-1)/2)][::-1] and s[int((n+3)/2-1):n]==s[int((n+3)/2-1):n][::-1]:\n print('Yes')\nelse:\n print('No')\n"] | ['Runtime Error', 'Accepted'] | ['s997166113', 's115818253'] | [3060.0, 3060.0] | [17.0, 17.0] | [177, 177] |
p02730 | u478646901 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["\ns = input()\nlen_s = len(s)\nif s[:int((len_ s -1 ) /2)] != s[int((len_ s -1 ) / 2 +1):]:\n print('No')\nelse:\n tmp = s[:int((len_ s -1 ) /2)]\n if len(tmp) == 1:\n print('Yes')\n else:\n if len(tmp ) %2 == 1:\n if tmp[:int((len(tmp) - 1) / 2)] == tmp[int((len(tmp) - 1) / 2 + 1):][::-1]:\n print('Yes')\n else:\n print('No')\n else:\n if tmp[:int(len(tmp) / 2)] == tmp[int(len(tmp) / 2):][::-1]:\n print('Yes')\n else:\n print('No')\n", "s = input()\nlen_s = len(s)\nif s[:int((len_s-1)/2)] != s[int((len_s-1)/2+1):]:\n print('No')\nelse:\n tmp = s[:int((len_s-1)/2)]\n if len(tmp) == 1:\n print('Yes')\n else:\n if len(tmp)%2 == 1:\n\t if tmp[:int((len(tmp) - 1) / 2)] == tmp[int((len(tmp) - 1) / 2 + 1):][::-1]:\n \tprint('Yes')\n \telse:\n \tprint('No')\n else:\n if tmp[:int(len(tmp) / 2)] == tmp[int(len(tmp) / 2):][::-1]:\n \tprint('Yes')\n \telse:\n \tprint('No')\n \n", "\ns = input()\nlen_s = len(s)\nif s[:int((len_s-1) /2)] != s[int((len_s-1) / 2 +1):]:\n print('No')\nelse:\n tmp = s[:int((len_s -1 ) /2)]\n if len(tmp) == 1:\n print('Yes')\n else:\n if len(tmp ) %2 == 1:\n if tmp[:int((len(tmp) - 1) / 2)] == tmp[int((len(tmp) - 1) / 2 + 1):][::-1]:\n print('Yes')\n else:\n print('No')\n else:\n if tmp[:int(len(tmp) / 2)] == tmp[int(len(tmp) / 2):][::-1]:\n print('Yes')\n else:\n print('No')\n"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s207550780', 's754800121', 's809707543'] | [2940.0, 3060.0, 3064.0] | [17.0, 17.0, 18.0] | [555, 528, 548] |
p02730 | u488884575 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["S = [i for i in input()]\nf = 0\nfor i in range(len(S)//2):\n if not S[i] == S[-i]:\n f = 1\n print('No')\n break\nif f == 0:\n for i in range(int((len(S)-1)/2)):\n if not S[i] == S[int((len(S)-1)/2-i)]:\n f = 1\n print('No')\n break\nif f == 0:\n for i in range(int((len(S)+3)/2), len(S)) and f == 0:\n if not S[i] == S[-i]:\n f = 1\n print('No')\n break\nif f ==0:\n print('Yes')", "S = [i for i in input()]\nf = 0\nfor i in range(len(S)//2):\n if not S[i] == S[-i]:\n f = 1\n print('No')\n break\nif f == 0:\n s = S[:int((len(S)-1)/2)]\n for i in range(len(s)//2):\n if not s[i] == s[-i]:\n f = 1\n print('No')\n break\nif f == 0:\n s = S[int((len(S)+3)/2):]\n for i in range(len(S)//2):\n if not s[i] == s[-i]:\n f = 1\n print('No')\n break\nif f ==0:\n print('Yes')", "S = [i for i in input()]\nf = 0\nfor i in range(len(S)//2):\n if not S[i] == S[-i]:\n f = 1\n print('No')\n break\nif f == 0:\n for i in range(int((len(S)-1)/2)):\n if not S[i] == S[int((len(S)-1)/2-i)]:\n f = 1\n print('No')\n break\nif f == 0:\n for i in range((len(S)+3)/2, len(S)) and f == 0:\n if not S[i] == S[-i]:\n f = 1\n print('No')\n break\nif f ==0:\n print('Yes')", "S = [i for i in input()]\nf = 0\nfor i in range(len(S)//2):\n if not S[i] == S[-i]:\n f = 1\n print('No')\n break\nif f == 0:\n s = S[:int((len(S)-1)/2)]\n for i in range(len(s)):\n if not s[i] == s[-i]:\n f = 1\n print('No')\n break\nif f == 0:\n s = S[int((len(S)+3)/2):]\n for i in range(len(S)):\n if not s[i] == s[-i]:\n f = 1\n print('No')\n break\nif f ==0:\n print('Yes')", "S = [i for i in input()]\nf = 0\nfor i in range(len(S)//2):\n #print(S[i], S[-1-i])\n if not S[i] == S[-1-i]:\n f = 1\n print('No')\n break\n#print(f)\nif f == 0:\n s = S[:int((len(S)-1)/2)]\n for i in range(int(len(s)//2)):\n if not s[i] == s[-1-i]:\n f = 1\n print('No')\n break\n#print(f)\nif f == 0:\n s = S[int((len(S)+3)/2-1):]\n for i in range(int(len(s)//2)):\n #print(s[i], s[-1-i])\n if not s[i] == s[-1-i]:\n f = 1\n print('No')\n break\nif f ==0:\n print('Yes')"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s331606340', 's775632829', 's826295899', 's963135146', 's631892384'] | [3064.0, 3064.0, 3064.0, 3064.0, 3192.0] | [18.0, 18.0, 17.0, 17.0, 17.0] | [410, 414, 405, 408, 502] |
p02730 | u491462774 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["import math\ns = list(input())\nn = int(len(s))\ns1 = s[ : int((n-1)/2)]\ns2 = s[int((n+3) / 2) - 1 : n]\nprint(s1)\nprint(s2)\nflag = 0\nprint(int(len(s1)))\nfor i in range(int(len(s1) / 2)):\n if s1[i] == s1[int(len(s1)) - i - 1]:\n flag = 1\n else:\n break\n\nfor i in range(int(len(s2) / 2)):\n if s2[i] == s2[int(len(s2)) - i - 1]:\n flag = 1\n else:\n break\n\nprint('Yes' if flag == 1 else 'No')", "import math\ns = list(input())\nn = len(s)\ns1 = s[ : (n-1) // 2]\ns2 = s[(n+3) // 2 - 1 : n]\nflag = 1\n\nfor i in range(len(s) // 2):\n if s[i] != s[- i - 1]:\n flag = 0\n\nfor i in range(len(s1) // 2):\n if s1[i] != s1[- i - 1]:\n flag = 0\n\nfor i in range(len(s2) // 2):\n if s2[i] != s2[- i - 1]:\n flag = 0\n\nprint('Yes' if flag == 1 else 'No')\n"] | ['Wrong Answer', 'Accepted'] | ['s239723258', 's900592601'] | [9052.0, 9064.0] | [33.0, 28.0] | [422, 365] |
p02730 | u493318999 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["s=input()\nn = len(s)\nfront = s[:(n-1)//2]\nback = s[(n+3)//2-1:n]\nprint(front,back)\nif s==s[::-1]:\n if front==front[::-1]:\n if back==back[::-1]:\n print('Yes')\n else:\n print('No')\n \n", "s=input()\nn = len(s)\nfront = s[1:(n-1)//2]\nback = s[(n+3)//2:n]\nif s==s[::-1]:\n if front==front[::-1]:\n if back==back[::-1]:\n print('Yes')\n else:\n print('No')\n \n", "s=input()\nn = len(s)\nfront = s[:(n-1)//2]\nback = s[(n+3)//2:n]\nif s==s[::-1]:\n if front==front[::-1]:\n if back==back[::-1]:\n print('Yes')\n else:\n print('No')\n \n", "s=input()\nn = len(s)\nfront = s[:(n-1)//2]\nback = s[(n+3)//2-1:n]\nif s==s[::-1]:\n if front==front[::-1]:\n if back==back[::-1]:\n print('Yes')\n else:\n print('No')\n else:\n print('No')\nelse:\n print('No')\n "] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s268885433', 's697544160', 's914452641', 's025168313'] | [2940.0, 2940.0, 2940.0, 2940.0] | [18.0, 18.0, 17.0, 17.0] | [198, 179, 178, 229] |
p02730 | u498202416 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['def parindrome(s):\n print(s)\n if s[::] == s[::-1]:\n return True\n return False\n\ndef string_parindrome(s):\n if parindrome(s):\n N = len(s)\n if parindrome(s[:((N-1)//2):]) and parindrome(s[((N+3)//2)-1::]):\n return "Yes"\n return "No"\n \n\nS = input()\nprint(string_parindrome(S))\n', 'def parindrome(s):\n if s[::] == s[::-1]:\n return True\n return False\n\ndef string_parindrome(s):\n if parindrome(s):\n N = len(s)\n if parindrome(s[:((N-1)//2):]) and parindrome(s[((N+3)//2)-1::]):\n return "Yes"\n return "No"\n \n\nS = input()\nprint(string_parindrome(S))\n'] | ['Wrong Answer', 'Accepted'] | ['s967028808', 's729010494'] | [2940.0, 3060.0] | [17.0, 17.0] | [323, 310] |
p02730 | u500942659 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['s = input()\nn = len(s)\nprint((s==s[::-1]) and (s[(n-1)//2+1:]==s[:(n-1)//2:-1]))', "s = input()\nn = len(s)\nif (s==s[::-1]) and (s[(n-1)//2+1:]==s[:(n-1)//2:-1]):\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s030462608', 's256594359'] | [2940.0, 3060.0] | [17.0, 17.0] | [80, 116] |
p02730 | u502841298 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['str = input()\nresp = True\nfor i in range(0, int(len(str) / 2)):\n if str[i] != str[len(str) - i - 1]:\n resp = False\n break\nprint(resp)', "def isPal(arr):\n resp = True\n for i in range(0, int(len(arr) / 2)):\n if arr[i] != arr[len(arr) - i - 1]:\n resp = False\n break\n return(resp)\n\nstr = input()\nresp = 'No'\nif isPal(str):\n if isPal(str[0:(len(str) // 2)]) and isPal(str[(len(str) // 2) + 1:len(str)]):\n resp = 'Yes'\nprint(resp)"] | ['Wrong Answer', 'Accepted'] | ['s909750115', 's963699815'] | [2940.0, 3064.0] | [18.0, 18.0] | [150, 335] |
p02730 | u507145838 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["s = input()\ns1 = s[:n//2]\ns2 = s[n//2+1:]\nif s1 == s2 and s2 == s2[::-1]:\n print('Yes')\nelse:\n print('No')", 's = input()\nn = len(s)\n\ns1 = s[:(n-1)//2]\ns2 = s[(n+3)//2-1:]\n\nprint(s1)\nprint(s2)\n\nif s == s[::-1] and s1 == s1[::-1] and s2 == s2[::-1]:\n print("Yes")\nelse:\n print("No")', 's = input()\nn = len(s)\n\ns1 = s[:(n-1)//2]\ns2 = s[(n+3)//2-1:]\n\nif s == s[::-1] and s1 == s1[::-1] and s2 == s2[::-1]:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s632162928', 's986455482', 's511428273'] | [2940.0, 3060.0, 3060.0] | [18.0, 17.0, 17.0] | [113, 173, 152] |
p02730 | u508164527 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['import sys\n\ns = input()\nN = len(s)\nj = int((N-1)/2)\ni = 0\nwhile i!=j:\n if s[i] == s[j]:\n print("YES")\n else:\n print("No")\n sys.exit()\n i = i+1\n j = j-1\np = int((N+3)/2 -1)\nq = N\nwhile p!=q:\n if s[p] == s[q]:\n pass\n else:\n print("No")\n sys.exit()\n p = p+1\n q = q-1\n\na = 0\nwhile a != N:\n if s[a] == s[N]:\n pass\n else:\n print("No")\n sys.exit()\n a = a+1\n N = N-1\nif a >= (N-1)/2:\n print("Yes")', 's = input()\nN = len(s)\nt = s[::-1]\na = s[0:int((N-1)/2)]\nb = a[::-1]\nif s == t and a == b:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s225171554', 's116992432'] | [3064.0, 3060.0] | [18.0, 18.0] | [429, 125] |
p02730 | u508426820 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['S = input()\nN = len(S)\nflag1 = (S == S[::-1])\ns = S[0:(N - 3)//2]\nflag2 = (s == s[::-1])\nif flag1 and flag2:\n print("Yes")\nelse:\n print("No")\n', 'S = input()\nN = len(S)\nflag1 = (S == S[::-1])\ns = S[0:(N - 1)//2]\nflag2 = (s == s[::-1])\nif flag1 and flag2:\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Accepted'] | ['s550892902', 's453340256'] | [2940.0, 3060.0] | [17.0, 18.0] | [148, 148] |
p02730 | u509392332 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["S = input()\n\nN = len(S)\nS_list = [i for i in S]\nS_1 = S_list[:(N-1)//2]\ncheck = 0\nfor i in range(len(S_1)//2+1):\n print(S_1[i], S_1[-(i+1)])\n if S_1[i] != S_1[-(i+1)]:\n check = 1\n\nS_2 = S_list[(N+3)//2-1:]\nfor i in range(len(S_2)//2+1):\n print(S_2[i], S_2[-(i+1)])\n if S_2[i] != S_2[-(i+1)]:\n check = 1\n\nprint(S_1, S_2)\nif check == 0:\n print('Yes')\nelse:\n print('No')\n", "S = input()\n\nN = len(S)\nS_list = [i for i in S]\ncheck = 0\n\nS_0 = S_list\nfor i in range(len(S_0)//2):\n if S_0[i] != S_0[-(i+1)]:\n check = 1\n\nS_1 = S_list[:(N-1)//2]\nfor i in range(len(S_1)//2+1):\n if S_1[i] != S_1[-(i+1)]:\n check = 1\n\nS_2 = S_list[(N+3)//2-1:]\nfor i in range(len(S_2)//2+1):\n if S_2[i] != S_2[-(i+1)]:\n check = 1\n\nif check == 0:\n print('Yes')\nelse:\n print('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s486003979', 's424386876'] | [3064.0, 3064.0] | [18.0, 17.0] | [400, 414] |
p02730 | u509725329 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | [' = input()\nflag = True\nfor i in range((len(s)-1)//2):\n\tif s[i] == s[len(s)-i-1]:\n\t\tcontinue\n\telse:\n\t\tflag = False\n\t\tbreak\n\nif flag:\n\tleft = s[:(len(s)-1)//2]\n\tright = s[(len(s)+3)//2-1:]\n\tif left == right:\n\t\tprint("Yes")\n\telse:\n\t\tprint("No")\nelse:\n\tprint("No")\n', 's= input()\nflag = True\nfor i in range((len(s)-1)//2):\n\tif s[i] == s[len(s)-i-1]:\n\t\tcontinue\n\telse:\n\t\tflag = False\n\t\tbreak\n\nif flag:\n\tleft = s[:(len(s)-1)//2]\n\tright = s[(len(s)+3)//2-1:]\n\tif left == right:\n\t\tprint("Yes")\n\telse:\n\t\tprint("No")\nelse:\n\tprint("No")\n'] | ['Runtime Error', 'Accepted'] | ['s205922722', 's071178587'] | [2940.0, 3060.0] | [17.0, 17.0] | [261, 261] |
p02730 | u513519822 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['s = input()\nn = len(s)\nleft = s[0:int((n-1)/2)]\nprint(left)\nright = s[int((n+3)/2)-1:n]\nprint(right)\nif s == s[::-1] and left == left[::-1] and right == right[::-1]:\n print("Yes")\nelse:\n print("No")', 's = input()\nn = len(s)\nleft = s[0:int((n-1)/2)]\nright = s[int((n+3)/2)-1:n]\nif s == s[::-1] and left == left[::-1] and right == right[::-1]:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s186328552', 's584201107'] | [3064.0, 3060.0] | [17.0, 17.0] | [204, 179] |
p02730 | u516566941 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['S = input()\nN = len(S)\ndef ispalindrome(s):\n h = len(s) // 2\n for a, b in zip(s[:h], reversed(s[h+1:])):\n if a != b: return 0\n return True\n\nS1=S[0:(N-1)//2]\nS2=S[-1+(N+3)//2:N]\nprint(S1)\nprint(S2)\nif ispalindrome(S) and ispalindrome(S1) and ispalindrome(S2):\n print("Yes")\nelse:\n print("No")\n\n\n', 'S = input()\nN = len(S)\ndef ispalindrome(string): return True if string==string[::-1] else False\n\nS1=S[0:(N-1)//2]\nS2=S[-1+(N+3)//2:N]\nprint(ispalindrome(S1))\nif ispalindrome(S) and ispalindrome(S1) and ispalindrome(S2):\n print("Yes")\nelse:\n print("No")\n\n\n', 'S = input()\nN = len(S)\ndef ispalindrome(string): return True if string==string[::-1] else False\n\nS1=S[0:(N-1)//2]\nS2=S[-1+(N+3)//2:N]\n\nif ispalindrome(S) and ispalindrome(S1) and ispalindrome(S2):\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s057730442', 's862529973', 's629938469'] | [3064.0, 3060.0, 2940.0] | [18.0, 18.0, 17.0] | [316, 261, 236] |
p02730 | u519939795 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["s=input()\nn=len(s)\nif s[0:(n-1)//2:1]==s[(n-1)//2:0:-1] and s[(n+3)//2:n:1]==s[n:(n+3)//2:-1] and s=s[::-1]:\n print('Yes')\nelse:\n print('No')", 'S = input()\nN = len(S)\nS1 = S[0:(N-1)//2]\nS2 = S[(N+3)//2-1:N+1]\nprint("Yes" if S == S[::-1] and S1 == S1[::-1] and S2 == S2[::-1] else "No")'] | ['Runtime Error', 'Accepted'] | ['s322529851', 's952031870'] | [2940.0, 3060.0] | [17.0, 17.0] | [149, 141] |
p02730 | u527993431 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['S=input()\nN=len(S)\n\nA=S[:(N-1)//2]\nB=S[(N+3)//2-1:])\nfor i in range(len(A)):\n\tif A[i]!=A[-(i+1)]:\n\t\tprint("No")\n\t\texit()\nfor i in range(len(B)):\n\tif B[i]!=B[-(i+1)]:\n\t\tprint("No")\n\t\texit()\nprint("Yes")', 'S=input()\nN=len(S)\n\nA=S[:(N-1)//2]\nB=S[(N+3)//2-1:]\n\nfor i in range(len(S)):\n\tif S[i]!=S[-(i+1)]:\n\t\tprint("No")\n\t\texit()\nfor i in range(len(A)):\n\tif A[i]!=A[-(i+1)]:\n\t\tprint("No")\n\t\texit()\nfor i in range(len(B)):\n\tif B[i]!=B[-(i+1)]:\n\t\tprint("No")\n\t\texit()\nprint("Yes")'] | ['Runtime Error', 'Accepted'] | ['s257840093', 's839826470'] | [2940.0, 3064.0] | [17.0, 17.0] | [201, 269] |
p02730 | u528887718 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['S = input()\nN = len(S)\ndef kaibun(s,n):\n for i in range(n//2):\n if(s[i]!=s[n-i-1]):\n return false\n return true\n\nif(kaibun(S,N) & kaibun(S[0:(N+1)//2-1],N//2) & kaibun(S[N:(N+3)//2-2:-1],N//2)):\n print("Yes")\nelse:\n print("No")', 'S = input()\nN = len(S)\ndef kaibun(s,n):\n for i in range(n//2):\n if(s[i]!=s[n-i-1]):\n return False\n return True\n\nif(kaibun(S,N) & kaibun(S[0:(N+1)//2-1],N//2) & kaibun(S[N:(N+3)//2-2:-1],N//2)):\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s053263189', 's362813425'] | [3060.0, 3064.0] | [17.0, 17.0] | [256, 256] |
p02730 | u531456543 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["s = list(input())\nif len(s) < 6:\n print('No')\n exit()\n \nfor i in range(len(s)//2):\n if s[i] != s[-(i+1)]:\n print('No')\n exit()\ns = s[:len(s)//2]\nprint(s)\nfor i in range(len(s)//2):\n print(i, -(i+1))\n if s[i] != s[-(i+1)]:\n print('No')\n exit()\nprint('Yes')", "s = input()\nif 4 < len(s) < 6:\n print('No')\n exit()\n\nif s[::-1] != s:\n print('No')\n exit()\ns = s[:len(s)//2]\nif s[::-1] != s:\n print('No')\n exit()\nprint('Yes')"] | ['Wrong Answer', 'Accepted'] | ['s338923606', 's319866095'] | [9064.0, 9076.0] | [28.0, 28.0] | [273, 165] |
p02730 | u535423069 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['\n# Created: Sun Mar 22 11:54:41 UTC 2020\nimport sys\n \nstdin = sys.stdin\ninf = 1 << 60\nmod = 1000000007\n \nni = lambda: int(ns())\nnin = lambda y: [ni() for _ in range(y)]\nna = lambda: list(map(int, stdin.readline().split()))\nnan = lambda y: [na() for _ in range(y)]\nnf = lambda: float(ns())\nnfn = lambda y: [nf() for _ in range(y)]\nnfa = lambda: list(map(float, stdin.readline().split()))\nnfan = lambda y: [nfa() for _ in range(y)]\nns = lambda: stdin.readline().rstrip()\nnsn = lambda y: [ns() for _ in range(y)]\nncl = lambda y: [list(ns()) for _ in range(y)]\nnas = lambda: stdin.readline().split()\n\ns = ns()\nn = len(s)\nflag = True\nif s != reversed(s):\n flag = False\nfor i in range((n - 1) // 2):\n p = (n - 1) // 2\n if s[i] != s[p - i - 1]:\n flag = False\n\nfor i in range((n + 3) // 2 - 1, n):\n p = n\n if s[i] != s[p - i - 1]:\n flag = False\n\nprint("Yes" if flag else "No")', 'import sys\n\nstdin = sys.stdin\ninf = 1 << 60\nmod = 1000000007\n\nni = lambda: int(ns())\nnin = lambda y: [ni() for _ in range(y)]\nna = lambda: list(map(int, stdin.readline().split()))\nnan = lambda y: [na() for _ in range(y)]\nnf = lambda: float(ns())\nnfn = lambda y: [nf() for _ in range(y)]\nnfa = lambda: list(map(float, stdin.readline().split()))\nnfan = lambda y: [nfa() for _ in range(y)]\nns = lambda: stdin.readline().rstrip()\nnsn = lambda y: [ns() for _ in range(y)]\nncl = lambda y: [list(ns()) for _ in range(y)]\nnas = lambda: stdin.readline().split()\n\ns = ns()\nn = len(s)\n\ndef is_palind(s):\n if s != \'\'.join(reversed(s)):\n return False\n return True\n\nflag = True\nif not is_palind(s):\n flag = False\nif not is_palind(s[:(n - 1) // 2]):\n flag = False\n\nprint("Yes" if flag else "No")'] | ['Wrong Answer', 'Accepted'] | ['s139478168', 's526117760'] | [3064.0, 3064.0] | [18.0, 17.0] | [967, 850] |
p02730 | u536685012 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["s = input()\n\nn = len(s)\n\nans = 0\n\ns1 = s[:int((n - 1) / 2)]\ns2 = s[int((n + 3) / 2) - 1:]\n\ns5 = s[::-1]\n\ns3 = s1[::-1]\ns4 = s2[::-1]\n\nprint(s5, s3, s4)\nif s1 == s3:\n ans += 1\n\nif s2 == s4:\n ans += 1\n\nif s == s5:\n ans += 1\n\nif ans == 3:\n print('Yes')\nelse:\n print('No')\n", "s = input()\n\nn = len(s)\n\nans = 0\n\ns1 = s[:int((n - 1) / 2)]\ns2 = s[int((n + 3) / 2) - 1:]\n\ns5 = s[::-1]\n\ns3 = s1[::-1]\ns4 = s2[::-1]\n\n#print(s5, s3, s4)\nif s1 == s3:\n ans += 1\n\nif s2 == s4:\n ans += 1\n\nif s == s5:\n ans += 1\n\nif ans == 3:\n print('Yes')\nelse:\n print('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s325795552', 's161980347'] | [3064.0, 3064.0] | [17.0, 17.0] | [284, 285] |
p02730 | u537070292 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["s=input()\nn=len(s)\n\ndef kaibun(s):\n i = 0\n ans = True\n while i < n-1-i:\n if s[i] != s[len(s)-1-i]:\n ans = False\n return ans\n break\n i += 1\n return ans\n\nans_total = kaibun(s)\n\nzenhan = s[:n//2]\nkouhan = s[n//2:]\n\nans_zen = kaibun(zenhan)\nans_kou = kaibun(kouhan)\n\nif ans_total == True and ans_zen == True and ans_kou == True:\n print('Yes')\nelse:\n print('No')", "s=input()\nn=len(s)\n\ndef kaibun(string):\n index = 0\n ans = True\n while i < n-1-i:\n if s[i] != s[n-1-i]:\n ans = False\n return ans\n break\n index += 1\n return ans\n\nans_total = def(s)\n\nzenhan = s[:n//2]\nkouhan = s[n//2:]\n\nans_zen = def(zenhan)\nans_kou = def(kouhan)\n\nif ans_total == True and ans_zen == True and ans_kou == True:\n print('Yes')\nelse:\n print('No')", "s = input()\nn = len(s)\nzen = s[:n // 2]\n\nkou= s[n // 2 + 1:]\n\ns_rev = s[::-1]\n\nzen_rev = zen[::-1]\nkou_rev = kou[::-1]\n\nif s == s_rev and zen == zen_rev and kou == kou_rev:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s129027392', 's750253865', 's020351582'] | [3064.0, 3064.0, 3060.0] | [17.0, 18.0, 17.0] | [384, 383, 207] |
p02730 | u540627185 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ["S = input()\nN = len(S)\n\nprint(S == ''.join(list(reversed(S))) and\nS[0:int((N-1)/2)] == ''.join(list(reversed(S[0:int((N-1)/2)]))) and\nS[int((N+3)/2):-1] == ''.join(list(reversed(S[int((N+3)/2):-1]))))", "S = input()\nN = len(S)\n\nresult = (S == ''.join(list(reversed(S))) and\nS[0:int((N-1)/2)] == ''.join(list(reversed(S[0:int((N-1)/2)]))) and\nS[int((N+3)/2):-1] == ''.join(list(reversed(S[int((N+3)/2):-1]))))\n\nprint('Yes') if result == True else print('No')"] | ['Wrong Answer', 'Accepted'] | ['s397818441', 's785259224'] | [3064.0, 3064.0] | [19.0, 17.0] | [200, 253] |
p02730 | u546165262 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['from itertools import combinations\nN, M = map(int, input().split())\n\na = list(combinations(range(N), 2))\nb = list(combinations(range(M), 2))\nprint(len(a)+len(b))', 'S = str(input())\nN = len(S)\nnum = (N-1)/2\nnum1 = (N+2)/2\nif(S[:int(num)]==S[int(num1):]):\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s445103059', 's230162556'] | [3060.0, 2940.0] | [29.0, 17.0] | [161, 128] |
p02730 | u548492494 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['s = input()\nn = len(s)\na = int((n-1)/2)\nb = int((n+3)/2)\nif n>0:\n x=s[:a]\n y = s[b-1:]\n print(x,y)\n if x==x[::-1] and y==y[::-1]:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")', 's = input()\nn = len(s)\na = int((n-1)/2)\nb = int((n+3)/2)\nx=s[:a]\ny = s[b-1:]\nif x==x[::-1] and y==y[::-1] and s==s[::-1]:\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Accepted'] | ['s007670080', 's017521910'] | [3060.0, 3060.0] | [18.0, 19.0] | [210, 157] |
p02730 | u548545174 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['\nimport sys\nS = input()\nN = len(S)\n \nif S == S[::-1]:\n if S[0:(N-1)//2] == S[0:(N-1)//2:-1]:\n if S[((N+3)//2)-1:N] == S[((N+3)//2)-1:N:-1]:\n print("Yes")\n sys.exit()\n \n \nprint("No")', 'import sys\nS = input()\nN = len(S)\n\nif S == S[::-1]:\n if S[0:(N-1)/2] == S[0:(N-1)/2][::-1]:\n if S[((N+3)/2)-1:N] == S[((N+3)/2)-1:N][::-1]:\n print("Yes")\n sys.exit()\n\n\nprint("No")', 'S = input()\n\nwords = []\nwords.append(S)\nwords.append(S[:(N-1)//2])\nwords.append(S[(N+3)//2 - 1:])\n\nans = all([word == word[::-1] for word in words])\n\nprint("Yes" if ans else "No")', 'S = input()\nN = len(S)\n\nwords = []\nwords.append(S)\nwords.append(S[:(N-1)//2])\nwords.append(S[(N+3)//2 - 1:])\n\nans = all([word == word[::-1] for word in words])\n\nprint("Yes" if ans else "No")'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s283588089', 's760375173', 's829805400', 's334775581'] | [3060.0, 3060.0, 3064.0, 3060.0] | [17.0, 17.0, 18.0, 17.0] | [213, 211, 179, 190] |
p02730 | u549278479 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['letter = str(input())\nN = len(letter)\n\nl_1 = letter[:int((N-1)/2)]\nl_2 = letter[int((N+3)/2-1):]\n\nif(l == l[::-1] and l_1 == l_1[::-1] and l_2 == l_2[::-1]):\n ans = "Yes"\nelse:\n ans = "No"\n# print(l_1)\n# print(l_2)\n\nprint(ans)\n', 'letter = str(input())\nN = len(letter)\n\nl_1 = letter[:int((N-1)/2)]\nl_2 = letter[int((N+3)/2-1):]\n\nif(letter == letter[::-1] and l_1 == l_1[::-1] and l_2 == l_2[::-1]):\n ans = "Yes"\nelse:\n ans = "No"\n# print(l_1)\n# print(l_2)\n\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s309992920', 's240285203'] | [3064.0, 3060.0] | [17.0, 18.0] | [233, 243] |
p02730 | u550708243 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['def reverse(s):\n return s[::-1]\n\n\ndef isPalindrome(s):\n # Calling reverse function\n rev = reverse(s)\n\n # Checking if both string are equal or not\n if (s == rev):\n return True\n return False\n\n\nS = input()\nif len(S)%2==1:\n if isPalindrome(S):\n a = S[0: int((len(S) - 1) / 2)]\n b = S[int((len(S)+3)/2-1): len(S)]\n if isPalindrome(a) and isPalindrome(S):\n print("YES")\n else:\n print("NO")\n else:\n print("NO")\nelse:\n print("NO")', 'def reverse(s):\n return s[::-1]\n\n\ndef isPalindrome(s):\n # Calling reverse function\n rev = reverse(s)\n\n # Checking if both string are equal or not\n if (s == rev):\n return True\n return False\n\n\nS = input()\nif isPalindrome(S):\n a = S[0: int((len(S) - 1) / 2)]\n b = S[int((len(S)+3)/2-1): len(S)]\n if isPalindrome(a) and isPalindrome(S):\n print("YES")\n else:\n print("NO")\nelse:\n print("NO")', "n = input()\nx = len(n)\n\nif n == n[::-1]:\n if n[:((x-1)//2)] == n[:((x-1)//2)][::-1]:\n if n[((x+3)//2)-1:] == n[((x+3)//2)-1:][::-1]:\n print('Yes')\n else:\n print('No')\n else:\n print('No')\nelse:\n print('No')"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s620819976', 's659826702', 's205604277'] | [3064.0, 3064.0, 3064.0] | [18.0, 18.0, 18.0] | [513, 439, 257] |
p02730 | u552004554 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['#!/usr/bin/env python3\n# -*- coding: utf-8 -*-*-\n\nfrom sys import stdin\n\n\ndef main():\n S = stdin.readline()\n # S = S[0:-1]\n N = len(S)\n\n if len(S) % 2 == 0:\n print(\'No\')\n return\n\n \n for i in range(len(S) // 2):\n if S[i] != S[-i - 1]:\n print(\'No\')\n return\n\n \n\n if S[0:N // 2 ] != S[N // 2 + 1:]:\n print(\'No\')\n return\n # output\n print("Yes")\n\n\nif __name__ == "__main__":\n main()\n', 'from sys import stdin\n\ndef is_kaibun(S):\n for i in range(len(S) // 2):\n if S[i] != S[-i - 1]:\n print(\'No\')\n return False\n return True\n\n\ndef main():\n S = (stdin.readline()).replace(\'\\n\', \'\')\n N = len(S)\n\n if len(S) % 2 == 0:\n print(\'No\')\n return\n\n \n if not is_kaibun(S): return\n\n \n\n for c in [S[0:N // 2], S[N // 2 + 1:]]:\n if not is_kaibun(c): return\n\n # output\n print("Yes")\n\n\nif __name__ == "__main__":\n main()'] | ['Wrong Answer', 'Accepted'] | ['s170518936', 's099749321'] | [3064.0, 3064.0] | [18.0, 17.0] | [522, 553] |
p02730 | u552533086 | 2,000 | 1,048,576 | A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome. | ['s = input()\n\ns1 = s[:int((len(s))/2)]\ns2 = s[int((len(s)+3)/2)-1:]\n\nprint(s1)\nprint(s2)\nif s[::] == s[::-1] and s1 == s1[::-1] and s2 == s2[::-1]:\n print("Yes")\nelse:\n\tprint("No")', 's = input()\n\ns1 = s[:int((len(s))/2)]\ns2 = s[int((len(s)+3)/2)-1:]\n\nif s[::] == s[::-1] and s1 == s1[::-1] and s2 == s2[::-1]:\n print("Yes")\nelse:\n\tprint("No")'] | ['Wrong Answer', 'Accepted'] | ['s817531233', 's590448038'] | [3060.0, 3060.0] | [18.0, 17.0] | [182, 162] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.