TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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.

Submission attempts (in order):
s = input()
a = s[::-1]
b = (s[0:((len(s)-1)//2])
c = (s[((len(s)*3)//2:-1])
if s == a and b == c:
    print("Yes")
else:
    print("No")

s = input()
n = len(s)
a = s[0:(n-1)//2]
b = s[(n+3)//2:n]
if s ==s[::-1] and a == a[::-1] and b == b[::-1] :
    print("Yes")
else:
    print("No")

s = input()
n = len(s)
a = s[0:(n-1)//2]
b = s[(n+3)//2-1:n]
if s == s[::-1] and a == a[::-1] and b ==  b[::-1]:
    print("Yes")
else:
    print("No")

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s=input()
n=len(s)

def circ_check(s):
    s_rev=s[::-1]
    n=len(s)
    print(s,s_rev[0:int((n-1)/2)],s[0:int((n-1)/2)])
    if s_rev[0:int((n-1)/2)] ==s[0:int((n-1)/2)]:
        s_check=1
    else:
        s_check=0
    return(s_check) 

  
if n<7:
    print('No')
elif int((n-1)/2)%2==1:
    res1=circ_check(s)
    res2=circ_check(s[0:int((n-1)/2)])
    res3=circ_check(s[int((n-1)/2+1):len(s)])
    if res1*res2*res3==1:
        print('Yes')
    else:
        print('No')
else:
    print('No')
  

s=input()
n=len(s)

def circ_check(s):
    s_rev=s[::-1]
    n=len(s)
    print(s,s_rev[0:int((n-1)/2)],s[0:int((n-1)/2)])
    if s_rev[0:int((n-1)/2)] ==s[0:int((n-1)/2)]:
        s_check=1
    else:
        s_check=0
    return(s_check) 

    
if int((n-1)/2)%2==1:
    res1=circ_check(s)
    res2=circ_check(s[0:int((n-1)/2)])
    res3=circ_check(s[int((n-1)/2+1):len(s)])
    if res1*res2*res3==1:
        print('Yes')
    else:
        print('No')
else:
    print('No')

s=input()
n=len(s)

def circ_check(s):
    s_rev=s[::-1]
    n=len(s)
    if n%2==1:
        half_n=int((n-1)/2)
    else:
        half_n=int(n/2)
    print(s_rev[0:half_n],s[0:half_n])
    if s_rev[0:half_n] ==s[0:half_n]:
        s_check=1
    else:
        s_check=0
    return(s_check) 


res1=circ_check(s)
res2=circ_check(s[0:int((n-1)/2)])
res3=circ_check(s[int((n-1)/2+1):len(s)])
if res1*res2*res3==1:
    print('Yes')
else:
    print('No')

s=input()
n=len(s)

def circ_check(s):
    s_rev=s[::-1]
    n=len(s)
    print(s_rev[0:int((n-1)/2)],s[0:int((n-1)/2)])
    if s_rev[0:int((n-1)/2)] ==s[0:int((n-1)/2)]:
        s_check=1
    else:
        s_check=0
    return(s_check) 

    
if n%4==3:
    res1=circ_check(s)
    res2=circ_check(s[0:int((n-1)/2)])
    res3=circ_check(s[int((n-1)/2+1):len(s)])
    if res1*res2*res3==1:
        print('Yes')
    else:
        print('No')
else:
    print('No')

s=input()
n=len(s)

def circ_check(s):
    s_rev=s[::-1]
    n=len(s)
    if n%2==1:
        half_n=int((n-1)/2)
    else:
        half_n=int(n/2)
    if s_rev[0:half_n] ==s[0:half_n]:
        s_check=1
    else:
        s_check=0
    return(s_check) 


res1=circ_check(s)
res2=circ_check(s[0:int((n-1)/2)])
res3=circ_check(s[int((n-1)/2+1):len(s)])
if res1*res2*res3==1:
    print('Yes')
else:
    print('No')
    


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
w = input()
l = len(w)
flag = True
for i in range((l - 1)/2):
  if w[i] != w[l - i - 1]:
    flag = False
    break
mid = (l - 1)/2
mid_mid = mid // 2
for i in range(mid_mid + 1):
  if w[i] != w[mid - i - 1] or not flag:
    flag = False
    break
  if w[i + mid + 1] != w[l - i - 1]:
    flag = False
    break
if flag:
  print('Yes')
else:
  print('No')

w = input()
l = len(w)
flag = True
for i in range((l - 1)//2):
  if w[i] != w[l - i - 1]:
    flag = False
    break
mid = (l - 1) // 2
mid_mid = mid // 2
for i in range(mid_mid + 1):
  if w[i] != w[mid - i - 1] or not flag:
    flag = False
    break
  if w[i + mid + 1] != w[l - i - 1]:
    flag = False
    break
if flag:
  print('Yes')
else:
  print('No')


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
print('Yes' if s == s[-1:-1] else 'No')

def res(s):
    n = len(s)
    s_ = s[0:(n-1)//2]
    s__ = s[(n+3)//2-1:n]
    if s == s[-1::-1]:
        if s_ == s_[-1::-1]:
            if s__ == s__[-1::-1]:
                return 'Yes'
    return 'No'

s = input()
print(res(s))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s= input()
z=len(s)//2
flag=0
sd=s[0:z-1]
if sd==s[z+1:len(s)-1]:
    if sd==sd[::-1]:
        flag=1
if flag==1:
    print("Yes")
else:
    print("No")

s= input()
z=len(s)//2
flag=0
sd=s[0:z-1]
if sd==s[z+1:len(s)-1]:
    if sd==sd[::-1]:
        flag=1
if flag==1:
    print("Yes")
else:
    print("No")

s= input()
z=len(s)//2
flag=0
sd=s[0:z-1]
if len(s)==3:
    if s[0]==s[2]:
        flag=1
else:
    if sd==s[z+1:len(s)-1]:
        if sd==sd[::-1]:
            flag=1
if flag==1:
    print("Yes")
else:
    print("No")

s= input()
z=len(s)//2
flag=0
sd=s[0:z]
if len(s)==3:
    if s[0]==s[2]:
        flag=1
else:
    if sd==s[z+1:len(s)]:
        if sd==sd[::-1]:
            flag=1
if flag==1:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
n = len(s)
print(
  "Yes"
  if (
    is_palindrome(s)
    and is_palindrome(s[: int((n - 1) / 2)])
    and is_palindrome(s[int((n + 3) / 2) - 1 :])
  )
  else "No"
)


def is_palindrome(s: str) -> bool:
    return s[::-1] == s

s = input()
n = len(s)
print(
  "Yes"
  if (
    is_palindrome(s)
    and is_palindrome(s[: int((n - 1) / 2)])
    and is_palindrome(s[int((n + 3) / 2) - 1 :])
  )
  else "No"
)


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
s = input()

if s != s[::-1]:
  print("No")
  exit()
  
x = s[:((len(s)-1)//2)]
if x != x[::-1]:
  print("No")
  exit()
  
y = s[((len(s)+3)//2-1):]
print(y)
if y != y[::-1]:
  print("No")
  exit()

print("Yes")

s = input()

if s != s[::-1]:
  print("No")
  exit()
  
x = s[:((len(s)-1)//2)]
if x != x[::-1]:
  print("No")
  exit()
  
y = s[((len(s)+3)//2-1):]
if y != y[::-1]:
  print("No")
  exit()

print("Yes")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import sys
S = input()

if not S.islower():sys.exit()
if not ( 3 <= len(S) <= 99 and len(S) % 2 == 1 ): sys.exit()
first = int((len(S)-1)/2)
F = S[0:first]
second = int((len(S)+3)/2)
S = S[second-1:]

if 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]:
    print('Yes')
else:
    print('No')


import sys
S = input()

if not S.islower():sys.exit()
if not ( 3 <= len(S) <= 99 and len(S) % 2 == 1 ): sys.exit()

# whole check
first = int((len(S)-1)/2)
F = S[0:first]
last = int((len(S)+3)/2)
L = S[last-1:]
condition = 0
if S == S[::-1]:
    condition += 1
if F == F[::-1]:
    condition += 1
if L == L[::-1]:
    condition += 1

print('Yes') if condition == 3 else print('No')

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
def check(s):
  print("check:{}".format(s))
  n = len(s)
  n2 = int(n/2)
  if n < 3 or n%2 == 0:
    return False
  for i in range(0,n2):
    ni = n-i
    if s[i:i+1] != s[ni-1:ni]:
      return False
  return True

s = input('')
if check(s):
  
  n2 = int((len(s)-1)/2)
  s2 = s[0:n2]
  print("n:{} s:{}".format(n2,s2))
  if check(s2):
    
    n3 = int((len(s)+3)/2)
    s3 = s[n3-1:]
    print("n:{} s:{}".format(n3,s3))
    if check(s3):
      print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
  print('No')


import math
def check(s):
  #print("check:{}".format(s))
  n = len(s)
  n2 = math.ceil(n/2)
#  if n == 1:
#    return False
  for i in range(0,n2):
    ni = n-i
    if s[i:i+1] != s[ni-1:ni]:
      return False
  return True

s = input('')
if check(s):
  
  n2 = math.ceil((len(s)-1)/2)
  s2 = s[0:n2]
#  print("n:{} s:{}".format(n2,s2))
  if check(s2):
    
    n3 = math.ceil((len(s)+3)/2)
    s3 = s[n3-1:]
#    print("n:{} s:{}".format(n3,s3))
    if check(s3):
      print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
  print('No')


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()

n = len(s)
l = int((n-1)/2)
b = int((n+3)/2)

for i in range(l - int(l/2)):
    print(s[i])
    print(s[l-1-i])
    if not s[i] == s[l-1-i]:
        print('No')
        exit()

for i in range(n-b - int((n-b)/2)):
    print(s[b-1+i])
    print(s[n-1-i])
    if not s[b-1+i] == s[n-1-i]:
        print('No')
        exit()

for i in range(int(n/2)):
    if not s[i] == s[n-1-i]:
        print('No')
        exit()

print('Yes')


s = input()

n = len(s)
l = int((n-1)/2)
b = int((n+3)/2)

for i in range(l - int(l/2)):
    if not s[i] == s[l-1-i]:
        print('No')
        exit()

for i in range(n-b - int((n-b)/2)):
    if not s[b-1+i] == s[n-1-i]:
        print('No')
        exit()

for i in range(int(n/2)):
    if not s[i] == s[n-1-i]:
        print('No')
        exit()

print('Yes')


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
l=int((len(s)-1)/2)
s1 = s[:l]
s2 = s[l+1:]
print(s1, s2)
if(s==s[::-1] and s1==s1[::-1] and s2==s2[::-1]):
    print('Yes')
else:
    print('No')

s = input()
l=int((len(s)-1)/2)
s1 = s[:l]
s2 = s[l+1:]
if(s==s[::-1] and s1==s1[::-1] and s2==s2[::-1]):
    print('Yes')
else:
    print('No')

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = input()

S_reverse = ''.join(list(reversed(S)))
index = int((len(S) - 1) / 2)
index2 = int((len(S[:index]) - 1) / 2)

S_reverse_child = ''.join(list(reversed(S[:index])))

if S[:index] == S_reverse[:index]:
  if len(S[:index2]) >= 3 and S[:index2] == S_reverse_child[:index2]:
    print("Yes")
  else:
    print("No")
else:
  print("No")

S = input()
 
def ispalindrome(s):
    h = int(len(s) / 2)
    for a, b in zip(s[:h], reversed(s[h+1:])):
        if a != b: return 0
    return 1
 
index = int((len(S) - 1) / 2)
 
if ispalindrome(S) == 1:
  if ispalindrome(S[:index]) == 1:
    if len(S[:index]) >= 3:
      print("Yes")
    else:
      if len(S[:index]) == 1 and S[0] == S[2]:
        print("Yes")
      else:
        print("No")
  else:
    print("No")
else:
  print("No")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a = list(input())
if len(a)%4 != 3:
  print("No")
  exit()
else:
  b = a
  b.reverse()
  x = int((len(a)-1)/2)
  for i in range(x):
    if a[i] != b[i]:
      print("No")
      exit()
  c = a[:x]
  d = a[x+1:]
  print(c,d)
  y = int((len(c)-1)/2)
  for i in range(y):
    if c[i] != c[len(c)-i-1] or d[i] != d[len(c)-i-1]:
      print("No")
      exit()
  print("Yes")

a = list(input())
if len(a)%4 != 3:
  print("No")
  exit()
else:
  b = a
  b.reverse()
  x = int((len(a)-1)/2)
  for i in range(x):
    if a[i] != b[i]:
      print("No")
      exit()
  c = a[:x]
  d = a[x+1:]
  print(c,d)
  y = int((len(c)-1)/2)
  for i in range(y):
    if c[i] != c[len(c)-i-1] and d[i] != d[len(c)-i-1]:
      print("No")
      exit()
  print("Yes")

import copy
a = list(input())
if len(a) == 5:
  print("No")
  exit()
else:
  b = copy.copy(a)
  b.reverse()
  x = int((len(a)/2))
  for i in range(x):
    if a[i] != b[i]:
      print("No")
      exit()
  c = a[:x]
  d = a[x+1:]
  y = int((len(c)/2))
  for i in range(y):
    if c[i] != c[-(i+1)] or d[i] != d[-(i+1)]:
      print("No")
      exit()
  print("Yes")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
n = len(s)

if s[0:(n-1)/2] == s[(n+3)/2:]:
  print("Yes")
else:
  print("No")

s = input()
d = len(s)//2
print("Yes" if s[:d] == s[d+1:] "No" else)

s = input()
d = len(s)//2
print("Yes" if s[:d] == s[d+1:] "No" else)

s = input()
d = len(s)//2
print("Yes" if s[:d] == s[d+1:] else "No")

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
import sys
input=sys.stdin.readline
S = list(input())
n0 = len(S)
s1 = S[0:n0 //2 ]
s2 = S[n0 // 2 +1:n0]
c = 0
n1 = len(s1)
for i in range(n1):
  if s1[i] != s2[i]:
    c = 1
    break
if c == 0:
  print("Yes")
else:
  print("No")
  

import sys
input=sys.stdin.readline
S = list(input())
n0 = len(S)
def kaibun(S):
    c = 0
    N = len(S)
    n = N // 2
    for i in range(n):
        if S[i] != S[N-1-i]:
            c = 1
            break
    return c
if kaibun(S) == 0:
    s1 = S[0:n0 //2 ]
    s2 = S[n0 // 2 +1:n0]
    if kaibun(s1) == 0 and kaibun(s2) == 0:
        print("Yes")
    else:
        print("No")
else:
  print("No")

import sys
input=sys.stdin.readline
S = list(input())
n0 = len(S)
def kaibun(S):
    if S == S[::-1]:
        return 1
    else:
        return 0
if kaibun(S) == 1:
    s1 = S[0:n0 // 2]
    if kaibun(s1) == 1 :
        print("Yes")
    else:
        print("No")
else:
    print("No")

import sys
input=sys.stdin.readline
S = list(input())
n0 = len(S)
if n0 == 3:
    print("No")
else:

    def kaibun(S):
        c = 0
        N = len(S)
        n = N // 2
        for i in range(n):
            if S[i] != S[N-1-i]:
                c = 1
                break
        return c
    if kaibun(S) == 0:
        s1 = S[0:n0 //2 ]
        s2 = S[n0 // 2 +1:n0]
        print(s1)
        print(s2)
        if kaibun(s1) == 0 and kaibun(s2) == 0:
            print("Yes")
        else:
            print("No")
    else:
        print("No")

import sys
input=sys.stdin.readline
S = list(input())
n0 = len(S)
if n0 == 3:
    print("No")
else:

    def kaibun(S):
        if S == S[::-1]:
            return 1
        else:
            return 0
    if kaibun(S) == 1:
        s1 = S[0:n0 //2 ]
        s2 = S[n0 // 2 +1:n0]
        if kaibun(s1) == 1 and kaibun(s2) == 1:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
    

import sys
input=sys.stdin.readline
S = list(input())
n0 = len(S)
def kaibun(S):
    if S == S[::-1]:
        return 1
    else:
        return 0
if kaibun(S) == 1:
    s1 = S[0:n0 //2 ]
    s2 = S[n0 // 2 +1:n0]
    if kaibun(s1) == 1 and kaibun(s2) == 1:
        print("Yes")
    else:
        print("No")
else:
    print("No")

import sys
input=sys.stdin.readline
S = input()[:-1]
n = len(S)
def kaibun(S):
    if S == S[::-1]:
        return 1
    else:
        return 0
if kaibun(S) == 0:
    print("No")
else:
    s1 = S[0:n // 2]
    if kaibun(s1) == 1:
        print("Yes")
    else:
        print("No")


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a=list(input())
n=len(a)
b=a[:int((n-1)/2)+1]
c=a[int((n+3)/2):]

anal = a==reversed(a)
manco = b==reversed(b)
portio = c==reversed(c)
 
if anal and manco and portio:
  print('Yes')
else:
  print('No')

s=list(input())
n=len(s)
a=all([p==q for p,q in zip(s,reversed(s))])
b=all([p==q for p,q in zip(s[:(n-1)//2],reversed(s[:(n-1)//2]))])
c=all([p==q for p,q in zip(s[(n+3)//2-1:],reversed(s[(n+3)//2-1:]))])

if a and b and c:
  print('Yes')
else:
  print('No')

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
string_values = list(input())
size = len(string_values)
half_size = int((size - 1) / 2)
half_last_size = int((size + 3) / 2)

count = 0
is_true = True
for string_value in string_values:
    if string_value != string_values[size - count - 1]:
        is_true = False
    if count > half_size:
        break
    count += 1

count = 0
for string_value in string_values:
    if string_value != string_values[half_size - count - 1]:
        is_true = False
    if count + 1 == half_size:
        break
    count += 1

count = 0
check_count = 0
for string_value in string_values:
    if count + 1 < half_last_size:
        count += 1
        continue
    if string_value != string_values[size - check_count - 1]:
        is_true = False
        check_count += 1
    count += 1


answer = "No"
if is_true:
    answer = "Yes"
print(answer)


string_values = list(input())
size = len(string_values)
half_size = int((size - 1) / 2)
half_last_size = int((size + 3) / 2)

count = 0
is_true = True
for string_value in string_values:
    if string_value != string_values[size - count - 1]:
        is_true = False
    if count > half_size:
        break
    count += 1

count = 0
for string_value in string_values:
    if string_value != string_values[half_size - count - 1]:
        is_true = False
    if count + 1 == half_size:
        break
    count += 1

count = 0
check_count = 0
for string_value in string_values:
    if count + 1 < half_last_size:
        count += 1
        continue
    if string_value != string_values[size - check_count - 1]:
        is_true = False
    check_count += 1
    count += 1


answer = "No"
if is_true:
    answer = "Yes"
print(answer)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
sel='B'
#A
if sel=='A':
    N,M=map(int,input().split())
    ans=0
    ans+=M*(M-1)//2
    ans+=N*(N-1)//2
    print(ans)

#B
if sel=='B':
    def ispal(s):
        for i in range(len(s)//2+1):
            if s[i]!=s[-(i+1)]:
                return False
        return True

    S=input()
    if ispal(S) and ispal(S[:(N-1)//2]) and ispal(S[(N+3)//2-1:]):
        print('Yes')
    else:
        print('No')

#C
if sel=='C':
    L=int(input())
    print((L**3)/27)

#D
if sel=='D':    
    N=int(input())
    A=[int(i) for i in input().split()]
    kin=list(set(A))
    cnt={}
    for k in kin:
        cnt[k]=0
    for a in A:
        cnt[a]+=1
    SUM=0
    for k in kin:
        SUM+=cnt[k]*(cnt[k]-1)//2
    for a in A:
        if cnt[a]>=2:
            print(SUM-cnt[a]+1)
        else:
            print(SUM)
        
#E
if sel=='E':
    a=0

#F
if sel=='F':
    N,S=map(int,input().split())
    A=[int(i) for i in input().split()]

    for l in range(N):
        for r in range(l,N):
            print(tab[l][r])



sel='B'
#A
if sel=='A':
    N,M=map(int,input().split())
    ans=0
    ans+=M*(M-1)//2
    ans+=N*(N-1)//2
    print(ans)

#B
if sel=='B':
    def ispal(s):
        for i in range(len(s)//2+1):
            if s[i]!=s[-(i+1)]:
                return False
        return True

    S=input()
    N=len(S)
    if ispal(S) and ispal(S[:(N-1)//2]) and ispal(S[(N+3)//2-1:]):
        print('Yes')
    else:
        print('No')

#C
if sel=='C':
    L=int(input())
    print((L**3)/27)

#D
if sel=='D':    
    N=int(input())
    A=[int(i) for i in input().split()]
    kin=list(set(A))
    cnt={}
    for k in kin:
        cnt[k]=0
    for a in A:
        cnt[a]+=1
    SUM=0
    for k in kin:
        SUM+=cnt[k]*(cnt[k]-1)//2
    for a in A:
        if cnt[a]>=2:
            print(SUM-cnt[a]+1)
        else:
            print(SUM)
        
#E
if sel=='E':
    a=0

#F
if sel=='F':
    N,S=map(int,input().split())
    A=[int(i) for i in input().split()]

    for l in range(N):
        for r in range(l,N):
            print(tab[l][r])



Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
S=input()
N=len(S)
def chk(s):
  n=len(s)
  for i in range(n//2):
    if s[i]!=s[n-1-i]:
      return False
if chk(S) and chk(S[:((N-1)//2)+1]) and chk(S[(N+3)//2:]):
  print('Yes')
else:
  print('No')

S=input()
N=len(S)
def chk(s):
  n=len(s)
  for i in range(n//2):
    if s[i]!=s[n-1-i]:
      return False
  return True
if chk(S) and chk(S[:((N-1)//2)]) and chk(S[(N+3)//2-1:]):
  print('Yes')
else:
  print('No')

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = str(input())
n = len(s)
s1 = s[:(n-1)/2]
if s != s[::-1] or s1 != s1[::-1]:
  print('No')
else:
  print('Yes')

s = str(input())
n = len(s)
if ((n+1)/2)%2 != 0:
  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)):
    print('Yes')
  else:
    print('No')
else:
  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)):
    print('Yes')
  else:
    print('No')

s = str(input())
n = len(s)
s1 = s[:int((n-1)/2)]
if s != s[::-1] or s1 != s1[::-1]:
  print('No')
else:
  print('Yes')


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
def check_palindrome(s):
  n = len(s)
  return all([s[i] == s[n - 1 - i] for i in range(n // 2)])


def main():
  s = input()
  n = len(s)
  print(check_palindrome(s) and check_palindrome(s[:n // 2]))


main()


def check_palindrome(s):
  n = len(s)
  return all([s[i] == s[n - 1 - i] for i in range(n // 2)])


def main():
  s = input()
  n = len(s)
  print('Yes' if check_palindrome(s) and check_palindrome(s[:n // 2]) else 'No')


main()


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
if S = S[::-1] and S[0:(N-3)/2] = S[0:(N-3)/2:-1]:
    print ('Yes')
else:
    print ('No')

S = input()
N = len(S)
K = (N-3)//2
if S == S[::-1] and S[0:K] == S[0:K:-1]:
    print ('Yes')
else:
    print ('No')

S = input()
N = len(S)
if S == S[::-1] and S[0:(N-3)//2] == S[0:(N-3)//2:-1]:
    print ('Yes')
else:
    print ('No')

S = input()
N = len(S)
K = (N-1)//2
if S == S[::-1] and S[0:K] == S[0:K:-1]:
    print ('Yes')
else:
    print ('No')

S = input()
N = len(S)
K = (N-3)//2
if S == S[::-1] and S[0:K] == S[K:0]:
    print ('Yes')
else:
    print ('No')

S = input()
N = len(S)
if 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]:
    print ('Yes')
else:
    print ('No')

S = input()
N = len('S')
if S == S[::-1] and S[0:(N-3)/2] == S[0:(N-3)/2:-1]:
    print ('Yes')
else:
    print ('No')

S = input()
N = len(S)
if S == S[::-1] and S[0:(N-3)//2] == S[0:(N-3)//2:-1]:
    print ('Yes')
else:
    print ('No')

S = input()
N = len('S')
if S = S[::-1] and S[0:(N-3)/2] = S[0:(N-3)/2:-1]:
    print ('Yes')
else:
    print ('No')

S = str(input())
N = len(S)
if 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]:
    print ('Yes')
else:
    print ('No')


S = input()
N = len(S)
if S == S[::-1] and S[0:(N-3)/2] == S[0:(N-3)/2:-1]:
    print ('Yes')
else:
    print ('No')

S = input()
N = len(S)
if S = S[::-1] and S[0:(N-3)/2] = S[0:(N-3)/2:-1]:
    print ('Yes')
else:
    print ('No')

S = input()
N = int(len(S))
if 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]:
    print ('Yes')
else:
    print ('No')

S = input()
N = len(S)
K = (N-3)//2
if S == S[::-1] and S[0:K] == S[K:0:-1]:
    print ('Yes')
else:
    print ('No')

Verdicts: 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
Problem: 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.

Submission attempts (in order):
def checkStr(str):
  n = len(str)
  if n % 2 == 0:
    for i in range(int(n/2)):
      if str[i] != str[n-i-1]:
        return False
  else:
    for i in range(int((n-1)/2)):
      if str[i] != str[n-i-1]:
        return False
  return True


s = input()
print(checkStr(s[0:int((len(s)-1)/2)]) and checkStr(s) and checkStr(s[int((len(s)+3)/2)-1:]))

def checkStr(str):
  n = len(str)
  if n % 2 == 0:
    for i in range(int(n/2)):
      if str[i] != str[n-i-1]:
        return False
  else:
    for i in range(int((n-1)/2)):
      if str[i] != str[n-i-1]:
        return False
  return True


s = input()
if checkStr(s[0:int((len(s)-1)/2)]) and checkStr(s) and checkStr(s[int((len(s)+3)/2)-1:]):
  print('Yes')
else:
  print('No')

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
palindrom = input()
if palindrom != palindrom[::-1]:
  return "No"
n = (len(palindrom)-1)/2
if palindrom[:n] != palindrom[:n:-1]:
  return "No"
n2 = (len(palindrom)+3)/2
if palindrom[:n2] != palindrom[:n2:-1]:
  return "No"
else
	reutn "Yes"

palindrom = input()
if palindrom != palindrom[::-1]:
	return "No"
n = (len(palindrom)-1)/2
if palindrom[:n] != palindrom[:n:-1]:
	return "No"
n2 = (len(palindrom)+3)/2
if palindrom[:n2] != palindrom[:n2:-1]:
	return "No"
else
	return "Yes"

palindrom = str(input())
if palindrom != palindrom[::-1]:
  return "No"
else:
  return "Yes"

palindrom = input()
if palindrom != palindrom[::-1]:
  return "No"
n = (len(palindrom)-1)/2
if palindrom[:n] != palindrom[:n:-1]:
  return "No"
n2 = (len(palindrom)+3)/2
if palindrom[:n2] != palindrom[:n2:-1]:
  return "No"
else:
  return "Yes"

s=list(input())
N=len(s)
s2=s[:(N-1)//2]
s3=s[((N+3)-1)//2:N+1]
if s==list(reversed(s)) and s2==list(reversed(s2)) and s3==list(reversed(s3)):
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):

def check_str( ss ):
  sslen = len(ss)
  
  #ccnt = 0
  #for c in ss:
  #  if( ss[0] == c ):
  #    ccnt+=1
  
  if( sslen == ccnt ):
    return False
  
  return (ss[:sslen//2] == ss[sslen//2+1:][::-1])
  
s = input()

slen = len(s)

if( not check_str( s ) ):
  print( "No" )
else:
#print(s[:slen//2])
#print(s[slen//2+1:][::-1])

  s1 =  s[:slen//2]
  s2 = s[slen//2+1:]
  
  
  if( (not check_str( s1 )) or (not check_str( s2 )) ):
    print( "No" )
  else:
    print( "Yes" )

#s1 = s[:len(s)-1]

#s1


def check_str( ss ):
  sslen = len(ss)
  
  if( sslen %2 == 0 ): 
    return (ss[:sslen//2] == ss[sslen//2:][::-1])
  else:
  	return (ss[:sslen//2] == ss[sslen//2+1:][::-1])
  
s = input()

slen = len(s)

if( not check_str( s ) ):
  print( "No" )
else:
#print(s[:slen//2])
#print(s[slen//2+1:][::-1])

  s1 =  s[:slen//2]
  s2 = s[slen//2+1:]
  
  
  if( (not check_str( s1 )) or (not check_str( s2 )) ):
    print( "No" )
  else:
    print( "Yes" )

#s1 = s[:len(s)-1]

#s1



Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
length = len(s)
ans = ''

def solver(string):
  if string==string[::-1]:
    return 'Yes'
  else:
    return 'No'

ans = solver(s)
ans = solver(s[:int((length - 1) / 2 - 1)])
ans = solver(s[int((length - 3) / 2 - 1) :])

print(ans)

s = input()
n = len(s) 
ans = "No"
if s[:n//2] == s[:n//2][::-1]:
    if s[-n//2 + 1:] == s[-n//2 + 1:][::-1]:
        if s == s[::-1]:
            ans = "Yes"
print(ans)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n=len(s)
x=n//2
a=s[0:x]
b=s[x+1:]
if a==b:print('Yes')
else:print('No')

s=input()
n=len(s)
x=n//2
a=s[0:x]
b=s[x+1:]
if a==b:print('Yes')
else:print('No')

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
N = len(S)

if S = S[::-1]:
  if S[:(n-1)//2] == S [(n+1)//2:]:
    print("Yes")
  else:
    print("No")
else:
  print("No")

S = input()
N = len(S)

if S == S[::-1]:
  if S[:(n-1)//2] == S [(n+1)//2:]:
    print("Yes")
  else:
    print("No")
else:
  print("No")

S = input()
N = len(S)

if S == S[::-1]:
  if S[:(N-1)//2] == S [(N+1)//2:]:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
s=str(input())
def isPalin(l,r):
  if l >= r:
    return True
  if s[l]!=s[r]:
    return False:
  return isPalin(l+1,r-1)
n = len(s)
if isPalin(0,n-1) and isPalin(0,n//2-1) and isPalin(n//2+1,n-1):
  print('Yes')
else:
  print('No')

s=str(input())
def isPalin(l,r):
  if l >= r:
    return True
  if s[l]!=s[r]:
    return False
  return isPalin(l+1,r-1)
n = len(s)
if isPalin(0,n-1) and isPalin(0,n//2-1) and isPalin(n//2+1,n-1):
  print('Yes')
else:
  print('No')

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
def is_palindrome(s):
    return s == s[::-1]

s_len = len(s)
if is_palindrome(s):
    print(s[:(s_len-1)//2])
    if is_palindrome(s[:(s_len-1)//2]):    
        print(s[(s_len+3)//2-1:])
        if is_palindrome(s[(s_len+3)//2-1:]):
            print("Yes")
else:
    print("No")

s = input()
def is_palindrome(s):
    return s == s[::-1]

s_len = len(s)
if is_palindrome(s) and is_palindrome(s[:(s_len-1)//2]) and is_palindrome(s[(s_len+3)//2-1:]):
    print("Yes")
else:
    print("No")


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
n = len(S)
p = (n-1)//2
q = (n+3)//2 - 1
A = S[:p]
B = S[q:]
ans = 'Yes'
for i in range(len(S)):
    if S[i] != S[-i-1]:
        ans = 'No
for i in range(len(A)):
    if A[i] != A[-i-1]:
        ans = 'No'
for i in range(len(B)):
    if B[i] != B[-i-1]:
        ans = 'No'
print(ans)


S = input()
n = len(S)
p = (n-1)//2
q = (n+3)//2 - 1
A = S[:p]
B = S[q:]
ans = 'Yes'
for i in range(len(A)):
    if A[i] != A[-i-1]:
        ans = 'No'
for i in range(len(B)):
    if B[i] != B[-i-1]:
        ans = 'No'

S = input()
n = len(S)
p = (n-1)//2
q = (n+3)//2 - 1
A = S[:p]
B = S[q:]
ans = 'Yes'
for i in range(len(S)):
    if S[i] != S[-i-1]:
        ans = 'No'
for i in range(len(A)):
    if A[i] != A[-i-1]:
        ans = 'No'
for i in range(len(B)):
    if B[i] != B[-i-1]:
        ans = 'No'
print(ans)


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = list(input())
s_f = s[0: (len(s) - 1) // 2]
s_b = s[(len(s) + 3) // 2 - 1:len(s)]

if (s != s[::-1]) or (s_f != s_f[::-1]) or (s_b != s_b[::-1]):
    print('No')
else:
    print('Yes')

print(s_f, s_b)


s = list(input())
s_f = s[0: (len(s) - 1) // 2]
s_b = s[(len(s) + 3) // 2 - 1:len(s)]

if (s != s[::-1]) or (s_f != s_f[::-1]) or (s_b != s_b[::-1]):
    print('No')
else:
    print('Yes')


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s=input()
n=len(s)
for i in range(n):
    if not s[i]==s[n-1-i]:
        print('No')
        quit()
for i in range(int(n*(n-1)/2)):
    if not s[i]==s[int((n*(n-1))/2)-1-i]:
        print('No')
        quit()
for i in range(int(n*(n-1)/2)):
    if not s[int(n*(n+3)/2)-1+i]==s[n-1-i]:
        print('No')
        quit()
else:
    print('Yes')

s=input()
n=len(s)
for i in range(n):
    if not s[i]==s[n-1-i]:
        print('No')
        quit()
for i in range((n-1)//2):
    if not s[i]==s[(n-1)//2-1-i]:
        print('No')
        quit()
for i in range((n-1)//2):
    if not s[(n+3)//2-1+i]==s[n-1-i]:
        print('No')
        quit()
print('Yes')

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
import math
a= input()
length=math.floor(len(a)/2)
def kaibun(p):
    length_p=math.floor(len(p)/2)
    total_p = 0
    for i in range(length_p):
        if p[i] is not p[-1*i -1]:
            return False
            break
        else:
            total_p += 1
        if total_p == length_p:
            return True
if kaibun(a):
    if kaibun(a[:length+1]):
        print('Yes')
    elif length==1:
        print('Yes')
    else:
        print('No')
else:
    print('No')



import math
a= input()
length=math.floor(len(a)/2)
def kaibun(p):
    length_p=math.floor(len(p)/2)
    total_p = 0
    for i in range(length_p):
        if p[i] is not p[-1*i -1]:
            return False
            break
        else:
            total_p += 1
        if total_p == length_p:
            return True
if kaibun(a):
    if kaibun(a[:length]):
        print('Yes')
    elif length==1:
        print('Yes')
    else:
        print('No')
else:
    print('No')

 

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
# -*- coding: utf-8 -*-


def main():
    import sys
    input = sys.stdin.readline

    s = input()
    n = len(s)

    if s == s[::-1]:
        t = s[:(n - 1) // 2]
        u = s[(n + 3) // 2 - 1:]

        if t == t[::-1] and u == u[::-1]:
            print('Yes')
        else:
            print('No')
    else:
        print('No')


if __name__ == '__main__':
    main()


# -*- coding: utf-8 -*-


def main():
    s = input()
    n = len(s)

    if s == s[::-1]:
        t = s[:(n - 1) // 2]
        u = s[(n + 3) // 2 - 1:]

        if t == t[::-1] and u == u[::-1]:
            print('Yes')
        else:
            print('No')
    else:
        print('No')


if __name__ == '__main__':
    main()


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
if s == s[::-1]:
  
  p = int((n-1)/2)
  f = s[:p]
  if f == f[::-1]:
    
    q = int((n+3)/2)
    l = s[q-1:]
    if l == l[::-1]:
      print("Yes")
    else:
      print("No")
  else:
    print("No")
else:
  print("No")

s = input()
n = len(s)

if s == s[::-1]:
  
  p = int((n-1)/2)
  f = s[:p]
  if f == f[::-1]:
    
    q = int((n+3)/2)
    l = s[q-1:]
    if l == l[::-1]:
      print("Yes")
    else:
      print("No")
  else:
    print("No")
else:
  print("No")

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
S=list(input())
n=len(S)
ans='No'
if S==list(reversed(S)):
    new=S[0:((n-1)//2)]
    if new==list(reversed(new)):
        new2=S[((n+3)//2):N+1]
        if new2==list(reversed(new2)):
            ans='Yes'
print(ans)

S=list(input())
n=len(S)
ans='No'
if S==list(reversed(S)):
    new=S[0:((n-1)//2)]
    if new==list(reversed(new)):
        new2=S[((n+3)//2):n+1]
        if new2==list(reversed(new2)):
            ans='Yes'
print(ans)

S=list(input())
n=len(S)
ans='NO'
if S==list(reversed(S)):
    new=S[0:((n-1)//2)]
    if new==list(reversed(new)):
        new2=S[((n+3)//2):N+1]
        if new2==list(reversed(new2)):
            ans='YES'
print(ans)

S=list(input())
n=len(S)
ans='No'
if S==list(reversed(S)):
    new=S[0:((n-1)//2)]
    if new==list(reversed(new)):
        new2=S[((n+3)//2)-1:]
        if new2==list(reversed(new2)):
            ans='Yes'
print(ans)

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Accepted