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 | u136090046 | 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 = int(input())\nprint((n/3)**3)', 's = input()\nn = len(s)\nss = s[:(n - 1) // 2]\nsss = s[(n + 3) // 2 - 1:]\nflag = True;\nfor i in range(len(s)//2):\n if s[i] != s[n - 1 - i]:\n flag = False\nif not flag:\n print("No")\n exit()\n\nfor i in range(len(ss)//2):\n if ss[i] != ss[len(ss) - 1 - i]:\n flag = False\nif not flag:\n print("No")\n exit()\n\nfor i in range(len(sss)//2):\n if sss[i] != sss[len(sss) - 1 - i]:\n flag = False\nif not flag:\n print("No")\n exit()\nprint("Yes")\n'] | ['Runtime Error', 'Accepted'] | ['s803879356', 's549419039'] | [2940.0, 3064.0] | [17.0, 17.0] | [32, 473] |
p02730 | u136843617 | 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 judge(s):\n n = len(s)\n check = 0\n for i in range(n):\n check = int(s[i]!=s[-1-i])\n \n n2 = n//2\n for i in range(n2):\n check = int(s[i] != s[n2 - i])\n \n n3 = (n+1)//2\n for i in range(n3):\n check = int(s[n3] != s[-1-i])\n \n if check >0:\n print("No")\n else:\n print("Yes")\n\ns = list(input())\njudge(s)', 's = list(input())\njudge = 0\nn = len(s)\nif s != s[-1::-1]:\n judge +=1\n\nif s[0:(n-1)//2] != s[(n-3)//2::-1]:\n judge +=1\n\nif s[(n+1)//2:n] != s[n-1:(n-1)//2:-1]:\n judge +=1\n\nif judge >0:\n print("No")\nelse:\n print("Yes")'] | ['Wrong Answer', 'Accepted'] | ['s927666600', 's924987532'] | [3064.0, 3064.0] | [17.0, 17.0] | [379, 231] |
p02730 | u140168076 | 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)\ntemp = S[0:(N-1)/2]\ntemp2 = S[(N+2)/2:N]\nprint("Yes") if temp == temp[::-1] and temp2 == temp2[::-1] else "No"', 'S = input()\nS=str(S)\nN = len(S)\ntemp = S[0:(N-1)/2]\ntemp2 = S[(N+2)/2:N]\nprint("Yes") if temp == temp[::-1] and temp2 == temp2[::-1] else "No"', 'S = input()\nN = len(str(S))\ntemp = S[0:(N-1)/2]\ntemp2 = S[(N+2)/2:N]\nprint("Yes") if temp == temp[::-1] and temp2 == temp2[::-1] else "No"', 's = input()\nif s == s[::-1]:\n flag = True\nelse:\n flag = False\nN = len(s)\nif flag:\n new = s[0:int((N-1)/2)]\n if new == new[::-1]:\n flag = True\n else: flag = False\n\nif flag:\n new = s[int((N+2)/2):N]\n if new == new[::-1]:\n flag = True\n else:\n flag = False\n\nif flag:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s375931770', 's799358490', 's950325880', 's354227269'] | [2940.0, 3064.0, 2940.0, 3064.0] | [17.0, 17.0, 18.0, 17.0] | [133, 142, 138, 346] |
p02730 | u140480594 | 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(str(input()))\nprint(S[-3:], S[:3])\nif S == list(reversed(S)) and S[-3:] == list(reversed(S[-3:])) and S[:3] == list(reversed(S[:3])):\n print("Yes")\nelse:\n print("No")', 'S = list(str(input()))\n\nreq1 = int((len(S) - 1) / 2) + 1\nreq2 = int((len(S) + 3) / 2) - 2\nif S == list(reversed(S)) and S[req1:] == list(reversed(S[req1:])) and S[req2:] == list(reversed(S[req2:])):\n print("Yes")\nelse:\n print("No")', 'S = list(str(input()))\n\nreq1 = int((len(S) - 1) / 2)\nreq2 = int((len(S) + 3) / 2) - 1\nif S == list(reversed(S)) and S[:req1] == list(reversed(S[:req1])) and S[req2:] == list(reversed(S[req2:])):\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s437403098', 's791586442', 's757051937'] | [3060.0, 3060.0, 3060.0] | [18.0, 18.0, 17.0] | [177, 233, 229] |
p02730 | u143051858 | 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()\nk1 = ''\nk2 = ''\nfor i in range(0,(len(S) - 1) // 2):\n k1 += S[i]\nfor i in range(((len(S) + 3) // 2) - 1, len(S)):\n k2 += S[i]\nprint(k1)\nprint(k2)\nif k1 == k1[::-1] and k2 == k2[::-1] and 3 <= len(S) <= 99:\n print('Yes')\nelse:\n print('No')", "S = input()\nk1 = ''\nk2 = ''\nfor i in range(0,(len(S) - 1) // 2):\n k1 += S[i]\nfor j in range(((len(S) + 3) // 2) - 1, len(S)):\n k2 += S[j]\nif k1 == k1[::-1] and k2 == k2[::-1] and 3 <= len(S) <= 99 and len(S) % 2 == 1 and S == S[::-1]:\n print('Yes')\nelse:\n print('No')\n#print(k2)"] | ['Wrong Answer', 'Accepted'] | ['s747340393', 's900508452'] | [3064.0, 3064.0] | [17.0, 17.0] | [254, 282] |
p02730 | u150027030 | 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()\ndef kaibun_check(bun):\n if bun == bun[::-1]\n return True\n else:\n return False\nif kaibun_check(S):\n if kaibun_check(S[:len(S)/2]):\n print(Yes)\n else:\n print(No)\nelse:\n print(No)', 'S = input()\ndef kaibun_check(bun):\n if bun == bun[::-1]:\n return True\n else:\n return False\nif kaibun_check(S):\n idx = int((len(S) -1)/2)\n if kaibun_check(S[:idx]):\n print("Yes")\n else:\n print("No")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s833964894', 's434358918'] | [2940.0, 3060.0] | [17.0, 18.0] | [231, 262] |
p02730 | u153259685 | 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[0:(n-1)/2]\ns2=s[(n+1)/2: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)\ns1=s[0:(n-3)/2]\ns2=s[(n+1)/2:n-1]\nif s==s[::-1] and s1==s1[::-1] and s2==s2[::-1]:\n print("Yes")\nelse:\n print("No")', 's=input()\nn=len(s)\nn1=(n-1)/2\nn2=(n+1)/2\ns1=s[0:n1]\ns2=s[n2: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)\ns1=s[0:(n-1)//2]\ns2=s[(n+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', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s263873441', 's446446343', 's701950692', 's868957028'] | [3060.0, 3064.0, 3060.0, 2940.0] | [18.0, 18.0, 18.0, 17.0] | [134, 136, 146, 137] |
p02730 | u155659281 | 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 ispalindrome(str): return 1 if str == str[::-1] else 0\nS = input()\nN = len(S)\n\ni1 = int((N-1)/2)\ni2 = int((N+3)/2)-1\nstrong = True\nprint(S[:i1], S[i2:])\nif not ispalindrome(S):\n strong = False\nif not ispalindrome(S[:i1]):\n strong = False\nif not ispalindrome(S[i2:]):\n strong = False\n\nif strong:\n print('Yes')\nelse:\n print('No')\n ", "def ispalindrome(str): return 1 if str == str[::-1] else 0\nS = input()\nN = len(S)\n\ni1 = int((N-1)/2)\ni2 = int((N+3)/2)-1\nstrong = True\nif not ispalindrome(S):\n strong = False\nif not ispalindrome(S[:i1]):\n strong = False\nif not ispalindrome(S[i2:]):\n strong = False\n\nif strong:\n print('Yes')\nelse:\n print('No')\n "] | ['Wrong Answer', 'Accepted'] | ['s705099648', 's279733391'] | [3064.0, 3064.0] | [17.0, 17.0] | [341, 319] |
p02730 | u155679478 | 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 n_str = (len(s) - 1) // 2\n return s[: n_str][::-1] == s[-n_str: ]\n\nresult = "Yes" if is_palindrome(s) and is_palindrome(s[: (len(s)-1)//2]) and is_palindrome(s[(len(s)+3)//2:]) else "No"\nprint(result)', 's = input()\n\ndef is_palindrome(s):\n return s == s[::-1]\n\nresult = "Yes" if is_palindrome(s) and is_palindrome(s[: (len(s)-1)//2]) and is_palindrome(s[(len(s)+3)//2-1:]) else "No"\nprint(result)'] | ['Wrong Answer', 'Accepted'] | ['s543927990', 's395257190'] | [3060.0, 3060.0] | [17.0, 17.0] | [238, 193] |
p02730 | u157876329 | 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(string): return 1 if string==string[::-1] else 0\n\nkaibun=input()\n\nN=len(kaibun)\nA=kaibun[0:int((N-1)/2)]\nB=kaibun[int((N+3)/2-1):int(N)]\n\n\nif palindrome(A) & palindrome(B):\n print('YES')\nelse:\n print('NO')", "def palindrome(string): return 1 if string==string[::-1] else 0\n\nkaibun=input()\n\nN=len(kaibun)\nA=kaibun[0:int((N-1)/2)]\nB=kaibun[int((N+3)/2-1):int(N)]\n\n\nif palindrome(kaibun) & palindrome(A) & palindrome(B):\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s331370859', 's992252163'] | [3060.0, 3060.0] | [18.0, 18.0] | [226, 247] |
p02730 | u159144188 | 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 check(a):\n for i in range(int(len(a)/2)):\n if a[i]!=a[-(i+1)]:\n return False\n return True\n\nS=input()\nif kaibun(S):\n a=S[0:int(len(S)/2)]\n b=S[int(len(S)/2)+1:len(S)]\n if kaibun(a) and kaibun(b):\n print('Yes')\n else:\n print('No')\nelse:\n print('No')", "def check(a):\n for i in range(int(len(a)/2)):\n if a[i]!=a[-(i+1)]:\n return False\n return True\n \nS=input()\nif check(S):\n a=S[0:int(len(S)/2)]\n b=S[int(len(S)/2)+1:len(S)]\n if check(a) and check(b):\n print('Yes')\n else:\n print('No')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s456511252', 's708479598'] | [9088.0, 9132.0] | [25.0, 29.0] | [275, 273] |
p02730 | u159717036 | 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 n=len(s)\n a=s[0:n//2]\n b=s[n//2:n]\n\n #return True\n #return False\n\ns = input()\nn = len(s)\nif kaibun(s) and kaibun(s[0:(n-1)//2]) and kaibun(s[(n+3)//2-1:n]):\n print('Yes')\nelse:\n print('No')\n ", "def kaibun(s):\n if s==s[::-1]:\n return True\n else:\n return False\ns = input()\nn = len(s)\nif kaibun(s) and kaibun(s[0:(n-1)//2]) and kaibun(s[(n+3)//2-1:n]):\n print('Yes')\nelse:\n print('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s099115311', 's038377909'] | [2940.0, 2940.0] | [18.0, 18.0] | [231, 215] |
p02730 | u163320134 | 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 judge(s):\n for i in range(len(s)//2):\n if s[i]!=s[-(i+1)]:\n return False\n else:\n return True\n\ns=input()\nif judge(s)==False:\n print('No')\nelse:\n if judge(s[:(len(s)-1)//2])==False:\n print('No')\n else:\n if judge(s[(len(s)+3)//2:])==False:\n print('No')\n else:\n print('Yes')", "def judge(s):\n for i in range(len(s)//2):\n if s[i]!=s[-(i+1)]:\n return False\n else:\n return True\n\ns=input()\nprint(s[:(len(s)-1)//2],s[(len(s)+3)//2-1:])\nif judge(s)==False:\n print('No')\nelse:\n if judge(s[:(len(s)-1)//2])==False:\n print('No')\n else:\n if judge(s[(len(s)+3)//2-1:])==False:\n print('No')\n else:\n print('Yes')", "def judge(s):\n for i in range(len(s)//2):\n if s[i]!=s[-(i+1)]:\n return False\n else:\n return True\n\ns=input()\nif judge(s)==False:\n print('No')\nelse:\n if judge(s[:(len(s)-1)//2])==False:\n print('No')\n else:\n if judge(s[(len(s)+3)//2-1:])==False:\n print('No')\n else:\n print('Yes')"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s039598624', 's350919203', 's973140839'] | [3064.0, 3064.0, 3064.0] | [17.0, 17.0, 18.0] | [309, 356, 311] |
p02730 | u163894803 | 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. | ['print("input")\nS = input()\nch = list(S)\nnum = len(S)\nn1 = int((num-1)/2)\nresult = str("Yes")\ni = int(0)\nj = int(0)\nwhile i < n1:\n if ch[i] == ch[n1-1-i]:\n i = i+1\n else:\n result = str("No")\n break\nif result == "Yes":\n while j < n1:\n if ch[num - n1+j] == ch[num - j-1]:\n j = j+1\n else:\n result = str("No")\n break\nprint(result)\n', 'S = input()\nch = list(S)\nnum = len(S)\nn1 = int((num-1)/2)\nresult = str("Yes")\ni = int(0)\nj = int(0)\nk = int(0)\nwhile i < n1:\n if ch[i] == ch[n1-1-i]:\n i = i+1\n else:\n result = str("No")\n break\nif result == "Yes":\n while j < n1:\n if ch[num - n1+j] == ch[num - j-1]:\n j = j+1\n else:\n result = str("No")\n break\nif result == "Yes":\n while k < num:\n if ch[k] == ch[num-1-k]:\n k = k + 1\n else:\n result = str("No")\n break\nprint(result)'] | ['Wrong Answer', 'Accepted'] | ['s376786131', 's310558273'] | [3064.0, 3064.0] | [17.0, 17.0] | [403, 555] |
p02730 | u164029270 | 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)\nSd = S[:(N-1)//2]\nSdd = S[(N+1)//2:N]\nprint(Sd,Sdd)\nif S == S[::-1] and Sd == Sd[::-1] and Sdd == Sdd[::-1]:\n print("Yes")\nelse:\n print("No")', 'S = input()\nN = len(S)\nSd = S[:(N-1)//2]\nSdd = S[(N+1)//2:N]\nif S == S[::-1] and Sd == Sd[::-1] and Sdd == Sdd[::-1]:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s751446911', 's610345682'] | [3060.0, 2940.0] | [17.0, 17.0] | [170, 156] |
p02730 | u165268875 | 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()\nN = len(S)\n\nprint("Yes" if len(set(S[:(N-1)//2])) == 2 and len(set(S[(N+3)//2:])==2 else "No")\n', '\nS = input()\nN = len(S)\n\nS1 = S[:(N-1)//2]\nS2 = S[(N+3)//2 - 1:]\n\nprint("Yes" if S1 == sorted(S1)[::-1] and S2== sorted(S2)[::-1] else "No")\n', '\nS = input()\nN = len(S)\n\nS1 = S[:(N-1)/2]\nS2 = S[(N+3)/2:]\n\nprint("Yes" if S1 == sorted(S1)[::-1] and S2== sorted(S2)[::-1] else "No")\n', '\nS = input()\nN = len(S)\n\nprint("Yes" if S[:(N-1)/2]== sorted(S)[:(N-1)/2:-1] and S[(N+3)/2:]== sorted(S)[(N+3)/2::-1] else "No")\n', '\nS = input()\nN = len(S)\n\nS1 = S[:(N-1)//2]\nS2 = S[(N+3)//2 - 1:]\n\nprint("Yes" if S == S[::-1] and S1 == S1[::-1] and S2== S2[::-1] else "No")\n'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s157803099', 's374193850', 's479527015', 's808552580', 's329877693'] | [2940.0, 2940.0, 3060.0, 2940.0, 2940.0] | [17.0, 18.0, 19.0, 17.0, 17.0] | [108, 141, 135, 129, 142] |
p02730 | u165436807 | 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)\nP = 0\nfor i in range (N-1//2):\n if S[i] == S[N-1-i]:\n for k in range(N-1//2):\n if S[k] == S[((N-1)//2)-k] and S[((N+1)//2)+k] == S[N-1-k]:\n P = P\n else:\n P += 1\n else:\n P += 1\n\nif P == 0:\n print('Yes')\nelse:\n print('No')\n", "S = input()\nN = len(S)\nP = 0\nfor i in range ((N-1)//2):\n if S[i] == S[N-1-i]:\n for k in range((N-1)//2):\n if S[k] == S[((N-3)//2)-k] and S[((N+1)//2)+k] == S[N-1-k]:\n P = P\n else:\n P += 1\n else:\n P += 1\n\nif P == 0:\n print('Yes')\nelse:\n print('No')\n"] | ['Runtime Error', 'Accepted'] | ['s249900806', 's593467706'] | [3060.0, 3060.0] | [19.0, 18.0] | [330, 326] |
p02730 | u172296140 | 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. | ["class atcorder:\n \n S=list(input())\n inv=list(reversed(S))\n i=0\n j=0\n if S==inv:\n i+=1\n \n N=int((len(S)-1)/2)\n for x in range(N-1):\n if S[x]==S[N-1-x] and inv[x]==inv[N-1-x]:\n pass\n else:\n j+=1\n \n if j==0 and i==1:\n print('yes')\n else:\n print('no')", "class atcorder:\n \n S=list(input())\n inv=list(reversed(S))\n i=0\n j=0\n if len(S)%2==0:\n pass\n else:\n if S==inv:\n i+=1\n N=int((len(S)-1)/2)\n for x in range(N-1):\n if S[x]==S[N-1-x] and inv[x]==inv[N-1-x]:\n pass\n else:\n j+=1\n \n if j==0 and i==1:\n print('yes')\n else:\n print('no')", "class atcorder:\n \n S=list(input())\n inv=list(reversed(S))\n i=0\n j=0\n if len(S)%2==0:\n pass\n else:\n if S==inv:\n i+=1\n N=int((len(S)-1)/2)\n for x in range(N-1):\n if S[x]==S[N-1-x] and inv[x]==inv[N-1-x]:\n pass\n else:\n j+=1\n \n if j==0 and i==1:\n print('yes')\n else:\n print('no')\n ", "class atcorder:\n \n S=list(input())\n inv=list(reversed(S))\n i=0\n j=0\n if S==inv:\n i+=1\n \n N=int((len(S)-1)/2)\n for x in range(N-1):\n if S[x]==S[N-1-x] and inv[x]==inv[N-1-x]:\n pass\n else:\n j+=1\n \n if j==0 and i==1:\n print('Yes')\n else:\n print('No')"] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s025828865', 's136938940', 's305033095', 's186053208'] | [3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 18.0, 17.0, 18.0] | [356, 426, 439, 356] |
p02730 | u175590965 | 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()\na = s[::-1]\nb = (s[0:((len(s)-1)//2])\nc = (s[((len(s)*3)//2:-1])\nif s == a and b == c:\n print("Yes")\nelse:\n print("No")', 's = input()\nn = len(s)\na = s[0:(n-1)//2]\nb = s[(n+3)//2:n]\nif s ==s[::-1] and a == a[::-1] and b == b[::-1] :\n print("Yes")\nelse:\n print("No")', 's = input()\nn = len(s)\na = s[0:(n-1)//2]\nb = s[(n+3)//2-1:n]\nif s == s[::-1] and a == a[::-1] and b == b[::-1]:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s345060571', 's545343612', 's466957499'] | [2940.0, 3060.0, 9020.0] | [18.0, 17.0, 32.0] | [137, 148, 151] |
p02730 | u178806894 | 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 circ_check(s):\n s_rev=s[::-1]\n n=len(s)\n print(s,s_rev[0:int((n-1)/2)],s[0:int((n-1)/2)])\n if s_rev[0:int((n-1)/2)] ==s[0:int((n-1)/2)]:\n s_check=1\n else:\n s_check=0\n return(s_check) \n\n \nif n<7:\n print('No')\nelif int((n-1)/2)%2==1:\n res1=circ_check(s)\n res2=circ_check(s[0:int((n-1)/2)])\n res3=circ_check(s[int((n-1)/2+1):len(s)])\n if res1*res2*res3==1:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')\n ", "s=input()\nn=len(s)\n\ndef circ_check(s):\n s_rev=s[::-1]\n n=len(s)\n print(s,s_rev[0:int((n-1)/2)],s[0:int((n-1)/2)])\n if s_rev[0:int((n-1)/2)] ==s[0:int((n-1)/2)]:\n s_check=1\n else:\n s_check=0\n return(s_check) \n\n \nif int((n-1)/2)%2==1:\n res1=circ_check(s)\n res2=circ_check(s[0:int((n-1)/2)])\n res3=circ_check(s[int((n-1)/2+1):len(s)])\n if res1*res2*res3==1:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')", "s=input()\nn=len(s)\n\ndef circ_check(s):\n s_rev=s[::-1]\n n=len(s)\n if n%2==1:\n half_n=int((n-1)/2)\n else:\n half_n=int(n/2)\n print(s_rev[0:half_n],s[0:half_n])\n if s_rev[0:half_n] ==s[0:half_n]:\n s_check=1\n else:\n s_check=0\n return(s_check) \n\n\nres1=circ_check(s)\nres2=circ_check(s[0:int((n-1)/2)])\nres3=circ_check(s[int((n-1)/2+1):len(s)])\nif res1*res2*res3==1:\n print('Yes')\nelse:\n print('No')", "s=input()\nn=len(s)\n\ndef circ_check(s):\n s_rev=s[::-1]\n n=len(s)\n print(s_rev[0:int((n-1)/2)],s[0:int((n-1)/2)])\n if s_rev[0:int((n-1)/2)] ==s[0:int((n-1)/2)]:\n s_check=1\n else:\n s_check=0\n return(s_check) \n\n \nif n%4==3:\n res1=circ_check(s)\n res2=circ_check(s[0:int((n-1)/2)])\n res3=circ_check(s[int((n-1)/2+1):len(s)])\n if res1*res2*res3==1:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')", "s=input()\nn=len(s)\n\ndef circ_check(s):\n s_rev=s[::-1]\n n=len(s)\n if n%2==1:\n half_n=int((n-1)/2)\n else:\n half_n=int(n/2)\n if s_rev[0:half_n] ==s[0:half_n]:\n s_check=1\n else:\n s_check=0\n return(s_check) \n\n\nres1=circ_check(s)\nres2=circ_check(s[0:int((n-1)/2)])\nres3=circ_check(s[int((n-1)/2+1):len(s)])\nif res1*res2*res3==1:\n print('Yes')\nelse:\n print('No')\n \n"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s043136080', 's461746146', 's558592720', 's935736697', 's836007331'] | [3064.0, 3188.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0, 17.0, 17.0] | [501, 474, 449, 461, 416] |
p02730 | u179376941 | 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. | ["w = input()\nl = len(w)\nflag = True\nfor i in range((l - 1)/2):\n if w[i] != w[l - i - 1]:\n flag = False\n break\nmid = (l - 1)/2\nmid_mid = mid // 2\nfor i in range(mid_mid + 1):\n if w[i] != w[mid - i - 1] or not flag:\n flag = False\n break\n if w[i + mid + 1] != w[l - i - 1]:\n flag = False\n break\nif flag:\n print('Yes')\nelse:\n print('No')", "w = input()\nl = len(w)\nflag = True\nfor i in range((l - 1)//2):\n if w[i] != w[l - i - 1]:\n flag = False\n break\nmid = (l - 1) // 2\nmid_mid = mid // 2\nfor i in range(mid_mid + 1):\n if w[i] != w[mid - i - 1] or not flag:\n flag = False\n break\n if w[i + mid + 1] != w[l - i - 1]:\n flag = False\n break\nif flag:\n print('Yes')\nelse:\n print('No')\n"] | ['Runtime Error', 'Accepted'] | ['s017517844', 's403188855'] | [9112.0, 9004.0] | [25.0, 26.0] | [355, 360] |
p02730 | u180528413 | 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()\nprint('Yes' if s == s[-1:-1] else 'No')", "def res(s):\n n = len(s)\n s_ = s[0:(n-1)//2]\n s__ = s[(n+3)//2-1:n]\n if s == s[-1::-1]:\n if s_ == s_[-1::-1]:\n if s__ == s__[-1::-1]:\n return 'Yes'\n return 'No'\n\ns = input()\nprint(res(s))"] | ['Wrong Answer', 'Accepted'] | ['s875546606', 's118359706'] | [2940.0, 3060.0] | [17.0, 52.0] | [51, 234] |
p02730 | u185405877 | 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()\nz=len(s)//2\nflag=0\nsd=s[0:z-1]\nif sd==s[z+1:len(s)-1]:\n if sd==sd[::-1]:\n flag=1\nif flag==1:\n print("Yes")\nelse:\n print("No")', 's= input()\nz=len(s)//2\nflag=0\nsd=s[0:z-1]\nif sd==s[z+1:len(s)-1]:\n if sd==sd[::-1]:\n flag=1\nif flag==1:\n print("Yes")\nelse:\n print("No")', 's= input()\nz=len(s)//2\nflag=0\nsd=s[0:z-1]\nif len(s)==3:\n if s[0]==s[2]:\n flag=1\nelse:\n if sd==s[z+1:len(s)-1]:\n if sd==sd[::-1]:\n flag=1\nif flag==1:\n print("Yes")\nelse:\n print("No")', 's= input()\nz=len(s)//2\nflag=0\nsd=s[0:z]\nif len(s)==3:\n if s[0]==s[2]:\n flag=1\nelse:\n if sd==s[z+1:len(s)]:\n if sd==sd[::-1]:\n flag=1\nif flag==1:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s190166815', 's220316923', 's810628664', 's473983305'] | [3060.0, 3060.0, 3060.0, 3060.0] | [17.0, 17.0, 18.0, 17.0] | [152, 152, 218, 214] |
p02730 | u186530241 | 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(\n "Yes"\n if (\n is_palindrome(s)\n and is_palindrome(s[: int((n - 1) / 2)])\n and is_palindrome(s[int((n + 3) / 2) - 1 :])\n )\n else "No"\n)\n', 'def is_palindrome(s: str) -> bool:\n return s[::-1] == s\n\ns = input()\nn = len(s)\nprint(\n "Yes"\n if (\n is_palindrome(s)\n and is_palindrome(s[: int((n - 1) / 2)])\n and is_palindrome(s[int((n + 3) / 2) - 1 :])\n )\n else "No"\n)\n'] | ['Runtime Error', 'Accepted'] | ['s646313762', 's380451941'] | [2940.0, 3188.0] | [17.0, 18.0] | [178, 238] |
p02730 | u188827677 | 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\nif s != s[::-1]:\n print("No")\n exit()\n \nx = s[:((len(s)-1)//2)]\nif x != x[::-1]:\n print("No")\n exit()\n \ny = s[((len(s)+3)//2-1):]\nprint(y)\nif y != y[::-1]:\n print("No")\n exit()\n\nprint("Yes")', 's = input()\n\nif s != s[::-1]:\n print("No")\n exit()\n \nx = s[:((len(s)-1)//2)]\nif x != x[::-1]:\n print("No")\n exit()\n \ny = s[((len(s)+3)//2-1):]\nif y != y[::-1]:\n print("No")\n exit()\n\nprint("Yes")'] | ['Wrong Answer', 'Accepted'] | ['s975034512', 's700330375'] | [3064.0, 3064.0] | [17.0, 17.0] | [211, 202] |
p02730 | u190178779 | 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\nS = input()\n\nif not S.islower():sys.exit()\nif not ( 3 <= len(S) <= 99 and len(S) % 2 == 1 ): sys.exit()\nfirst = int((len(S)-1)/2)\nF = S[0:first]\nsecond = int((len(S)+3)/2)\nS = S[second-1:]\n\nif F[0:int((len(F)-1)/2)] == F[int((len(F)+3)/2):][::-1] and S[0:int((len(S)-1)/2)] == S[int((len(S)+3)/2):][::-1]:\n print('Yes')\nelse:\n print('No')\n", "import sys\nS = input()\n\nif not S.islower():sys.exit()\nif not ( 3 <= len(S) <= 99 and len(S) % 2 == 1 ): sys.exit()\n\n# whole check\nfirst = int((len(S)-1)/2)\nF = S[0:first]\nlast = int((len(S)+3)/2)\nL = S[last-1:]\ncondition = 0\nif S == S[::-1]:\n condition += 1\nif F == F[::-1]:\n condition += 1\nif L == L[::-1]:\n condition += 1\n\nprint('Yes') if condition == 3 else print('No')"] | ['Wrong Answer', 'Accepted'] | ['s876645911', 's151424015'] | [9148.0, 9144.0] | [28.0, 28.0] | [356, 381] |
p02730 | u194228880 | 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 check(s):\n print("check:{}".format(s))\n n = len(s)\n n2 = int(n/2)\n if n < 3 or n%2 == 0:\n return False\n for i in range(0,n2):\n ni = n-i\n if s[i:i+1] != s[ni-1:ni]:\n return False\n return True\n\ns = input(\'\')\nif check(s):\n \n n2 = int((len(s)-1)/2)\n s2 = s[0:n2]\n print("n:{} s:{}".format(n2,s2))\n if check(s2):\n \n n3 = int((len(s)+3)/2)\n s3 = s[n3-1:]\n print("n:{} s:{}".format(n3,s3))\n if check(s3):\n print(\'Yes\')\n else:\n print(\'No\')\n else:\n print(\'No\')\nelse:\n print(\'No\')\n', 'import math\ndef check(s):\n #print("check:{}".format(s))\n n = len(s)\n n2 = math.ceil(n/2)\n# if n == 1:\n# return False\n for i in range(0,n2):\n ni = n-i\n if s[i:i+1] != s[ni-1:ni]:\n return False\n return True\n\ns = input(\'\')\nif check(s):\n \n n2 = math.ceil((len(s)-1)/2)\n s2 = s[0:n2]\n# print("n:{} s:{}".format(n2,s2))\n if check(s2):\n \n n3 = math.ceil((len(s)+3)/2)\n s3 = s[n3-1:]\n# print("n:{} s:{}".format(n3,s3))\n if check(s3):\n print(\'Yes\')\n else:\n print(\'No\')\n else:\n print(\'No\')\nelse:\n print(\'No\')\n'] | ['Wrong Answer', 'Accepted'] | ['s716863040', 's084287805'] | [3064.0, 3064.0] | [18.0, 18.0] | [626, 650] |
p02730 | u197610362 | 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)\nl = int((n-1)/2)\nb = int((n+3)/2)\n\nfor i in range(l - int(l/2)):\n print(s[i])\n print(s[l-1-i])\n if not s[i] == s[l-1-i]:\n print('No')\n exit()\n\nfor i in range(n-b - int((n-b)/2)):\n print(s[b-1+i])\n print(s[n-1-i])\n if not s[b-1+i] == s[n-1-i]:\n print('No')\n exit()\n\nfor i in range(int(n/2)):\n if not s[i] == s[n-1-i]:\n print('No')\n exit()\n\nprint('Yes')\n", "s = input()\n\nn = len(s)\nl = int((n-1)/2)\nb = int((n+3)/2)\n\nfor i in range(l - int(l/2)):\n if not s[i] == s[l-1-i]:\n print('No')\n exit()\n\nfor i in range(n-b - int((n-b)/2)):\n if not s[b-1+i] == s[n-1-i]:\n print('No')\n exit()\n\nfor i in range(int(n/2)):\n if not s[i] == s[n-1-i]:\n print('No')\n exit()\n\nprint('Yes')\n"] | ['Wrong Answer', 'Accepted'] | ['s626890403', 's319001855'] | [3064.0, 3064.0] | [17.0, 18.0] | [439, 363] |
p02730 | u198058633 | 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=int((len(s)-1)/2)\ns1 = s[:l]\ns2 = s[l+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()\nl=int((len(s)-1)/2)\ns1 = s[:l]\ns2 = s[l+1:]\nif(s==s[::-1] and s1==s1[::-1] and s2==s2[::-1]):\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s468428208', 's293608892'] | [3060.0, 3060.0] | [17.0, 19.0] | [158, 144] |
p02730 | u198905553 | 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\nS_reverse = \'\'.join(list(reversed(S)))\nindex = int((len(S) - 1) / 2)\nindex2 = int((len(S[:index]) - 1) / 2)\n\nS_reverse_child = \'\'.join(list(reversed(S[:index])))\n\nif S[:index] == S_reverse[:index]:\n if len(S[:index2]) >= 3 and S[:index2] == S_reverse_child[:index2]:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")', 'S = input()\n \ndef ispalindrome(s):\n h = int(len(s) / 2)\n for a, b in zip(s[:h], reversed(s[h+1:])):\n if a != b: return 0\n return 1\n \nindex = int((len(S) - 1) / 2)\n \nif ispalindrome(S) == 1:\n if ispalindrome(S[:index]) == 1:\n if len(S[:index]) >= 3:\n print("Yes")\n else:\n if len(S[:index]) == 1 and S[0] == S[2]:\n print("Yes")\n else:\n print("No")\n else:\n print("No")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s503372292', 's758634648'] | [3064.0, 3064.0] | [18.0, 19.0] | [341, 441] |
p02730 | u199441105 | 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 = list(input())\nif len(a)%4 != 3:\n print("No")\n exit()\nelse:\n b = a\n b.reverse()\n x = int((len(a)-1)/2)\n for i in range(x):\n if a[i] != b[i]:\n print("No")\n exit()\n c = a[:x]\n d = a[x+1:]\n print(c,d)\n y = int((len(c)-1)/2)\n for i in range(y):\n if c[i] != c[len(c)-i-1] or d[i] != d[len(c)-i-1]:\n print("No")\n exit()\n print("Yes")', 'a = list(input())\nif len(a)%4 != 3:\n print("No")\n exit()\nelse:\n b = a\n b.reverse()\n x = int((len(a)-1)/2)\n for i in range(x):\n if a[i] != b[i]:\n print("No")\n exit()\n c = a[:x]\n d = a[x+1:]\n print(c,d)\n y = int((len(c)-1)/2)\n for i in range(y):\n if c[i] != c[len(c)-i-1] and d[i] != d[len(c)-i-1]:\n print("No")\n exit()\n print("Yes")', 'import copy\na = list(input())\nif len(a) == 5:\n print("No")\n exit()\nelse:\n b = copy.copy(a)\n b.reverse()\n x = int((len(a)/2))\n for i in range(x):\n if a[i] != b[i]:\n print("No")\n exit()\n c = a[:x]\n d = a[x+1:]\n y = int((len(c)/2))\n for i in range(y):\n if c[i] != c[-(i+1)] or d[i] != d[-(i+1)]:\n print("No")\n exit()\n print("Yes")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s071271884', 's523969095', 's946061580'] | [9092.0, 9080.0, 9288.0] | [27.0, 27.0, 38.0] | [368, 369, 364] |
p02730 | u200228637 | 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\nif s[0:(n-1)/2] == s[(n+3)/2:]:\n print("Yes")\nelse:\n print("No")', 's = input()\nd = len(s)//2\nprint("Yes" if s[:d] == s[d+1:] "No" else)', 's = input()\nd = len(s)//2\nprint("Yes" if s[:d] == s[d+1:] "No" else)', 's = input()\nd = len(s)//2\nprint("Yes" if s[:d] == s[d+1:] else "No")'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s370954532', 's617555175', 's929162892', 's365374251'] | [2940.0, 2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0, 18.0] | [90, 68, 68, 68] |
p02730 | u201387466 | 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\ninput=sys.stdin.readline\nS = list(input())\nn0 = len(S)\ns1 = S[0:n0 //2 ]\ns2 = S[n0 // 2 +1:n0]\nc = 0\nn1 = len(s1)\nfor i in range(n1):\n if s1[i] != s2[i]:\n c = 1\n break\nif c == 0:\n print("Yes")\nelse:\n print("No")\n ', 'import sys\ninput=sys.stdin.readline\nS = list(input())\nn0 = len(S)\ndef kaibun(S):\n c = 0\n N = len(S)\n n = N // 2\n for i in range(n):\n if S[i] != S[N-1-i]:\n c = 1\n break\n return c\nif kaibun(S) == 0:\n s1 = S[0:n0 //2 ]\n s2 = S[n0 // 2 +1:n0]\n if kaibun(s1) == 0 and kaibun(s2) == 0:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")', 'import sys\ninput=sys.stdin.readline\nS = list(input())\nn0 = len(S)\ndef kaibun(S):\n if S == S[::-1]:\n return 1\n else:\n return 0\nif kaibun(S) == 1:\n s1 = S[0:n0 // 2]\n if kaibun(s1) == 1 :\n print("Yes")\n else:\n print("No")\nelse:\n print("No")', 'import sys\ninput=sys.stdin.readline\nS = list(input())\nn0 = len(S)\nif n0 == 3:\n print("No")\nelse:\n\n def kaibun(S):\n c = 0\n N = len(S)\n n = N // 2\n for i in range(n):\n if S[i] != S[N-1-i]:\n c = 1\n break\n return c\n if kaibun(S) == 0:\n s1 = S[0:n0 //2 ]\n s2 = S[n0 // 2 +1:n0]\n print(s1)\n print(s2)\n if kaibun(s1) == 0 and kaibun(s2) == 0:\n print("Yes")\n else:\n print("No")\n else:\n print("No")', 'import sys\ninput=sys.stdin.readline\nS = list(input())\nn0 = len(S)\nif n0 == 3:\n print("No")\nelse:\n\n def kaibun(S):\n if S == S[::-1]:\n return 1\n else:\n return 0\n if kaibun(S) == 1:\n s1 = S[0:n0 //2 ]\n s2 = S[n0 // 2 +1:n0]\n if kaibun(s1) == 1 and kaibun(s2) == 1:\n print("Yes")\n else:\n print("No")\n else:\n print("No")\n ', 'import sys\ninput=sys.stdin.readline\nS = list(input())\nn0 = len(S)\ndef kaibun(S):\n if S == S[::-1]:\n return 1\n else:\n return 0\nif kaibun(S) == 1:\n s1 = S[0:n0 //2 ]\n s2 = S[n0 // 2 +1:n0]\n if kaibun(s1) == 1 and kaibun(s2) == 1:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")', 'import sys\ninput=sys.stdin.readline\nS = input()[:-1]\nn = len(S)\ndef kaibun(S):\n if S == S[::-1]:\n return 1\n else:\n return 0\nif kaibun(S) == 0:\n print("No")\nelse:\n s1 = S[0:n // 2]\n if kaibun(s1) == 1:\n print("Yes")\n else:\n print("No")\n'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s127553098', 's610470010', 's700652426', 's728389415', 's839084685', 's984907571', 's869640838'] | [3060.0, 3064.0, 3060.0, 3064.0, 3060.0, 3064.0, 3060.0] | [18.0, 17.0, 17.0, 17.0, 17.0, 17.0, 18.0] | [234, 403, 284, 548, 425, 329, 281] |
p02730 | u201986772 | 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=list(input())\nn=len(a)\nb=a[:int((n-1)/2)+1]\nc=a[int((n+3)/2):]\n\nanal = a==reversed(a)\nmanco = b==reversed(b)\nportio = c==reversed(c)\n \nif anal and manco and portio:\n print('Yes')\nelse:\n print('No')", "s=list(input())\nn=len(s)\na=all([p==q for p,q in zip(s,reversed(s))])\nb=all([p==q for p,q in zip(s[:(n-1)//2],reversed(s[:(n-1)//2]))])\nc=all([p==q for p,q in zip(s[(n+3)//2-1:],reversed(s[(n+3)//2-1:]))])\n\nif a and b and c:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s666782469', 's562055646'] | [3064.0, 9080.0] | [17.0, 29.0] | [201, 258] |
p02730 | u202539075 | 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. | ['string_values = list(input())\nsize = len(string_values)\nhalf_size = int((size - 1) / 2)\nhalf_last_size = int((size + 3) / 2)\n\ncount = 0\nis_true = True\nfor string_value in string_values:\n if string_value != string_values[size - count - 1]:\n is_true = False\n if count > half_size:\n break\n count += 1\n\ncount = 0\nfor string_value in string_values:\n if string_value != string_values[half_size - count - 1]:\n is_true = False\n if count + 1 == half_size:\n break\n count += 1\n\ncount = 0\ncheck_count = 0\nfor string_value in string_values:\n if count + 1 < half_last_size:\n count += 1\n continue\n if string_value != string_values[size - check_count - 1]:\n is_true = False\n check_count += 1\n count += 1\n\n\nanswer = "No"\nif is_true:\n answer = "Yes"\nprint(answer)\n', 'string_values = list(input())\nsize = len(string_values)\nhalf_size = int((size - 1) / 2)\nhalf_last_size = int((size + 3) / 2)\n\ncount = 0\nis_true = True\nfor string_value in string_values:\n if string_value != string_values[size - count - 1]:\n is_true = False\n if count > half_size:\n break\n count += 1\n\ncount = 0\nfor string_value in string_values:\n if string_value != string_values[half_size - count - 1]:\n is_true = False\n if count + 1 == half_size:\n break\n count += 1\n\ncount = 0\ncheck_count = 0\nfor string_value in string_values:\n if count + 1 < half_last_size:\n count += 1\n continue\n if string_value != string_values[size - check_count - 1]:\n is_true = False\n check_count += 1\n count += 1\n\n\nanswer = "No"\nif is_true:\n answer = "Yes"\nprint(answer)\n'] | ['Wrong Answer', 'Accepted'] | ['s841540185', 's102529428'] | [3064.0, 3064.0] | [18.0, 17.0] | [832, 828] |
p02730 | u202570162 | 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. | ["sel='B'\n#A\nif sel=='A':\n N,M=map(int,input().split())\n ans=0\n ans+=M*(M-1)//2\n ans+=N*(N-1)//2\n print(ans)\n\n#B\nif sel=='B':\n def ispal(s):\n for i in range(len(s)//2+1):\n if s[i]!=s[-(i+1)]:\n return False\n return True\n\n S=input()\n if ispal(S) and ispal(S[:(N-1)//2]) and ispal(S[(N+3)//2-1:]):\n print('Yes')\n else:\n print('No')\n\n#C\nif sel=='C':\n L=int(input())\n print((L**3)/27)\n\n#D\nif sel=='D': \n N=int(input())\n A=[int(i) for i in input().split()]\n kin=list(set(A))\n cnt={}\n for k in kin:\n cnt[k]=0\n for a in A:\n cnt[a]+=1\n SUM=0\n for k in kin:\n SUM+=cnt[k]*(cnt[k]-1)//2\n for a in A:\n if cnt[a]>=2:\n print(SUM-cnt[a]+1)\n else:\n print(SUM)\n \n#E\nif sel=='E':\n a=0\n\n#F\nif sel=='F':\n N,S=map(int,input().split())\n A=[int(i) for i in input().split()]\n\n for l in range(N):\n for r in range(l,N):\n print(tab[l][r])\n\n", "sel='B'\n#A\nif sel=='A':\n N,M=map(int,input().split())\n ans=0\n ans+=M*(M-1)//2\n ans+=N*(N-1)//2\n print(ans)\n\n#B\nif sel=='B':\n def ispal(s):\n for i in range(len(s)//2+1):\n if s[i]!=s[-(i+1)]:\n return False\n return True\n\n S=input()\n N=len(S)\n if ispal(S) and ispal(S[:(N-1)//2]) and ispal(S[(N+3)//2-1:]):\n print('Yes')\n else:\n print('No')\n\n#C\nif sel=='C':\n L=int(input())\n print((L**3)/27)\n\n#D\nif sel=='D': \n N=int(input())\n A=[int(i) for i in input().split()]\n kin=list(set(A))\n cnt={}\n for k in kin:\n cnt[k]=0\n for a in A:\n cnt[a]+=1\n SUM=0\n for k in kin:\n SUM+=cnt[k]*(cnt[k]-1)//2\n for a in A:\n if cnt[a]>=2:\n print(SUM-cnt[a]+1)\n else:\n print(SUM)\n \n#E\nif sel=='E':\n a=0\n\n#F\nif sel=='F':\n N,S=map(int,input().split())\n A=[int(i) for i in input().split()]\n\n for l in range(N):\n for r in range(l,N):\n print(tab[l][r])\n\n"] | ['Runtime Error', 'Accepted'] | ['s085674600', 's392488815'] | [3064.0, 3064.0] | [18.0, 17.0] | [1021, 1034] |
p02730 | u204616996 | 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 chk(s):\n n=len(s)\n for i in range(n//2):\n if s[i]!=s[n-1-i]:\n return False\nif chk(S) and chk(S[:((N-1)//2)+1]) and chk(S[(N+3)//2:]):\n print('Yes')\nelse:\n print('No')", "S=input()\nN=len(S)\ndef chk(s):\n n=len(s)\n for i in range(n//2):\n if s[i]!=s[n-1-i]:\n return False\n return True\nif chk(S) and chk(S[:((N-1)//2)]) and chk(S[(N+3)//2-1:]):\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s295110277', 's926961952'] | [3060.0, 3060.0] | [17.0, 17.0] | [201, 215] |
p02730 | u205087376 | 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)\ns1 = s[:(n-1)/2]\nif s != s[::-1] or s1 != s1[::-1]:\n print('No')\nelse:\n print('Yes')", "s = str(input())\nn = len(s)\nif ((n+1)/2)%2 != 0:\n if (s[i-1] == s[n-i] for i in range(1,(n+1)/2)) and (s[j-1] == s[((n-1)/2)-j] for j in range(1,(n+3)/4)) and (s[(n+2*k-1)/2] == s[n-k] for k in range(1,(n+3)/4)):\n print('Yes')\n else:\n print('No')\nelse:\n if (s[i-1] == s[n-i] for i in range(1,(n+1)/2)) and (s[j-1] == s[(n-2*j-1)/2] for j in range(1,(n+1)/4)) and (s[(n+2*k-1)/2] == s[n-k] for k in range(1,(n+1)/4)):\n print('Yes')\n else:\n print('No')", "s = str(input())\nn = len(s)\ns1 = s[:int((n-1)/2)]\nif s != s[::-1] or s1 != s1[::-1]:\n print('No')\nelse:\n print('Yes')\n"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s378648176', 's769207376', 's621291259'] | [2940.0, 3064.0, 2940.0] | [17.0, 17.0, 18.0] | [114, 466, 120] |
p02730 | u207850265 | 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 check_palindrome(s):\n n = len(s)\n return all([s[i] == s[n - 1 - i] for i in range(n // 2)])\n\n\ndef main():\n s = input()\n n = len(s)\n print(check_palindrome(s) and check_palindrome(s[:n // 2]))\n\n\nmain()\n', "def check_palindrome(s):\n n = len(s)\n return all([s[i] == s[n - 1 - i] for i in range(n // 2)])\n\n\ndef main():\n s = input()\n n = len(s)\n print('Yes' if check_palindrome(s) and check_palindrome(s[:n // 2]) else 'No')\n\n\nmain()\n"] | ['Wrong Answer', 'Accepted'] | ['s037936186', 's158186920'] | [2940.0, 2940.0] | [17.0, 17.0] | [210, 229] |
p02730 | u209313313 | 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 S = S[::-1] and S[0:(N-3)/2] = S[0:(N-3)/2:-1]:\n print ('Yes')\nelse:\n print ('No')", "S = input()\nN = len(S)\nK = (N-3)//2\nif S == S[::-1] and S[0:K] == S[0:K:-1]:\n print ('Yes')\nelse:\n print ('No')", "S = input()\nN = len(S)\nif S == S[::-1] and S[0:(N-3)//2] == S[0:(N-3)//2:-1]:\n print ('Yes')\nelse:\n print ('No')", "S = input()\nN = len(S)\nK = (N-1)//2\nif S == S[::-1] and S[0:K] == S[0:K:-1]:\n print ('Yes')\nelse:\n print ('No')", "S = input()\nN = len(S)\nK = (N-3)//2\nif S == S[::-1] and S[0:K] == S[K:0]:\n print ('Yes')\nelse:\n print ('No')", "S = input()\nN = len(S)\nif S == S[::-1] and S[0:(N-3)//2] == S[0:(N-3)//2:-1] and S[(N+1)//2:N-1] == S[(N+1)//2:N-1:-1]:\n print ('Yes')\nelse:\n print ('No')", "S = input()\nN = len('S')\nif S == S[::-1] and S[0:(N-3)/2] == S[0:(N-3)/2:-1]:\n print ('Yes')\nelse:\n print ('No')", "S = input()\nN = len(S)\nif S == S[::-1] and S[0:(N-3)//2] == S[0:(N-3)//2:-1]:\n print ('Yes')\nelse:\n print ('No')", "S = input()\nN = len('S')\nif S = S[::-1] and S[0:(N-3)/2] = S[0:(N-3)/2:-1]:\n print ('Yes')\nelse:\n print ('No')", "S = str(input())\nN = len(S)\nif S == S[::-1] and S[0:(N-3)//2] == S[0:(N-3)//2:-1] and S[(N+1)//2:N-1] == S[(N+1)//2:N-1:-1]:\n print ('Yes')\nelse:\n print ('No')", "\nS = input()\nN = len(S)\nif S == S[::-1] and S[0:(N-3)/2] == S[0:(N-3)/2:-1]:\n print ('Yes')\nelse:\n print ('No')", "S = input()\nN = len(S)\nif S = S[::-1] and S[0:(N-3)/2] = S[0:(N-3)/2:-1]:\n print ('Yes')\nelse:\n print ('No')", "S = input()\nN = int(len(S))\nif S == S[::-1] and S[0:(N-3)//2] == S[0:(N-3)//2:-1] and S[(N+1)//2:N-1] == S[(N+1)//2:N-1:-1]:\n print ('Yes')\nelse:\n print ('No')", "S = input()\nN = len(S)\nK = (N-3)//2\nif S == S[::-1] and S[0:K] == S[K:0:-1]:\n print ('Yes')\nelse:\n print ('No')"] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s050249590', 's082640712', 's155025124', 's225607092', 's413344788', 's489028749', 's528981386', 's578509706', 's611278442', 's618700318', 's650594048', 's680260999', 's853102283', 's322789503'] | [3064.0, 3064.0, 2940.0, 2940.0, 2940.0, 3060.0, 3060.0, 2940.0, 2940.0, 3060.0, 2940.0, 3064.0, 3060.0, 3060.0] | [17.0, 18.0, 18.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 18.0] | [103, 117, 118, 117, 114, 160, 118, 118, 116, 165, 117, 114, 165, 117] |
p02730 | u209426189 | 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 checkStr(str):\n n = len(str)\n if n % 2 == 0:\n for i in range(int(n/2)):\n if str[i] != str[n-i-1]:\n return False\n else:\n for i in range(int((n-1)/2)):\n if str[i] != str[n-i-1]:\n return False\n return True\n\n\ns = input()\nprint(checkStr(s[0:int((len(s)-1)/2)]) and checkStr(s) and checkStr(s[int((len(s)+3)/2)-1:]))', "def checkStr(str):\n n = len(str)\n if n % 2 == 0:\n for i in range(int(n/2)):\n if str[i] != str[n-i-1]:\n return False\n else:\n for i in range(int((n-1)/2)):\n if str[i] != str[n-i-1]:\n return False\n return True\n\n\ns = input()\nif checkStr(s[0:int((len(s)-1)/2)]) and checkStr(s) and checkStr(s[int((len(s)+3)/2)-1:]):\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s810588809', 's888779245'] | [3064.0, 3064.0] | [17.0, 19.0] | [348, 380] |
p02730 | u209559874 | 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. | ['palindrom = input()\nif palindrom != palindrom[::-1]:\n return "No"\nn = (len(palindrom)-1)/2\nif palindrom[:n] != palindrom[:n:-1]:\n return "No"\nn2 = (len(palindrom)+3)/2\nif palindrom[:n2] != palindrom[:n2:-1]:\n return "No"\nelse\n\treutn "Yes"', 'palindrom = input()\nif palindrom != palindrom[::-1]:\n\treturn "No"\nn = (len(palindrom)-1)/2\nif palindrom[:n] != palindrom[:n:-1]:\n\treturn "No"\nn2 = (len(palindrom)+3)/2\nif palindrom[:n2] != palindrom[:n2:-1]:\n\treturn "No"\nelse\n\treturn "Yes"', 'palindrom = str(input())\nif palindrom != palindrom[::-1]:\n return "No"\nelse:\n return "Yes"', 'palindrom = input()\nif palindrom != palindrom[::-1]:\n return "No"\nn = (len(palindrom)-1)/2\nif palindrom[:n] != palindrom[:n:-1]:\n return "No"\nn2 = (len(palindrom)+3)/2\nif palindrom[:n2] != palindrom[:n2:-1]:\n return "No"\nelse:\n return "Yes"', 's=list(input())\nN=len(s)\ns2=s[:(N-1)//2]\ns3=s[((N+3)-1)//2:N+1]\nif s==list(reversed(s)) and s2==list(reversed(s2)) and s3==list(reversed(s3)):\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s514527062', 's677718349', 's947035418', 's973352874', 's242318618'] | [2940.0, 2940.0, 2940.0, 2940.0, 3060.0] | [18.0, 17.0, 17.0, 17.0, 17.0] | [241, 239, 92, 244, 177] |
p02730 | u212263866 | 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 check_str( ss ):\n sslen = len(ss)\n \n #ccnt = 0\n #for c in ss:\n # if( ss[0] == c ):\n # ccnt+=1\n \n if( sslen == ccnt ):\n return False\n \n return (ss[:sslen//2] == ss[sslen//2+1:][::-1])\n \ns = input()\n\nslen = len(s)\n\nif( not check_str( s ) ):\n print( "No" )\nelse:\n#print(s[:slen//2])\n#print(s[slen//2+1:][::-1])\n\n s1 = s[:slen//2]\n s2 = s[slen//2+1:]\n \n \n if( (not check_str( s1 )) or (not check_str( s2 )) ):\n print( "No" )\n else:\n print( "Yes" )\n\n#s1 = s[:len(s)-1]\n\n#s1\n', 'def check_str( ss ):\n sslen = len(ss)\n \n if( sslen %2 == 0 ): \n return (ss[:sslen//2] == ss[sslen//2:][::-1])\n else:\n \treturn (ss[:sslen//2] == ss[sslen//2+1:][::-1])\n \ns = input()\n\nslen = len(s)\n\nif( not check_str( s ) ):\n print( "No" )\nelse:\n#print(s[:slen//2])\n#print(s[slen//2+1:][::-1])\n\n s1 = s[:slen//2]\n s2 = s[slen//2+1:]\n \n \n if( (not check_str( s1 )) or (not check_str( s2 )) ):\n print( "No" )\n else:\n print( "Yes" )\n\n#s1 = s[:len(s)-1]\n\n#s1\n\n'] | ['Runtime Error', 'Accepted'] | ['s607900713', 's311284759'] | [3060.0, 3060.0] | [17.0, 18.0] | [506, 477] |
p02730 | u215341636 | 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()\nlength = len(s)\nans = ''\n\ndef solver(string):\n if string==string[::-1]:\n return 'Yes'\n else:\n return 'No'\n\nans = solver(s)\nans = solver(s[:int((length - 1) / 2 - 1)])\nans = solver(s[int((length - 3) / 2 - 1) :])\n\nprint(ans)", 's = input()\nn = len(s) \nans = "No"\nif s[:n//2] == s[:n//2][::-1]:\n if s[-n//2 + 1:] == s[-n//2 + 1:][::-1]:\n if s == s[::-1]:\n ans = "Yes"\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s160528175', 's069315489'] | [3060.0, 2940.0] | [17.0, 17.0] | [243, 171] |
p02730 | u217303170 | 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=len(s)\nx=n//2\na=s[0:x]\nb=s[x+1:]\nif a==b:print('Yes')\nelse:print('No')", "s=input()\nn=len(s)\nx=n//2\na=s[0:x]\nb=s[x+1:]\nif a==b:print('Yes')\nelse:print('No')"] | ['Runtime Error', 'Accepted'] | ['s873595261', 's807241124'] | [9048.0, 8908.0] | [24.0, 28.0] | [72, 82] |
p02730 | u218838821 | 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\nif S = S[::-1]:\n if S[:(n-1)//2] == S [(n+1)//2:]:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")', 'S = input()\nN = len(S)\n\nif S == S[::-1]:\n if S[:(n-1)//2] == S [(n+1)//2:]:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")', 'S = input()\nN = len(S)\n\nif S == S[::-1]:\n if S[:(N-1)//2] == S [(N+1)//2:]:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s557056897', 's989294264', 's345205480'] | [8904.0, 9104.0, 9108.0] | [28.0, 28.0, 26.0] | [136, 137, 137] |
p02730 | u220114950 | 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())\ndef isPalin(l,r):\n if l >= r:\n return True\n if s[l]!=s[r]:\n return False:\n return isPalin(l+1,r-1)\nn = len(s)\nif isPalin(0,n-1) and isPalin(0,n//2-1) and isPalin(n//2+1,n-1):\n print('Yes')\nelse:\n print('No')", "s=str(input())\ndef isPalin(l,r):\n if l >= r:\n return True\n if s[l]!=s[r]:\n return False\n return isPalin(l+1,r-1)\nn = len(s)\nif isPalin(0,n-1) and isPalin(0,n//2-1) and isPalin(n//2+1,n-1):\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s940482519', 's558529885'] | [2940.0, 3060.0] | [17.0, 17.0] | [233, 232] |
p02730 | u221149873 | 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()\ndef is_palindrome(s):\n return s == s[::-1]\n\ns_len = len(s)\nif is_palindrome(s):\n print(s[:(s_len-1)//2])\n if is_palindrome(s[:(s_len-1)//2]): \n print(s[(s_len+3)//2-1:])\n if is_palindrome(s[(s_len+3)//2-1:]):\n print("Yes")\nelse:\n print("No")', 's = input()\ndef is_palindrome(s):\n return s == s[::-1]\n\ns_len = len(s)\nif is_palindrome(s) and is_palindrome(s[:(s_len-1)//2]) and is_palindrome(s[(s_len+3)//2-1:]):\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Accepted'] | ['s129260613', 's682062461'] | [3060.0, 2940.0] | [17.0, 17.0] | [293, 208] |
p02730 | u221272125 | 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)\np = (n-1)//2\nq = (n+3)//2 - 1\nA = S[:p]\nB = S[q:]\nans = 'Yes'\nfor i in range(len(S)):\n if S[i] != S[-i-1]:\n ans = 'No\nfor i in range(len(A)):\n if A[i] != A[-i-1]:\n ans = 'No'\nfor i in range(len(B)):\n if B[i] != B[-i-1]:\n ans = 'No'\nprint(ans)\n", "S = input()\nn = len(S)\np = (n-1)//2\nq = (n+3)//2 - 1\nA = S[:p]\nB = S[q:]\nans = 'Yes'\nfor i in range(len(A)):\n if A[i] != A[-i-1]:\n ans = 'No'\nfor i in range(len(B)):\n if B[i] != B[-i-1]:\n ans = 'No'", "S = input()\nn = len(S)\np = (n-1)//2\nq = (n+3)//2 - 1\nA = S[:p]\nB = S[q:]\nans = 'Yes'\nfor i in range(len(S)):\n if S[i] != S[-i-1]:\n ans = 'No'\nfor i in range(len(A)):\n if A[i] != A[-i-1]:\n ans = 'No'\nfor i in range(len(B)):\n if B[i] != B[-i-1]:\n ans = 'No'\nprint(ans)\n"] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s415827609', 's612748909', 's043168888'] | [2940.0, 3064.0, 3064.0] | [18.0, 18.0, 18.0] | [296, 218, 297] |
p02730 | u222668979 | 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())\ns_f = s[0: (len(s) - 1) // 2]\ns_b = s[(len(s) + 3) // 2 - 1:len(s)]\n\nif (s != s[::-1]) or (s_f != s_f[::-1]) or (s_b != s_b[::-1]):\n print('No')\nelse:\n print('Yes')\n\nprint(s_f, s_b)\n", "s = list(input())\ns_f = s[0: (len(s) - 1) // 2]\ns_b = s[(len(s) + 3) // 2 - 1:len(s)]\n\nif (s != s[::-1]) or (s_f != s_f[::-1]) or (s_b != s_b[::-1]):\n print('No')\nelse:\n print('Yes')\n"] | ['Wrong Answer', 'Accepted'] | ['s401763871', 's652354740'] | [3060.0, 3060.0] | [18.0, 17.0] | [206, 189] |
p02730 | u224119985 | 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)\nfor i in range(n):\n if not s[i]==s[n-1-i]:\n print('No')\n quit()\nfor i in range(int(n*(n-1)/2)):\n if not s[i]==s[int((n*(n-1))/2)-1-i]:\n print('No')\n quit()\nfor i in range(int(n*(n-1)/2)):\n if not s[int(n*(n+3)/2)-1+i]==s[n-1-i]:\n print('No')\n quit()\nelse:\n print('Yes')", "s=input()\nn=len(s)\nfor i in range(n):\n if not s[i]==s[n-1-i]:\n print('No')\n quit()\nfor i in range((n-1)//2):\n if not s[i]==s[(n-1)//2-1-i]:\n print('No')\n quit()\nfor i in range((n-1)//2):\n if not s[(n+3)//2-1+i]==s[n-1-i]:\n print('No')\n quit()\nprint('Yes')"] | ['Runtime Error', 'Accepted'] | ['s690858078', 's373305019'] | [3064.0, 3064.0] | [18.0, 18.0] | [342, 306] |
p02730 | u224554402 | 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\na= input()\nlength=math.floor(len(a)/2)\ndef kaibun(p):\n length_p=math.floor(len(p)/2)\n total_p = 0\n for i in range(length_p):\n if p[i] is not p[-1*i -1]:\n return False\n break\n else:\n total_p += 1\n if total_p == length_p:\n return True\nif kaibun(a):\n if kaibun(a[:length+1]):\n print('Yes')\n elif length==1:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')\n\n", "import math\na= input()\nlength=math.floor(len(a)/2)\ndef kaibun(p):\n length_p=math.floor(len(p)/2)\n total_p = 0\n for i in range(length_p):\n if p[i] is not p[-1*i -1]:\n return False\n break\n else:\n total_p += 1\n if total_p == length_p:\n return True\nif kaibun(a):\n if kaibun(a[:length]):\n print('Yes')\n elif length==1:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')\n\n "] | ['Wrong Answer', 'Accepted'] | ['s906415153', 's860258749'] | [3064.0, 3064.0] | [18.0, 18.0] | [477, 476] |
p02730 | u226108478 | 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\n\ndef main():\n import sys\n input = sys.stdin.readline\n\n s = input()\n n = len(s)\n\n if s == s[::-1]:\n t = s[:(n - 1) // 2]\n u = s[(n + 3) // 2 - 1:]\n\n if t == t[::-1] and u == u[::-1]:\n print('Yes')\n else:\n print('No')\n else:\n print('No')\n\n\nif __name__ == '__main__':\n main()\n", "# -*- coding: utf-8 -*-\n\n\ndef main():\n s = input()\n n = len(s)\n\n if s == s[::-1]:\n t = s[:(n - 1) // 2]\n u = s[(n + 3) // 2 - 1:]\n\n if t == t[::-1] and u == u[::-1]:\n print('Yes')\n else:\n print('No')\n else:\n print('No')\n\n\nif __name__ == '__main__':\n main()\n"] | ['Wrong Answer', 'Accepted'] | ['s515728129', 's837284471'] | [3060.0, 2940.0] | [18.0, 17.0] | [376, 329] |
p02730 | u229156891 | 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. | ['if s == s[::-1]:\n \n p = int((n-1)/2)\n f = s[:p]\n if f == f[::-1]:\n \n q = int((n+3)/2)\n l = s[q-1:]\n if l == l[::-1]:\n print("Yes")\n else:\n print("No")\n else:\n print("No")\nelse:\n print("No")', 's = input()\nn = len(s)\n\nif s == s[::-1]:\n \n p = int((n-1)/2)\n f = s[:p]\n if f == f[::-1]:\n \n q = int((n+3)/2)\n l = s[q-1:]\n if l == l[::-1]:\n print("Yes")\n else:\n print("No")\n else:\n print("No")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s130016311', 's862750957'] | [3060.0, 3060.0] | [17.0, 18.0] | [291, 315] |
p02730 | u229518917 | 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)\nans='No'\nif S==list(reversed(S)):\n new=S[0:((n-1)//2)]\n if new==list(reversed(new)):\n new2=S[((n+3)//2):N+1]\n if new2==list(reversed(new2)):\n ans='Yes'\nprint(ans)", "S=list(input())\nn=len(S)\nans='No'\nif S==list(reversed(S)):\n new=S[0:((n-1)//2)]\n if new==list(reversed(new)):\n new2=S[((n+3)//2):n+1]\n if new2==list(reversed(new2)):\n ans='Yes'\nprint(ans)", "S=list(input())\nn=len(S)\nans='NO'\nif S==list(reversed(S)):\n new=S[0:((n-1)//2)]\n if new==list(reversed(new)):\n new2=S[((n+3)//2):N+1]\n if new2==list(reversed(new2)):\n ans='YES'\nprint(ans)", "S=list(input())\nn=len(S)\nans='No'\nif S==list(reversed(S)):\n new=S[0:((n-1)//2)]\n if new==list(reversed(new)):\n new2=S[((n+3)//2)-1:]\n if new2==list(reversed(new2)):\n ans='Yes'\nprint(ans)"] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s261090066', 's942191487', 's967483518', 's762084054'] | [3064.0, 3064.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0, 17.0] | [218, 218, 218, 217] |
p02730 | u233254147 | 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 checkPalindrome(str1, str2):\n for i in range(len(str1) // 2):\n if str1[i] != str2[i]:\n return False\n return True\n \ns = input()\nrs = ''.join(list(reversed(s)))\nprint(s, rs)\ncri1 = checkPalindrome(s, rs)\n\ns2 = s[:len(s) // 2]\nrs2 = ''.join(list(reversed(s2)))\nprint(s2, rs2)\ncri2 = checkPalindrome(s2, rs2)\n\ns3 = s[len(s) // 2 + 1:len(s)]\nrs3 = ''.join(list(reversed(s3)))\nprint(s3, rs3)\ncri3 = checkPalindrome(s3, rs3)\n\nif cri1 and cri2 and cri3:\n print('Yes')\nelse:\n print('No')\n", "def checkPalindrome(str1, str2):\n for i in range(len(str1) // 2):\n if str1[i] != str2[i]:\n return False\n return True\n \ns = input()\nrs = ''.join(list(reversed(s)))\ncri1 = checkPalindrome(s, rs)\n\ns2 = s[:len(s) // 2]\nrs2 = ''.join(list(reversed(s2)))\ncri2 = checkPalindrome(s2, rs2)\n\ns3 = s[len(s) // 2 + 1:len(s)]\nrs3 = ''.join(list(reversed(s3)))\ncri3 = checkPalindrome(s3, rs3)\n\nif cri1 and cri2 and cri3:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s844834795', 's913919582'] | [3064.0, 3064.0] | [18.0, 18.0] | [498, 454] |
p02730 | u239528020 | 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\nimport copy\n\ns = list(str(input()))\nN = len(s)\n\n\ndef disc(s):\n s1 = s[:len(s)//2]\n s2 = s[len(s)+1//2:]\n s2.reverse()\n if s1 == s2:\n return True\n else:\n return False\n\n\nif disc(s) and disc(s[:(N-1)//2]) and disc(s[(N+3)//2-1:]):\n print("Yes")\nelse:\n print("No")\n', '#!/usr/bin/env python3\n\nimport copy\n\ns = list(str(input()))\nN = len(s)\n\n\ndef disc(s):\n s1 = s[:len(s)//2]\n s2 = s[len(s)//2+1:]\n s2.reverse()\n\n if s1 == s2:\n return True\n else:\n return False\n\n\nprint(s)\nprint(s[:(N-1)//2])\nprint(s[(N+3)//2-1:])\n\nif disc(s) and disc(s[:(N-1)//2]) and disc(s[(N+3)//2-1:]):\n print("Yes")\nelse:\n print("No")\n', '#!/usr/bin/env python3\n\ns = list(str(input()))\nN = len(s)\n\n\ndef disc(s):\n s1 = s[:len(s)//2]\n s2 = s[len(s)//2:]\n s2.reverse()\n if s1 == s2:\n return True\n else:\n return False\n\n\nif disc(s) and disc(s[:(N-1)//2]) and disc(s[(N+3)//2-1:]):\n print("Yes")\nelse:\n print("No")\n', '#!/usr/bin/env python3\n\ns = list(str(input()))\nN = len(s)\n\n\ndef disc(s):\n s1 = s\n s2 = s[:]\n s2.reverse()\n if s1 == s2:\n return True\n else:\n return False\n\n\nif disc(s) and disc(s[:(N-1)//2]) and disc(s[(N+3)//2-1:]):\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s055632942', 's497835536', 's611878154', 's025870453'] | [3444.0, 3444.0, 3060.0, 2940.0] | [22.0, 22.0, 17.0, 18.0] | [320, 373, 305, 284] |
p02730 | u239917977 | 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 = list(input())\n N = len(S)\n\n kaibun_check(S)\n S1 = S[0:(N-1)//2 + 1]\n kaibun_check(S1)\n S2 = S[(N+3)//2 + 1: -1]\n kaibun_check(S2)\n\n print('Yes')\n\n\ndef kaibun_check(L):\n L_ = list(L.__reversed__())\n for s, s_ in zip(L, L_):\n if s != s_:\n print('No')\n exit()\n\n\nif __name__ == '__main__':\n main()\n", "def main():\n S = list(input())\n N = len(S)\n\n kaibun_check(S)\n\n S1 = S[0:(N-1)//2]\n kaibun_check(S1)\n\n S2 = S[(N+3)//2:-1]\n kaibun_check(S2)\n\n print('Yes')\n\n\ndef kaibun_check(L):\n L_ = list(L.__reversed__())\n for s, s_ in zip(L, L_):\n if s != s_:\n print('No')\n exit()\n\n\nif __name__ == '__main__':\n main()\n"] | ['Wrong Answer', 'Accepted'] | ['s609235935', 's962391731'] | [3064.0, 3064.0] | [17.0, 17.0] | [373, 366] |
p02730 | u244416620 | 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\nS = input()\n\ndef is_kaibun(s):\n l = len(s)\n print('former', s[:int(l/2)])\n print('latter', s[:-(int(l/2))-1:-1])\n if s[:int(l/2)] == s[:-(int(l/2))-1:-1]:\n return True\n else:\n return False\n\nif is_kaibun(S):\n if is_kaibun(S[:int((len(S)-1)/2)]):\n if is_kaibun(S[int((len(S)+3)/2)-1:]):\n print('Yes')\n exit()\nprint('No')", "\nS = input()\n\ndef is_kaibun(s):\n l = len(s)\n # print('former', s[:int(l/2)])\n # print('latter', s[:-(int(l/2))-1:-1])\n if s[:int(l/2)] == s[:-(int(l/2))-1:-1]:\n return True\n else:\n return False\n\nif is_kaibun(S):\n if is_kaibun(S[:int((len(S)-1)/2)]):\n if is_kaibun(S[int((len(S)+3)/2)-1:]):\n print('Yes')\n exit()\nprint('No')"] | ['Wrong Answer', 'Accepted'] | ['s203749346', 's188210191'] | [9108.0, 8792.0] | [27.0, 29.0] | [381, 384] |
p02730 | u244416763 | 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())\nt = s[::-1]\nif(s != t):\n print("No")\n exit\nc = ""\nfor i in range((len(s)-1)//2):\n c += s[i]\ne = c[::-1]\nif(e != c):\n print("No")\n exit()\nr = ""\nfor i in range(((len(s)+3)//2)-1,len(s),1):\n r += s[i]\ny = r[::-1]\nif(r != y):\n print("No")\n exit()\n"""\nprint("Yes")\nprint(s,t)\nprint(e,c)\nprint(r,y)', 's = str(input())\nt = s[::-1]\nif(s != t):\n print("No")\n exit()\nc = ""\nfor i in range((len(s)-1)//2):\n c += s[i]\ne = c[::-1]\nif(e != c):\n print("No")\n exit()\nr = ""\nfor i in range(((len(s)+3)//2)-1,len(s),1):\n r += s[i]\ny = r[::-1]\nif(r != y):\n print("No")\n exit()\nprint("Yes")\n"""\nprint(s,t)\nprint(e,c)\nprint(r,y)\n"""'] | ['Runtime Error', 'Accepted'] | ['s692579112', 's221191082'] | [3064.0, 3064.0] | [19.0, 17.0] | [334, 340] |
p02730 | u244423127 | 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()\n#b=reversed(a)\nc=a[0:int((len(a)-1)/2)]\nb=\'\'.join(list(reversed(a)))\n#d=reversed(a[int((len(a)+3)/2)-1:])\nd=\'\'.join(list(reversed(a[int((len(a)+3)/2)-1:])))\nprint(a,b,c,d)\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")'] | ['Wrong Answer', 'Accepted'] | ['s723085743', 's829156485'] | [3064.0, 3060.0] | [17.0, 17.0] | [251, 174] |
p02730 | u249077731 | 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()\nl = len(a)\nm = a[:l//2]\nn = a[l//2 + 1 :]\nif a[::-1] == a and m == m[::-1] and n == n[::-1]:\n print("gh")', 'a = input()\nl = len(a)\nm = a[:l//2]\nn = a[l//2 + 1 :]\nif a[::-1] == a and m == m[::-1] and n == n[::-1]:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s231669809', 's763637885'] | [9004.0, 9000.0] | [28.0, 31.0] | [120, 143] |
p02730 | u250664216 | 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 = s[:(n-1)//2]\nb = s[(n+3)//2:]\n\nif a == b and a == a[::-1]:\n print('Yes')\nelse:\n print('No')", "s = input()\nn = len(s)\na = s[:(n-1)//2]\nb = s[(n+3)//2:]\n\nif a == b and a == a[::-1] and b == b[::-1]:\n print('Yes')\nelse:\n print('No')", "s = input()\nn = len(s)\na = s[:(n-1)//2]\nb = s[(n+1)//2:]\n\nif a == b and a == a[::-1]:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s597566160', 's712151108', 's639995048'] | [3060.0, 3060.0, 3060.0] | [18.0, 17.0, 17.0] | [120, 137, 120] |
p02730 | u251024383 | 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)\nn1=((n-1)//2)\nn2=(n+3)//2\ns1=s[0:n1]\ns2=s[n2-1:]\nif s==s[::-1] and s1==s1[::-1] and s2==s2[::-1]:\n print('yes')\nelse:\n print('no')", "s=input()\nn=len(s)\nn1=((n-1)//2)\nn2=(n+3)//2\ns1=s[0:n1]\ns2=s[n2-1:]\nif s==s[::-1] and s1==s1[::-1] and s2==s2[::-1]:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s590399174', 's254710154'] | [3064.0, 3060.0] | [17.0, 17.0] | [155, 155] |
p02730 | u254221913 | 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 = False\nfor i in range(len(S)//2):\n if S[i] == S[len(S)-i]:\n flg = True\n else:\n flg = False\nfor i in range((len(S)-1) //2//2):\n if S[i] == S[(len(S)-1)//2-i]:\n pass\n else:\n flg = False\nfor i in range((len(S)-(len(S)+3)//2)//2):\n if S[i] == S[(len(S)+3)//2 -i]:\n pass\n else:\n flg = False\n\nif flg:\n print('Yes')\nelse:\n print('No')", "S = input()\nflg = False\nfor i in range(len(S)):\n if S[i] == S[len(S)-i]:\n flg = True\n else:\n flg = False\nfor i in range((len(S)-1) /2):\n if S[i] == S[(len(s)-1)/2-i]:\n pass\n else:\n flg = False\nfor i in range((len(S)+3)/2, N):\n if S[i] == S[(len(S)+3)/2) -i]:\n pass\n else:\n flg = False\n\nif flg:\n print('Yes')\nelse:\n print('No')", "s = input()\nr1 = s[::-1]\nn = len(s)\nr2 = s[0:(n-1)//2]\nr2r = r2[::-1]\nr3 = s[(n+3)//2-1:]\nr3r = r3[::-1]\nif s == r1 and r2 == r2r and r3 == r3r:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s507634776', 's746009896', 's600011664'] | [3064.0, 2940.0, 3060.0] | [18.0, 17.0, 18.0] | [410, 392, 183] |
p02730 | u259190728 | 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 sys import stdin,stdout\n\nimport bisect\n\nimport math\n\ndef st():\n return list(stdin.readline().strip())\n\ndef inp():\n return int(stdin.readline())\n\ndef li():\n return list(map(int,stdin.readline().split()))\n\ndef mp():\n return map(int,stdin.readline().split())\n\ndef pr(n):\n stdout.write(str(n)+"\\n")\n\ndef soe(limit):\n l=[1]*(limit+1)\n prime=[]\n for i in range(2,limit+1):\n if l[i]:\n for j in range(i*i,limit+1,i):\n l[j]=0\n\n for i in range(2,limit+1):\n if l[i]:\n prime.append(i)\n return prime\n\ndef segsoe(low,high):\n limit=int(high**0.5)+1\n prime=soe(limit)\n n=high-low+1\n l=[0]*(n+1)\n for i in range(len(prime)):\n lowlimit=(low//prime[i])*prime[i]\n if lowlimit<low:\n lowlimit+=prime[i]\n if lowlimit==prime[i]:\n lowlimit+=prime[i]\n for j in range(lowlimit,high+1,prime[i]):\n l[j-low]=1\n for i in range(low,high+1):\n if not l[i-low]:\n if i!=1:\n print(i)\n\ndef power(a,n):\n r=1\n while n:\n if n&1:\n r=(r*a)\n a*=a\n n=n>>1\n return r\n\n\ndef solve():\n s=input()\n n=len(s)\n a=s[:(n-1)//2]\n b=a[::-1]\n c=s[(n+3)//2:]\n d=c[::-1]\n if s==s[::-1] and a==b and c==d:\n print("Yes")\n else:\n print("No")\n\n\nfor _ in range(1):\n solve()\n \n', 'from sys import stdin,stdout\n\nimport bisect\n\nimport math\n\ndef st():\n return list(stdin.readline().strip())\n\ndef inp():\n return int(stdin.readline())\n\ndef li():\n return list(map(int,stdin.readline().split()))\n\ndef mp():\n return map(int,stdin.readline().split())\n\ndef pr(n):\n stdout.write(str(n)+"\\n")\n\ndef soe(limit):\n l=[1]*(limit+1)\n prime=[]\n for i in range(2,limit+1):\n if l[i]:\n for j in range(i*i,limit+1,i):\n l[j]=0\n\n for i in range(2,limit+1):\n if l[i]:\n prime.append(i)\n return prime\n\ndef segsoe(low,high):\n limit=int(high**0.5)+1\n prime=soe(limit)\n n=high-low+1\n l=[0]*(n+1)\n for i in range(len(prime)):\n lowlimit=(low//prime[i])*prime[i]\n if lowlimit<low:\n lowlimit+=prime[i]\n if lowlimit==prime[i]:\n lowlimit+=prime[i]\n for j in range(lowlimit,high+1,prime[i]):\n l[j-low]=1\n for i in range(low,high+1):\n if not l[i-low]:\n if i!=1:\n print(i)\n\ndef power(a,n):\n r=1\n while n:\n if n&1:\n r=(r*a)\n a*=a\n n=n>>1\n return r\n\n\ndef solve():\n s=input()\n n=len(s)\n a=s[:(n-1)//2]\n b=a[::-1]\n c=s[(n+3)//2 -1 :]\n d=c[::-1]\n \n if s==s[::-1] and a==b and c==d:\n print("Yes")\n else:\n print("No")\n\n\nfor _ in range(1):\n solve()\n \n'] | ['Wrong Answer', 'Accepted'] | ['s896111824', 's269287692'] | [9196.0, 9272.0] | [30.0, 32.0] | [1395, 1403] |
p02730 | u259268066 | 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(x):\n reverse = x[::-1]\n for i in range(len(x)):\n if (x[i] != reverse[i]):\n return False\n return True\n\nc = input()\nl = len(c)\n["No","Yes"][palindrome(c) & palindrome(c[:(l-1)//2])& palindrome(c[(l+2)//2:])]', 'def palindrome(x):\n reverse = x[::-1]\n for i in range(len(x)):\n if (x[i] != reverse[i]):\n return False\n return True\n\nc = input()\nl = len(c)\nprint(["No","Yes"][palindrome(c) & palindrome(c[:(l-1)//2])& palindrome(c[(l+2)//2:])])'] | ['Wrong Answer', 'Accepted'] | ['s350973874', 's000845855'] | [3060.0, 3060.0] | [17.0, 17.0] | [247, 254] |
p02730 | u261700262 | 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 = list(S)\nN = len(L)\n\nrevS = list(reversed(L))\nprint(revS)\n\npreS = L[:int((N - 1) / 2)]\nrevPreS = list(reversed(preS))\nprint(revPreS)\n\nbackS = L[int((N + 2) / 2):]\nrevBackS = list(reversed(backS))\nprint(revBackS)\n\nif L != revS:\n print("No")\nelif preS != revPreS:\n print("No")\nelif backS != revBackS:\n print("No")\nelse:\n print("Yes")\n', 'S = input()\nL = list(S)\nN = len(L)\n\nrevS = list(reversed(L))\n\npreS = L[:int((N - 1) / 2)]\nrevPreS = list(reversed(preS))\n\nbackS = L[int((N + 3) / 2):]\nrevBackS = list(reversed(backS))\n\nif L != revS:\n print("No")\nelif preS != revPreS:\n print("No")\nelif backS != revBackS:\n print("No")\nelse:\n print("Yes")\n', 'S = input()\nL = list(S)\nN = len(L)\n\nrevS = list(reversed(L))\n\npreS = L[:int((N - 1) / 2)]\nrevPreS = list(reversed(preS))\n\nbackS = L[int((N + 2) / 2):]\nrevBackS = list(reversed(backS))\n\nif L != revS:\n print("No")\nelif preS != revPreS:\n print("No")\nelif backS != revBackS:\n print("No")\nelse:\n print("Yes")\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s492275818', 's865209438', 's369218393'] | [3064.0, 3064.0, 3064.0] | [18.0, 17.0, 18.0] | [359, 316, 316] |
p02730 | u264564865 | 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. | ["inp = input()\npart1 = inp[0:int((len(inp)-1)/2)]\npart2 = inp[int((len(inp)+1)/2):]\n\n\ndef isParin(S):\n n = len(S)\n flg = 0\n for i in range(int(n/2)):\n print(S[i], S[n-1-i])\n if S[i] != S[n-1-i]:\n flg += 1\n if flg == 0:\n return True\n else:\n return False\n\n\nif isParin(inp):\n if part1 == part2:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')\n", "inp = input()\npart1 = inp[0:int((len(inp)-1)/2)]\npart2 = inp[int((len(inp)+1)/2):]\n\n\ndef isParin(S):\n n = len(S)\n flg = 0\n for i in range(int(n/2)):\n print(S[i], S[n-1-i])\n if S[i] != S[n-1-i]:\n flg += 1\n if flg == 0:\n return True\n else:\n return False\n\n\nif isParin(inp):\n if part1 == part2:\n print('Yes')\nelse:\n print('No')\n", "inp = input()\npart1 = inp[0:int((len(inp)-1)/2)]\npart2 = inp[int((len(inp)+1)/2):]\n\n\ndef isParin(S):\n n = len(S)\n flg = 0\n for i in range(int(n/2)):\n print(S[i], S[n-1-i])\n if S[i] != S[n-1-i]:\n flg += 1\n if flg == 0:\n return True\n else:\n return False\n\n\nif isParin(inp):\n if part1 == part2:\n print('Yes')\n else:\n print('No')\n", "inp = input()\npart1 = inp[0:int((len(inp)-1)/2)]\npart2 = inp[int((len(inp)+1)/2):]\n\n\ndef isParin(S):\n n = len(S)\n flg = 0\n for i in range(int(n/2)):\n if S[i] != S[n-1-i]:\n flg += 1\n if flg == 0:\n return True\n else:\n return False\n\n\nif isParin(inp):\n if part1 == part2:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')\n"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s058443765', 's379923079', 's685393272', 's877961479'] | [3064.0, 3064.0, 3064.0, 3060.0] | [18.0, 17.0, 17.0, 18.0] | [421, 391, 399, 391] |
p02730 | u265154666 | 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\n'''\nakasaka\n'''\n\nimport sys\n\nS = input()\n\nfor i in range(len(S)):\n if not S[i] == S[len(S)-1 - i]:\n print('No')\n sys.exit()\n\n if i < (len(S)-1)/2:\n if not S[i] == S[int((len(S)-1)/2) -1 - i]:\n print('No')\n sys.exit()\n\n# print(list(S))\n# print(len(S))\n# print(int((len(S)+3)/2)-1)\nnewS = list(S)[int((len(S)+3)/2 -1):]\nprint(newS)\n\nfor i in range(len(newS)):\n if not S[i] == S[len(S) - 1 - i]:\n print('No')\n sys.exit()\n\nprint('Yes')\n\n\n\n\n", "# -*- coding: utf-8 -*-\n\n'''\nakasaka\n\n'''\n\nimport sys\n\nS = input()\n\nfor i in range(len(S)):\n \n if not S[i] == S[len(S)-1 - i]:\n print('No')\n sys.exit()\n\n\nnewS = list(S)[:int((len(S)-1)/2)]\nfor i in range(len(newS)):\n if not newS[i] == newS[len(newS) - 1 - i]:\n print('No')\n sys.exit()\n\nnewS = list(S)[int((len(S)+3)/2 - 1):]\nfor i in range(len(newS)):\n if not newS[i] == newS[len(newS) - 1 - i]:\n print('No')\n sys.exit()\n\nprint('Yes')\n\n\n\n\n"] | ['Wrong Answer', 'Accepted'] | ['s873247104', 's121139026'] | [3064.0, 3064.0] | [17.0, 18.0] | [527, 517] |
p02730 | u265673107 | 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("")\nn = len(str)\nBOOL = True\nfor i in range(int((n+1)/2)):\n BOOL = BOOL and str[i] == str[n-1-i]\n\nfor i in range(int((n-1)/2)):\n BOOL = BOOL and str[i] == str[int((n-1)/2-1-i)]\n\nfor i in range(int((n-1)/2)):\n BOOL = BOOL and str[int((n+3)/2-1+i)] == str[n-1-i]\n\nprint(BOOL)', 'str = input("")\nn = len(str)\nBOOL = True\nfor i in range(int((n + 1) / 2)):\n BOOL = BOOL and str[i] == str[n - 1 - i]\n\nfor i in range(int((n - 1) / 2)):\n BOOL = BOOL and str[i] == str[int((n - 1) / 2 - 1 - i)]\n\nfor i in range(int((n - 1) / 2)):\n BOOL = BOOL and str[int((n + 3) / 2 - 1 + i)] == str[n - 1 - i]\n\nif BOOL == True:\n print ("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s794014158', 's614950260'] | [3064.0, 3064.0] | [17.0, 17.0] | [294, 375] |
p02730 | u266014018 | 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 import sys\n input = sys.stdin.buffer.readline\n s = input()\n n = len(s)\n s_l = s[:(n-1)/2]\n s_r = s[(n+3)/2:]\n if s == s[::-1] and s_l == s_l[::-1] and s_r == s_r[::-1]:\n print('Yes')\n else:\n print('No')\n\n\nif __name__ == '__main__':\n main()", "def main():\n import sys\n #input = sys.stdin.readline\n s = input()\n n = len(s)\n s_l = s[:int((n-1)/2)]\n s_r = s[int((n+1)/2):]\n print(s_l,s_r)\n if s == s[::-1] and s_l == s_l[::-1] and s_r == s_r[::-1]:\n print('Yes')\n else:\n print('No')\n\n\nif __name__ == '__main__':\n main()", "def main():\n import sys\n #input = sys.stdin.readline\n s = input()\n n = len(s)\n s_l = s[:int((n-1)/2)]\n s_r = s[int((n+1)/2):]\n if s == s[::-1] and s_l == s_l[::-1] and s_r == s_r[::-1]:\n print('Yes')\n else:\n print('No')\n\n\nif __name__ == '__main__':\n main()"] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s176693674', 's315019526', 's205845155'] | [3060.0, 3064.0, 3060.0] | [18.0, 17.0, 18.0] | [293, 316, 297] |
p02730 | u267029978 | 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 palind(word):\n word = word.lower()\n return word[::-1] ==word\n\nnum1 = int((N-1)/2)\nnum2 = int((N+3)/2)\n\ntext1 =S[0::num1]\ntext2 =S[num2-1::]\n\nif palind(S) == True and palind(text1) == True and palind(text2) == True:\n print("Yes")\nelse:\n print("No")', 'S = input()\nN = len(S)\n\ndef palind(word):\n word = word.lower()\n return word[::-1] ==word\n\nnum1 = int((N-1)/2)\nnum2 = int((N+3)/2)\n\ntext1 =S[0::num1]\ntext2 =S[num2-1::]\n\nif palind(S) == True and palind(text1) == True and palind(text2) == True:\n print("Yes")\nelse:\n print("No")\n\n\n'] | ['Runtime Error', 'Accepted'] | ['s876478715', 's167983963'] | [3060.0, 3060.0] | [18.0, 17.0] | [255, 282] |
p02730 | u268318377 | 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 == reversed(a)\ns1 = s[:(n-1)//2]\nb = s1 == reversed(s1)\ns2 = s[(n+3)//2 + 1:]\nc = s2 == reversed(s2)\n\nprint(['No', 'Yes'][a and b and c])", "s = input()\nn = len(s)\n \na = s == reversed(a)\ns1 = s[:(n-1)//2]\nb = s1 == s1[::-1]\ns2 = s[(n+3)//2 + 1:]\nc = s2 == s2[::-1]\n \nprint(['No', 'Yes'][a and b and c])", "s = input()\nn = len(s)\n \na = s == s[::-1]\ns1 = s[:(n-1)//2]\nb = s1 == s1[::-1]\ns2 = s[(n+3)//2 - 1:]\nc = s2 == s2[::-1]\n \nprint(['No', 'Yes'][a and b and c])"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s015974521', 's651308418', 's208912234'] | [3060.0, 3060.0, 3064.0] | [18.0, 18.0, 17.0] | [167, 161, 157] |
p02730 | u268784197 | 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()\na=list(a)\na1=[]\nb1=[]\nc1=[]\nfor i in range(len(a)-1,-1,-1):\n a1.append(a[i])\nb=a[0:(len(a)-1)//2]\nfor i in range(len(b)-1,-1,-1):\n b1.append(a[i])\nc=a[(len(a)+3)//2-1:len(a)]\nfor i in range(len(c)-1,-1,-1):\n c1.append(a[i])\n\n\n\nif(a==a1):\n if(b==b1 and c==c1):\n print("YES")\n else:\n print("NO")\nelse:\n print("NO")\n', 'a=input()\na=list(a)\na1=[]\nb1=[]\nc1=[]\nfor i in range(len(a)-1,-1,-1):\n a1.append(a[i])\nb=a[0:(len(a)-1)//2]\nfor i in range(len(b)-1,-1,-1):\n b1.append(a[i])\nc=a[(len(a)+3)//2-1:len(a)]\nfor i in range(len(c)-1,-1,-1):\n c1.append(a[i])\n\n\n\nif(a==a1):\n if(b==b1 and c==c1):\n print("Yes")\n else:\n print("No")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Accepted'] | ['s305049521', 's910537496'] | [3064.0, 3064.0] | [17.0, 17.0] | [355, 355] |
p02730 | u272682534 | 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 kalin(s):\n N=len(s)\n for i in range(N//2):\n if s[i]!=s[-1-i]:\n return False\n return True\n\ndef strong(s):\n N=len(s)\n tail = (N-1)//2\n s0=s[0:tail]\n head = (N+3)//2\n s1=s[head-1:]\n return kalin(s0) and kalin(s1) and kalin(s) \n\nS=input()\n\nprint(strong(S))\n\n', "def kalin(s):\n N=len(s)\n for i in range(N//2):\n if s[i]!=s[-1-i]:\n return False\n return True\n\ndef strong(s):\n N=len(s)\n tail = (N-1)//2\n s0=s[0:tail]\n head = (N+3)//2\n s1=s[head-1:]\n # print('s0={} s1={}'.format(s0,s1))\n return kalin(s0) and kalin(s1) and kalin(s) \n\nif strong(input()):\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s786315607', 's662207759'] | [3060.0, 3064.0] | [18.0, 17.0] | [276, 340] |
p02730 | u274841648 | 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)\ns1 = s[:int((n-1)/2)]\ns2 = s[int((n+3)/2-1):]\n\ndef isk(st):\n return st == st[::-1]\n\nprint(isk(s) and isk(s1) and isk(s2))', 's = list(input())\nn = len(s)\ns1 = s[:int((n-1)/2)]\ns2 = s[int((n+3)/2-1):]\n\ndef isk(st):\n return st == st[::-1]\n\nprint("Yes" if (isk(s) and isk(s1) and isk(s2)) else "No")'] | ['Wrong Answer', 'Accepted'] | ['s623994675', 's284709970'] | [3060.0, 3060.0] | [18.0, 18.0] | [153, 174] |
p02730 | u276686572 | 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. | ['string = input()\n\ndef palindrome(inp):\n if inp == inp[::-1]: return True\n else: return False\n \nif palindrome(string) and palindrome(string[:int((len(string) + 1)/2)] and palindrome(string[int((len(string) +3)/2):]: print("Yes")\nelse: print("No")', 'string = input()\n\ndef palindrome(inp):\n if inp == inp[::-1]: return True\n else: return False\n\nif palindrome(string) and palindrome(string[:int((len(string) -1)/2)]) and palindrome(string[int((len(string) +1)/2):]): print("Yes")\nelse: print("No")\n'] | ['Runtime Error', 'Accepted'] | ['s396242820', 's864414611'] | [8948.0, 9044.0] | [25.0, 30.0] | [248, 248] |
p02730 | u277641173 | 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)\nc = (l-1)//2\n\ncount = 0\ncheck = 0\nfor i in range(0,c-1):\n if s[i] == s[l-i-1]:\n count = count + 1\n \nif count == c-1:\n check = check + 1\n\ncount1 = 0 \nfor j in range(0, c-1):\n if s[j] == s[c-j-1]:\n count1 = count1 + 1\n\nif count1 == c-1:\n check = check + 1\n\nprint(check)\nif check == 2:\n print('Yes')\nelse:\n print('No')\n", "s = input()\nl = len(s)\nc = (l-1)//2\n\ncount = 0\ncheck = 0\nfor i in range(0,c-1):\n if s[i] == s[l-i-1]:\n count = count + 1\n \nif count == c-1:\n check = check + 1\n\ncount1 = 0 \nfor j in range(0, c-1):\n if s[j] == s[c-j-1]:\n count1 = count1 + 1\n\nif count1 == c-1:\n check = check + 1\n\nif check == 2:\n print('Yes')\nelse:\n print('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s951756550', 's806157373'] | [3064.0, 3064.0] | [18.0, 18.0] | [355, 342] |
p02730 | u278260569 | 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()\njudge = True\nfor i in range(len(S)//2):\n if S[i] != S[len(S) - i - 1]:\n judge = False\n break\n\n\nif judge: \n for i in range(int((len(S)-1)/2)):\n \n if S[i] != S[int((len(S)-1)/2)- 1 - i]:\n judge = False\n break\n elif S[int((N+3)/2)-1 + i] != S[N-1-i]:\n judge = False\n break\n\nif judge:\n print("Yes")\nelse:\n print("No")', 'S = input()\njudge = True\nfor i in range(len(S)//2 + 2):\n if S[i] != S[len(S) - i - 1]:\n judge = False\n break\n\n\nif judge: \n for i in range(int((len(S)-1)/2)):\n \n if S[i] != S[int((len(S)-1)/2)- 1 - i]:\n judge = False\n break\n elif S[int((N+3)/2)-1 + i] != S[N-1-i]:\n judge = False\n break\n\nif judge:\n print("Yes")\nelse:\n print("No")', 'S = input()\nN = len(S)\njudge = True\nfor i in range(len(S)//2):\n if S[i] != S[len(S) - i - 1]:\n judge = False\n break\n\n\nif judge: \n for i in range(int((len(S)-1)/2)):\n \n if S[i] != S[int((len(S)-1)/2)- 1 - i]:\n judge = False\n break\n elif S[int((N+3)/2)-1 + i] != S[N-1-i]:\n judge = False\n break\n\nif judge:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s827325372', 's865927569', 's469812692'] | [3064.0, 3064.0, 3064.0] | [17.0, 19.0, 19.0] | [417, 421, 428] |
p02730 | u279292103 | 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)\nS2 = S[:(N-1)//2+2]\nif S == S[::-1] and S2 == S2[::-1]:\n print('Yes')\nelse:\n print('No')", "S = input()\nN = len(S)\nS2 = S[:(N-1)//2]\nif S == S[::-1] and S2 == S2[::-1]:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s649029730', 's073159852'] | [2940.0, 2940.0] | [19.0, 17.0] | [123, 115] |
p02730 | u284363684 | 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\nN = len(S)\n\nprint(f"{S}\\t{S[:int((N - 1) / 2)]}\\t{S[int((N + 2) / 2):]}")\n\nif S[:int((N - 1) / 2)] == S[int((N + 2) / 2):]:\n print("Yes")\nelse:\n print("No")', '# input\nS = input()\n\n\nN = len(S)\n\nif S[:int((N - 1) / 2)] == S[int((N + 2) / 2):]:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s238586851', 's290125833'] | [2940.0, 2940.0] | [17.0, 17.0] | [191, 128] |
p02730 | u287660527 | 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())\nd = int((len(s)-1) / 2)\ne = int((len(s)+3) / 2)\nif s == s[::-1] and s[0:d-1] == s[0:d-1:-1] and s[e-1:] == s[e-1::-1]:\n print('Yes')\nelse:\n print('No')", "s = input()\nd = int((len(s)-1) / 2)\ne = int((len(s)+3) / 2)\nif s == s[::-1] and s[0:d] == s[d-1::-1] and s[e-1:] == s[int(len(s)):e-2:-1]:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s818834986', 's764235821'] | [9048.0, 9056.0] | [30.0, 28.0] | [171, 173] |
p02730 | u289036437 | 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()\na=1\nfor i in range(len(s)):\n if(s[i]!=s[-i-1]):\n a=0\n break\nfor i in range((len(s)-1)//2):\n if(s[i]!=s[(len(s)-3)//2]):\n a=0\n break\nif(a==1):\n print("Yes")\nelse:\n print("No")', 's = input()\na=1\nfor i in range(len(s)):\n if(s[i]!=s[-i-1]):\n a=0\n break\nfor i in range((len(s)-1)//2):\n if(s[i]!=s[(len()-3)//2]):\n a=0\nif(a==1):\n print("Yes")\nelse:\n print("No")', 's=input()\na=1\nfor i in range(len(s)):\n if(s[i]!=s[-i-1]):\n a=0\n break\nfor i in range((len(s)-1)//2):\n if(s[i]!=s[(len(s)-3)//2-i]):\n a=0\n break\nif(a==1):\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s104900991', 's745356411', 's700160569'] | [3064.0, 3060.0, 3064.0] | [17.0, 17.0, 18.0] | [200, 191, 202] |
p02730 | u289102924 | 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(str(input()))\n\nans = 0\nn = len(s)\ns1 = list(reversed(s))\nif s != s1:\n ans = 1\n\ns2 = s[0:(n-1)//2]\ns3 = list(reversed(s2))\nif s2 != s3:\n ans = 1\n\ns4 = s[(n+2)//2:n]\ns5 = list(reversed(s4))\nif s4 != s5:\n ans = 1\n\nprint(s,s1,s2,s3,s4,s5)\n\nif ans == 0:\n print('Yes')\nelse:\n print('No')", "s = list(str(input()))\n\nans = 0\nn = len(s)\ns1 = list(reversed(s))\nif s != s1:\n ans = 1\n\ns2 = s[0:(n-1)//2]\ns3 = list(reversed(s2))\nif s2 != s3:\n ans = 1\n\ns4 = s[(n+2)//2:n]\ns5 = list(reversed(s4))\nif s4 != s5:\n ans = 1\n\nif ans == 0:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s185606388', 's391999423'] | [3064.0, 3064.0] | [18.0, 18.0] | [305, 280] |
p02730 | u289162337 | 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)-1)/2)]\nu = s[(int(len(s)+3)/2-1):]\nif s == s[::-1] and t == t[::-1] and u == u[::-1]:\n print("Yes")\nelse:\n print("No")', 's = input()\nt = s[:int((len(s)-1)/2)]\nu = s[(int((len(s)+3)/2)-1):]\nif s == s[::-1] and t == t[::-1] and u == u[::-1]:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s613046229', 's512515518'] | [3060.0, 3060.0] | [17.0, 17.0] | [151, 153] |
p02730 | u294211484 | 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\ninput = sys.stdin.readline\n\nS = str(input())\nN = len(S)-1\n\nN1 = (N-1)/2\nN2 = (N+3)/2\n\ns1 = S[:N]\ns2 = S[:N1]\ns3 = S[N2-1:N]\n', 'import sys\ninput = sys.stdin.readline\n\nS = str(input())\nN = len(S)-1', "import sys\ninput = sys.stdin.readline\n\nS = str(input())\nN = len(S)-1\n\n\nN1 = (N-1)/2\nN2 = (N+3)/2\n\ns1 = S[:N]\ns2 = S[:N1]\ns3 = S[N2-1:N]\n\nflag = True\nfor ss in [s1, s2, s3]:\n ss_l = len(ss)\n for i in range(ss_l):\n if ss[i] != ss[ss_l-i-1]:\n flag = False\n break\n if not flag:\n break\n\nif flag:\n print('Yes')\nelse:\n print('No')\n\n", "import sys\ninput = sys.stdin.readline\n\nS = str(input())\nN = len(S)-1\n\nN1 = (N-1)/2\nN2 = (N+3)/2\n\ns1 = S[:N]\ns2 = S[:N1]\ns3 = S[N2-1:N]\n\nflag = True\nfor ss in [s1, s2, s3]:\n ss_l = len(ss)\n for i in range(ss_l):\n if ss[i] != ss[ss_l-i-1]:\n flag = False\n break\n if not flag:\n break\n\nif flag:\n print('Yes')\nelse:\n print('No')\n\n", "import sys\ninput = sys.stdin.readline\n\nS = str(input())\nN = len(S)-1\n\nN1 = int((N-1)/2)\nN2 = int((N+3)/2)\n\ns1 = S[:N]\ns2 = S[:N1]\ns3 = S[N2-1:N]\n\nflag = True\nfor ss in [s1, s2, s3]:\n ss_l = len(ss)\n for i in range(ss_l):\n if ss[i] != ss[ss_l-i-1]:\n flag = False\n break\n if not flag:\n break\n\nif flag:\n print('Yes')\nelse:\n print('No')\n\n"] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s021239932', 's186385280', 's221020158', 's454692337', 's901326711'] | [2940.0, 2940.0, 3064.0, 3064.0, 3064.0] | [18.0, 17.0, 18.0, 17.0, 18.0] | [135, 68, 376, 375, 385] |
p02730 | u296989351 | 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)\ns_half = (n - 1)/2\ns_3 = (n + 3)/ 2\nif s == s[::-1]:\n\tif s[s_half - 1] == s[s_half - 1::-1]:\n\t\tif s[s_3 -1] == s[s_3 -1::-1]:\n\t\t\tprint('Yes')\nprint('No')\n\n", "s = list(input())\nn = len(s)\ns_half = (n - 1)/2\ns_3 = (n + 3)/ 2\nif s == s[::-1]:\n\tif s_half == s_half[::-1]:\n\t\tif s_3 == s_3[::-1]:\n\t\t\tprint('Yes')\nprint('No')", "s = input()\nl = len(s)\nif list(s) != list(reversed(s)):\n print('No')\n exit()\nif list(s[:(l - 1) // 2]) != list(reversed(s[:(l - 1) // 2])):\n print('No')\n exit()\nif list(s[(l + 3) // 2 -1:l]) != list(reversed(s[(l + 3) // 2 -1:l])):\n print('No')\n exit()\nprint('Yes')"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s247396124', 's388865573', 's477237466'] | [2940.0, 3060.0, 3064.0] | [17.0, 17.0, 17.0] | [184, 160, 283] |
p02730 | u297089927 | 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:]\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)/2):]\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[:int((N-1)/2)]\nS2=S[int((N+1)/2):]\nif S == S[::-1] and S1 == S1[::-1] and S2 == S2[::-1]:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s165036991', 's577853616', 's767379330'] | [3060.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0] | [138, 142, 148] |
p02730 | u302297036 | 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. | ['data = input()\nS = [c for c in data]\nS_inverse = list(reversed(S))\n\nN = len(S)\n\nprint(S[: int((N - 1) / 2)])\nprint(S_inverse[int((N + 3) / 2 - 1):])\nprint(S_inverse[: int((N - 1) / 2)])\nprint(S[int((N + 3) / 2 - 1):])\n\nif S != S_inverse:\n print("No1")\n exit(0)\n\nif S[: int((N - 1) / 2)] != S_inverse[int((N + 3) / 2 - 1):]:\n print("No2")\n exit(0)\n\nif S[int((N + 3) / 2 - 1):] != S_inverse[:int((N - 1) / 2)]:\n print("No3")\n exit(0)\n\nprint("Yes")\n', 'data = input()\nS = [c for c in data]\nS_inverse = list(reversed(S))\n\nprint(S)\nprint(S_inverse)\n\nif S != S_inverse:\n print("No")\n exit(0)\n\nN = len(S)\nif S[: int((N - 1) / 2)] != S_inverse[int((N + 3) / 2):]:\n print("No")\n exit(0)\n\nif S[int((N + 3) / 2):] != S_inverse[:int((N - 1) / 2)]:\n print("No")\n exit(0)\n\nprint("Yes")\n', 'data = input()\nS = [c for c in data]\nS_inverse = list(reversed(S))\n\nN = len(S)\n\nif S != S_inverse:\n print("No")\n exit(0)\n\nif S[: int((N - 1) / 2)] != S_inverse[int((N + 3) / 2 - 1):]:\n print("No")\n exit(0)\n\nif S[int((N + 3) / 2 - 1):] != S_inverse[:int((N - 1) / 2)]:\n print("No")\n exit(0)\n\nprint("Yes")\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s359431112', 's772751182', 's730466402'] | [3064.0, 3064.0, 3064.0] | [17.0, 18.0, 17.0] | [464, 340, 322] |
p02730 | u305018585 | 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\ns_r = s[::-1]\nN = len(s)\ns_2 = s[:int((N-1)/2)]\ns_3 = s[int((N+1)/2):]\nprint(s_r, s_2, s_3)\nif ( (s == s_r) & (s_2 ==s_2[::-1]) &(s_3 ==s_3[::-1])):\n print('Yes')\nelse :\n print('No')\n ", "s= input()\n\ns_r = s[::-1]\nN = len(s)\ns_2 = s[:int((N-1)/2)]\ns_3 = s[int((N+1)/2):]\n\nif ( (s == s_r) & (s_2 ==s_2[::-1]) &(s_3 ==s_3[::-1])):\n print('Yes')\nelse :\n print('No')\n "] | ['Wrong Answer', 'Accepted'] | ['s340088736', 's946219630'] | [3060.0, 2940.0] | [18.0, 17.0] | [199, 179] |
p02730 | u309834353 | 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\nimport sys \ns = input()\nif s==s[::-1]:\n n = len(s)\n right = int((n-1)/2)\n print(right)\n tmp = s[:right]\n if tmp == tmp[::-1]:\n left = int((n+3)/2)\n tmp2 = s[left-1:]\n if tmp2 == tmp2[::-1]:\n print('Yes')\n sys.exit()\nprint('No')\n", "import math\nimport sys \ns = input()\nif s==s[::-1]:\n n = len(s)\n right = int((n-1)/2)\n tmp = s[:right]\n if tmp == tmp[::-1]:\n left = int((n+3)/2)\n tmp2 = s[left-1:]\n if tmp2 == tmp2[::-1]:\n print('Yes')\n sys.exit()\nprint('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s726694507', 's883891718'] | [3060.0, 3060.0] | [17.0, 17.0] | [298, 281] |
p02730 | u313317027 | 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()\n\ns_1 = s[:(len(s)-1)/2]\ns_2 = s[(len(s)-3)/2:]\n\nif is_kaibun(s) and is_kaibun(s_1) and is_kaibun(s_2):\n print('Yes')\nelse:\n print('No')", "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()\n\ns_1 = s[:(int)((len(s)-1)/2)]\ns_2 = s[(int)((len(s)+3)/2)-1:len(s)]\n\nif is_kaibun(s) and is_kaibun(s_1) and is_kaibun(s_2):\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s986475562', 's589304375'] | [3060.0, 3064.0] | [17.0, 17.0] | [290, 312] |
p02730 | u314050667 | 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\ns=input()\ns_pre = s[:(n-1)//2]\ns_epi = s[(n+1)//2:]\nn = len(s)\nif s != s[::-1]:\n print('No')\n sys.exit()\nif s_pre != s_pre[::-1]:\n print('No')\n sys.exit()\nif s_epi != s_epi[::-1]:\n print('No')\n sys.exit()\nprint('Yes')", "import sys\ns=input()\nn=len(s)\ns_pre = s[:(n-1)//2]\ns_epi = s[(n+1)//2:]\nif s != s[::-1]:\n print('No')\n sys.exit()\nif s_pre != s_pre[::-1]:\n print('No')\n sys.exit()\nif s_epi != s_epi[::-1]:\n print('No')\n sys.exit()\nprint('Yes')\n"] | ['Runtime Error', 'Accepted'] | ['s867333412', 's411758070'] | [3064.0, 3060.0] | [17.0, 17.0] | [246, 245] |
p02730 | u314837274 | 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)\ntmp=s[0:int((N-1)/2)+1]\ntmp_rev=tmp[::-1]\n\ntmp2=s[int((N+3)/2)-1:]\ntmp2_rev=tmp2[::-1]\n\nif tmp==tmp_rev and tmp2==tmp2_rev:\n print("Yes")\nelse:\n print("No")', 's=list(input())\nN=len(s)\nif N==3:\n if s[0]==s[2]:\n print("Yes")\n else:\n print("No")\nelse:\n tmp=s[0:int((N-1)/2)+1]\n tmp_rev=tmp[::-1]\n\n tmp2=s[int((N+3)/2)-1:]\n tmp2_rev=tmp2[::-1]\n\n if tmp==tmp_rev and tmp2==tmp2_rev and s==s[::-1]:\n print("Yes")\n else:\n print("No")', 's=list(input())\nN=len(s)\ntmp=s[0:int((N-1)/2)+1]\ntmp_rev=tmp[::-1]\n\ntmp2=s[int((N+3)/2):N+1]\ntmp2_rev=tmp2[::-1]\n\nif tmp==tmp_rev and tmp2==tmp2_rev:\n print("Yes")\nelse:\n print("No")', 's=list(input())\nN=len(s)\ntmp=s[0:int((N-1)/2)+1]\ntmp_rev=tmp[::-1]\n\ntmp2=s[int((N+3)/2)-1:]\ntmp2_rev=tmp2[::-1]\n\nif tmp==tmp_rev and tmp2==tmp2_rev and s==s[::-1]:\n print("Yes")\nelse:\n print("No")', 's=list(input())\nN=len(s)\nif N==3:\n if s[0]==s[2]:\n print("Yes")\n else:\n print("No")\nelse:\n tmp=s[0:int((N-1)/2)]\n tmp_rev=tmp[::-1]\n\n tmp2=s[int((N+3)/2)-1:]\n tmp2_rev=tmp2[::-1]\n\n if tmp==tmp_rev and tmp2==tmp2_rev and s==s[::-1]:\n print("Yes")\n else:\n print("No")'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s250790916', 's727505442', 's732239759', 's808131693', 's304312994'] | [3060.0, 3064.0, 3060.0, 3060.0, 3064.0] | [17.0, 17.0, 18.0, 19.0, 17.0] | [183, 287, 184, 198, 285] |
p02730 | u321096814 | 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 -*-\nimport sys\nS = input()\nS_list = list(S)\ntmp = S_list.copy()\nN = len(S)\nif N % 2 == 0:\n print("No")\n sys.exit()\nelse: \n S_list.reverse()\n if S_list == tmp:\n tmp_2 = int((len(tmp)-1) / 2)\n tmp_2_list = tmp[:tmp_2]\n t2=tmp_2_list.copy()\n \n tmp_3 = int((len(tmp)+3) / 2)\n tmp_3_list = tmp[tmp_3-1:]\n t3 = tmp_3_list.copy()\n \n tmp_2_list.reverse()\n tmp_3_list.reverse()\n if tmp_2_list == t2 and tmp_3_list == t3:\n print("yes")\n sys.exit()\n else:\n print("No")\n sys.exit()\n else:\n print("No")\n sys.exit()', '# -*- coding: utf-8 -*-\nimport sys\nS = input()\nS_list = list(S)\ntmp = S_list.copy()\nN = len(S)\nif N % 2 == 0:\n print("No")\n sys.exit()\nelse: \n S_list.reverse()\n if S_list == tmp:\n tmp_2 = int((len(tmp)-1) / 2)\n tmp_2_list = tmp[:tmp_2]\n t2=tmp_2_list.copy()\n \n tmp_3 = int((len(tmp)+3) / 2)\n tmp_3_list = tmp[tmp_3-1:]\n t3 = tmp_3_list.copy()\n \n tmp_2_list.reverse()\n tmp_3_list.reverse()\n if tmp_2_list == t2 and tmp_3_list == t3:\n print("Yes")\n sys.exit()\n else:\n print("No")\n sys.exit()\n else:\n print("No")\n sys.exit()'] | ['Wrong Answer', 'Accepted'] | ['s809236274', 's702983522'] | [3064.0, 3064.0] | [17.0, 17.0] | [598, 598] |
p02730 | u323776907 | 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()\na = (len(n) - 1)//2\nb = (len(n) + 3)//2\nif n == n[::-1]:\n if n[0:a-1] == n[0:a-1:-1]:\n if n[b-1:len(n)-1] == n[b-1:len(n)-1:-1]:\n print("Yes")\n \telse:\n print("No")\n else:\n print("No")\nelse:\n print("No")\n ', 'n = input()\na = ((len(n) - 1)//2)\nb = ((len(n) + 3)//2)-1\nif n == n[::-1]:\n if n[:a] == n[-a::]:\n if n[b:] == n[:-b]:\n print("Yes")\n else:\n print("No")\n else:\n print("No")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s468552567', 's588490473'] | [2940.0, 3060.0] | [17.0, 17.0] | [239, 242] |
p02730 | u326552320 | 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 python\n# -*- coding: utf-8 -*-\n#\n# FileName: \tB\n# CreatedDate: 2020-03-22 20:59:36 +0900\n# LastModified: 2020-03-22 21:24:32 +0900\n#\n\n\nimport os\nimport sys\n\n\ndef main():\n S = input()\n N = len(S)\n S_b = S[:(N-1)//2]\n S_a = S[(N+3)//2:]\n for i in range((N+1)//2-1):\n if S[i]!=S[-(i+1)]:\n print("No")\n return \n for i in range((len(S_b)+1)//2):\n if S_b[i]!=S_b[-(i+1)]:\n print("No")\n return \n for i in range((len(S_a)+1)//2):\n if S_a[i]!=S_b[-i]:\n print("No")\n return \n print("Yes")\n\n\n\nif __name__ == "__main__":\n main()\n', '#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# FileName: \tB\n# CreatedDate: 2020-03-22 20:59:36 +0900\n# LastModified: 2020-03-22 21:36:47 +0900\n#\n\n\nimport os\nimport sys\n\n\ndef main():\n S = input()\n N = len(S)\n S_b = S[:(N-1)//2]\n S_a = S[(N+1)//2:]\n for i in range((N+1)//2-1):\n if S[i]!=S[-(i+1)]:\n print("No")\n return \n for i in range((len(S_b)+1)//2):\n if S_b[i]!=S_b[-(i+1)]:\n print("No")\n return \n for i in range((len(S_a)+1)//2):\n if S_a[i]!=S_b[-i]:\n print("No")\n return \n print("Yes")\n\n\n\nif __name__ == "__main__":\n main()\n', '#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# FileName: \tB\n# CreatedDate: 2020-03-22 20:59:36 +0900\n# LastModified: 2020-03-22 22:25:25 +0900\n#\n\n\nimport os\nimport sys\n\n\ndef main():\n S = input()\n N = len(S)\n S_b = S[:(N-1)//2]\n S_a = S[(N+1)//2:]\n for i in range((N+1)//2-1):\n if S[i]!=S[-(i+1)]:\n print("No")\n return \n for i in range((len(S_b)+1)//2):\n if S_b[i]!=S_b[-(i+1)]:\n print("No")\n return \n for i in range((len(S_a)+1)//2):\n if S_a[i]!=S_b[-(i+1)]:\n print("No")\n return \n print("Yes")\n\n\n\nif __name__ == "__main__":\n main()\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s180512948', 's652610801', 's710543761'] | [3064.0, 3064.0, 3064.0] | [17.0, 18.0, 18.0] | [647, 647, 651] |
p02730 | u330169562 | 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 print("kaibun: ", s)\n for i in range(round((len(s) / 2))):\n if s[i] == s[len(s) - i - 1]:\n continue\n else:\n return False\n return True\n\n\ns = str(input())\nn = len(s)\n\nif kaibun(s):\n if kaibun(s[0:round((n - 1) / 2)]):\n if kaibun(s[round((n + 3) / 2):]):\n print(\'Yes\')\n else:\n print(\'No\')\n else:\n print(\'No\')\nelse:\n print(\'No\')\n', 'def kaibun(s):\n print("kaibun: ", s)\n for i in range(round((len(s) / 2))):\n if s[i] == s[len(s) - i - 1]:\n continue\n else:\n return False\n return True\n\n\ns = str(input())\nn = len(s)\nif kaibun(s):\n if kaibun(s[0:round((n - 1) / 2)]):\n if kaibun(s[round((n + 3) / 2) - 1:]):\n print(\'Yes\')\n else:\n print(\'No\')\n else:\n print(\'No\')\nelse:\n print(\'No\')\n', "def kaibun(s):\n for i in range(round((len(s) / 2))):\n if s[i] == s[len(s) - i - 1]:\n continue\n else:\n return False\n return True\n\n\ns = str(input())\nn = len(s)\nif kaibun(s):\n if kaibun(s[0:round((n - 1) / 2)]):\n if kaibun(s[round((n + 3) / 2) - 1:]):\n print('Yes')\n else:\n print('No')\n else:\n print('No')\nelse:\n print('No')"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s774282367', 's916190853', 's961437985'] | [3060.0, 3064.0, 3064.0] | [17.0, 17.0, 18.0] | [438, 441, 415] |
p02730 | u331997680 | 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)-1)//2\nfor i in range(n):\n if S[i] == S[-(i+1)] and S[i] == S[i+n+1]:\n continue\n else:\n print('No')\nfor i in \nprint('Yes')", "S = list(input())\nn = (len(S)-1)//2\nm = 0\nfor i in range(n):\n if S[i] == S[-(i+1)] and S[i] == S[i+n+1]:\n continue\n else:\n print('No')\n m = 1\n break\nif m < 1:\n print('Yes')"] | ['Runtime Error', 'Accepted'] | ['s413862743', 's231199693'] | [2940.0, 3060.0] | [17.0, 17.0] | [159, 187] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.