Problem:


Score : 200 points

Problem Statement

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.

Constraints

S consists of lowercase English letters.

The length of S is an odd number between 3 and 99 (inclusive).

Input

Input is given from Standard Input in the following format:

S

Output

If S is a strong palindrome, print Yes;
otherwise, print No.

Sample Input 1

akasaka

Sample Output 1

Yes

S is akasaka.

The string formed by the 1-st through the 3-rd characters is aka.

The string formed by the 5-th through the 7-th characters is aka.
All of these are palindromes, so S is a strong palindrome.

Sample Input 2

level

Sample Output 2

No

Sample Input 3

atcoder

Sample Output 3

No



Sample input:
akasaka


Sample output:
Yes

Submission status: Wrong Answer

Solution code:
def solve(s):
  s = list(s)
  n = len(s)
  ans = check_palindrome(s) & check_palindrome(s[0:int(((n-1)//2))]) & check_palindrome(s[0:int(((n+3)//2))])
  return "Yes" if ans else "No"


def check_palindrome(st):
  a = list(st)
  b = list(reversed(st))
  return a == b




s = str(input())
# n, m = [int(s) for s in input().split(" ")]
print(solve(s))

Submission status: Wrong Answer

Solution code:
def kaibun(x):
  if(x != ''.join(list(reversed(x)))):
    return 0
  else:
    return 1

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

  num1 = kaibun(s[:int((s_num - 1)/2)])
  num2 = kaibun(s[(int((s_num + 1)/2)):s_num])

  if(num1 == 1 and num2 == 1):
    if(s == ''.join(list(reversed(s)))):
      print('Yes')
  else:
    print('No')

if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
def kaibun(x):
  if(x != ''.join(list(reversed(x)))):
    return 0
  else:
    return 1

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

  num1 = kaibun(s[:int((s_num - 1)/2)])
  num2 = kaibun(s[(int((s_num + 3)/2) - 1):s_num])

  if(num1 == 1 and num2 == 1):
    if(s == ''.join(list(reversed(s)))):
      print('Yes')
  else:
    print('No')

if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
def kaibun(x):
  for i in range(int(len(x)/2)):
    if(x[i] != x[(-1) - i]):
      return 0

  return 1

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

  num1 = kaibun(s[:int((s_num - 1)/2)])
  num2 = kaibun(s[(int((s_num + 3)/2) - 1):s_num])

  if(num1 == 1 and num2 == 1):
    if(s[:int((s_num - 1)/2)] == s[(int((s_num + 3)/2) - 1):s_num]):
      print('Yes')
  else:
    print('No')

if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
def kaibun(x):
  for i in range(int(len(x)/2)):
    if(x[i] != x[(-1) - i]):
      return 0

  return 1

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

  num1 = kaibun(s[:int((s_num - 1)/2)])
  num2 = kaibun(s[int((s_num + 3)/2 - 1):s_num])

  if(num1 == 1 and num2 == 1):
    if(s[:int((s_num - 1)/2)] == s[int((s_num + 3)/2 - 1):s_num]):
      print('Yes')
  else:
    print('No')
if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
def kaibun(x):
  for i in range(int(len(x)/2)):
    if(x[i] != x[(-1) - i]):
      return 0

  return 1

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

  num1 = kaibun(s[:int((s_num - 1)/2)])
  num2 = kaibun(s[int((s_num + 3)/2 - 1):s_num])

  if(num1 == 1 and num2 == 1):
    if(s[:int((s_num - 1)/2)] and s[int((s_num + 3)/2 - 1):s_num]):
      print('Yes')
  else:
    print('No')
if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
def kaibun(x):
  for i in range(int(len(x)/2)):
    if(x[i] != x[(-1) - i]):
      return 0

  return 1

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

  num1 = kaibun(s[:int((s_num - 1)/2)])
  num2 = kaibun(s[int((s_num + 3)/2 - 1):s_num])

  if(num1 == 1 and num2 == 1):
    print('Yes')
  else:
    print('No')
if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
def kaibun(x):
  for i in range(int(len(x)/2)):
    if(x[i] != x[int(len(x)/2) - i - 1]):
      return 0

  return 1

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

  num1 = kaibun(s[:int((s_num - 1)/2)])
  num2 = kaibun(s[int((s_num + 3)/2 - 1):s_num])

  if(num1 == 1 and num2 == 1):
    print('Yes')
  else:
    print('No'
    )
if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)

flag=True
for i in range(N//2):
    if S[i]!=S[N-i-1]:
        flag=False
if flag==True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a = input()
b = len(a)
c = (b-1)//2
d = (b+3)//2 - 1
e = a[0: c]
f = a[d: b]

if e == e[::-1] and f == f[::-1]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
class atcorder:
    
    S=list(input())
    inv=list(reversed(S))
    i=0
    j=0
    if S==inv:
        i+=1
        
    N=int((len(S)-1)/2)
    for x in range(N-1):
        if S[x]==S[N-1-x] and inv[x]==inv[N-1-x]:
            pass
        else:
            j+=1
                
    if j==0 and i==1:
        print('yes')
    else:
        print('no')

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
s1 = s[0:(n-1)//2]
s2 = s[(n+1)//2:n]

def check(s):
    sr = s[::-1]
    if s == sr:
        return True
    else:
        return False
    
if check(s1) and check(s2):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import math
s = input()
n = len(s)
m = math.floor((n + 1) / 2)
left = False
right = False
for i in range(m - 1):
    if s[i] == s[m - i - 2] and 2 * i != m - 2:
        left = True
    if s[m + i] == s[n - i - 1] and 2 * i != n - m - 1:
        right = True
if left and right:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
if S != S[::-1]:
    for i in range(N):
        if S[i] != S[N-i-1]:
            print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
s = list(input())
n = len(s)

def kaibun(st):
  sta = list()
  for k in range(len(st)//2):
    sta.append(st[k])
  for k in range(len(st)//2):
    if st[-(-len(st)//2)+k] != sta.pop():
      return False
  return True

if kaibun(s) == False:
  print('False')
elif kaibun(s[:(n-1)//2]) == False:
  print('False')
elif kaibun(s[(n+3)//2-1:]) == False:
  print('False')
else:
  print('True')

Submission status: Wrong Answer

Solution code:
import sys
S = input()

if (len(S)%2 == 0):
    print('No')
    sys.exit()

N1 = int((len(S)-1) / 2)
N3 = int((len(S)+3) / 2)

sl = []
nl = []
for i in range(N1):
    sl.append(S[i])

for j in range(N3-1, len(S)):
    nl.append(S[j])

moji1= ''
for x in sl:
    moji1 = moji1+ x

moji2 = ''
for x in nl:
    moji2 = moji2 + x

remoji1 = list(reversed(moji1))
remoji2 = list(reversed(moji2))

if moji1 == ''.join(remoji1) and moji2 == ''.join(remoji2):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys
S = input()

if (len(S)%2 == 0):
    print('No')
    sys.exit()

N1 = int((len(S)-1) / 2)
N3 = int((len(S)+3) / 2)

print(N1,N3)

sl = []
nl = []
for i in range(N1):
    sl.append(S[i])

for j in range(N3-1, len(S)):
    nl.append(S[j])

print(sl,nl)
moji1= ''
for x in sl:
    moji1 = moji1+ x

moji2 = ''
for x in nl:
    moji2 = moji2 + x

remoji1 = list(reversed(moji1))
remoji2 = list(reversed(moji2))

if moji1 == ''.join(remoji1) and moji2 == ''.join(remoji2):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()

N1 = int((len(S)-1) / 2)
N3 = int((len(S)+3) / 2)



sl = []
nl = []
for i in range(N1):
    sl.append(S[i])

for j in range(N3-1, len(S)):
    nl.append(S[j])

moji1= ''
for x in sl:
    moji1 = moji1+ x

moji2 = ''
for x in nl:
    moji2 = moji2 + x

remoji1 = list(reversed(moji1))
remoji2 = list(reversed(moji2))

if moji1 == ''.join(remoji1) and moji2 == ''.join(remoji2):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()

N1 = (len(S)-1) // 2
N3 = (len(S)+3) // 2

sl = []
nl = []
for i in range(N1):
    sl.append(S[i])

for j in range(N3-1, len(S)):
    nl.append(S[j])

moji1= ''
for x in sl:
    moji1 = moji1+ x

moji2 = ''
for x in nl:
    moji2 = moji2 + x

remoji1 = list(reversed(moji1))
remoji2 = list(reversed(moji2))

if moji1 == ''.join(remoji1) and moji2 == ''.join(remoji2):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()

N1 = (len(S)-1) // 2
N3 = (len(S)+3) // 2

sl = []
nl = []
for i in range(N1):
    sl.append(i)

for j in range(N3):
    nl.append(j)

moji1= ''
for x in sl:
    moji1.join(S[x])

moji2 = ''
for x in nl:
    moji2.join(S[x])

remoji1 = list(reversed(moji1))
remoji2 = list(reversed(moji2))

if moji1 == ''.join(remoji1) and moji2 == ''.join(remoji2):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
a = S[0:(N-1)//2]
b = S[(N+3)//2-1:]


def k(a):
    for i in range(len(a)):
        if a[i] != a[len(a)-1-i]:
            return False
        else:
            return True

if k(S) & k(a) & k(b):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()

def check(s):
  if len(s) == 1 or len(s) == 0:
    return True
  if s[0]!=s[-1]:
    return False
  return check(s[1:-1])

mid = len(s)//2

if check(s) and check(s[0:mid]) and check(s[mid:]):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s = input()

def check(s):
  if len(s) == 1 or len(s) == 0:
    return "Yes"
  if s[0]!=s[-1]:
    return "No"
  return check(s[1:-1])

print(check(s))

Submission status: Wrong Answer

Solution code:
s = input()
for i in range(0,len(s)//2):
  if (s[i]!=s[-i-1]):
    print("No")
    break
  if (i == len(s)//2-1):
    print("Yes")

Submission status: Wrong Answer

Solution code:
s = input()
for i in range(0,len(s)//2):
  if (s[i]!=s[-i-1]):
    print("No")
print("Yes")

Submission status: Wrong Answer

Solution code:
s = input()
for i in range(1,len(s)//2):
  if (s[i-1]!=s[-i]):
    print("No")
print("Yes")

Submission status: Wrong Answer

Solution code:
s = input()
for i in range(1,len(s)):
  if (s[i-1]!=s[-i]):
    print("No")
print("Yes")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
for i in range((n-1)//2):
  if s[i]!=s[(n-1)//2-1-i] or s[i+(n-1)//2+1]!=s[(n-1)-i]:
    print('No')
    exit()
print('Yes')

Submission status: Wrong Answer

Solution code:
s= str(input())
ans= "Yes"
if s != s[::-1]:
    ans = "No"
    exit()
else:
    s1 = s[:len(s)//2]
    s2 = s[len(s)//2+1:]
    if (s1!=s2):
        ans = "No"
    else:
        ans= "Yes"
print(ans)

Submission status: Wrong Answer

Solution code:
s= input()
l = list(s)
ans= "Yes"
for i in range(0,(len(s)-1)//2):
    if(l[i]!=l[-1-i]):
        ans = "No"
        break
    else:
        s1 = s[:len(s)//2]
        s2 = s[len(s)//2+1:]
        if s1!=s2:
            print("No")
        else:
            print("Yes")
print(ans)

Submission status: Wrong Answer

Solution code:
s= input()
l = list(s)
ans= "Yes"
for i in range(0,(len(s)-1)//2):
  if(l[i]!=l[-1-i]):
    ans = "No"
print(ans)

Submission status: Wrong Answer

Solution code:
s= input()
l = list(s)
ans= "Yes"
for i in range(0,(len(s)//2)+1):
  if(l[i]!=l[-1-i]):
    ans = "No"
print(ans)

Submission status: Wrong Answer

Solution code:
s= input()
l = list(s)
ans= "0"
for i in range(0,len(s)//2):
    if(l[i]==l[-1-i]):
        ans = "Yes"
    else:
        ans = "No"
    
print(ans)

Submission status: Wrong Answer

Solution code:
s= input()
l = list(s)
ans= "0"
for i in range(0,len(s)//2):
    if(l[i]!=l[-1-i]):
        ans = "No"
    else:
        ans = "Yes"
    
print(ans)

Submission status: Wrong Answer

Solution code:
s= input()
l = list(s)
ans= "Yes"
for i in range(0,len(s)//2):
  if(l[i]!=l[-1-i]):
    ans = "No"
print(ans)

Submission status: Wrong Answer

Solution code:
s= input()
l = list(s)
ans= "No"
for i in range(0,(len(s)-1)//2):
  if(l[i]!=l[-1-i]):
    ans = "No"
print(ans)

Submission status: Wrong Answer

Solution code:
def check(a):
    i=0
    j=len(a)-1
    b=True
    while(i<=j):
        if(a[i]!=a[j]):
            return False
        i+=1;
        j-=1
    return b


a=(input())
b=a[:(len(a)-1)//2:]
c=a[(len(a)+3)//2::]
if(check(a)==True and check(b)==True and check(c)==True):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
a = S[0:(N-1)//2]
b = S[(N+3)//2-1:]

def kaibun(l):
    for i in range(len(l)):
        if l[i] != l[len(l)-1-i]:
            return(False)
    return(True)

print(kaibun(S))
print(a)
print(kaibun(a))
print(b)
print(kaibun(b))
  
if kaibun(S) & kaibun(a) & kaibun(b):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
a = S[1:((N-1)//2)]
b = S[((N+3)//2):]

def kaibun(l):
    for i in range(len(l)):
        if l[i] != l[len(l)-1-i]:
            return(False)
    return(True)

if kaibun(S) & kaibun(a) & kaibun(b):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
a = S[1:(N-1)//2]
b = S[(N+3)//2:]

def kaibun(l):
    for i in range(len(l)):
        if l[i] != l[len(l)-1-i]:
            return(False)
    return(True)

  
if kaibun(S) & kaibun(a) & kaibun(b):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = [i for i in input()]
len_s = len(s)

def reverse(s):
  rev = [j for j in s[::-1]]
  return rev

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

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    s = input()
    for i in range((len(s) - 1) // 2):
        if s[i] != s[-i - 1]:
            print("No")
            exit(0)

    print("Yes")

Submission status: Wrong Answer

Solution code:
def main():
    S=input()
    N=int(len(S))

    if N%2==0:
        print("No")
        return

    a=S[:int((N-1)/2)]
    z=S[int(((N-1)/2)+1):]

    str=[S,a,z]

    for i in str:
        x="".join(list(reversed(i)))
        if i==x:
            print("Yes")
            return
        else :
            print("No")
            return

main()

Submission status: Wrong Answer

Solution code:
import math

S = input("")
S_list = list(S)
N = len(S_list)
N = int(N)
k_0 = 0
k_1 = 0
k_2 = 0
a = math.floor((N-1)/2)
b = math.floor((N-3)/4)
c = math.floor((N+1)/2)

for i in range(a):
    if S_list[i] != S_list[N-i-1]:
        k_0 += 1


if N>5:
    for i in range(b):
        if S_list[i] != S_list[a-i-1]:
            k_1 += 1
elif N == 5:
    if S_list[0] != S_list[1]:
            k_1 += 1


if N>5:
    for i in range(b):
        if S_list[c-i] != S_list[N-i-1]:
            k_2 += 1
elif N == 5:
    if S_list[0] != S_list[1]:
            k_2 += 1


if k_0==0 and k_1==0 and k_2==0:
    print("Yes")
else:
    print ("No")

Submission status: Wrong Answer

Solution code:
def kaibun(S):
    N = len(S)
    harf = int(N / 2)
    a = S[:harf]
    b = S[-harf:][::-1]
    return a,b

S = input()
flag = 0
a,b = kaibun(S)
if a == b:
    a1,a2 = kaibun(a)
    if a1 == a2:
        b1,b2 = kaibun(b)
        if b1 == b2:
            flag = 0
        else:
            flag = 1
    else:
        flag = 1
else:
    flag = 1

if flag == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def kaibun(S):
    N = len(S)
    harf = int(N / 2)
    a = S[:harf]
    b = S[-harf:]
    return a,b

S = input()
flag = 0
a,b = kaibun(S)
if a == b:
    a1,a2 = kaibun(a)
    if a1 == a2:
        b1,b2 = kaibun(b)
        if b1 == b2:
            flag = 0
        else:
            flag = 1
    else:
        flag = 1
else:
    flag = 1

if flag == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def kaibun(S):
    N = len(S)
    harf = int(N / 2)
    if harf == 1:
        a = S[:harf]
        b = S[-harf:]
    else:
        a = S[:harf]
        b = S[harf+1:]
    return a,b

S = input()
flag = 0
a,b = kaibun(S)
if a == b:
    a1,a2 = kaibun(a)
    if a1 == a2:
        b1,b2 = kaibun(b)
        if b1 == b2:
            flag = 0
        else:
            flag = 1
    else:
        flag = 1
else:
    flag = 1

if flag == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def kaibun(S):
    N = len(S)
    harf = int(N / 2)
    a = S[:harf]
    b = S[harf+1:]
    return a,b

S = input()
flag = 0
a,b = kaibun(S)
if a == b:
    a1,a2 = kaibun(a)
    if a1 == a2:
        b1,b2 = kaibun(b)
        if b1 == b2:
            flag = 0
        else:
            flag = 1
    else:
        flag = 1
else:
    flag = 1

if flag == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys
s = input()
n = len(s)
l = (n - 1) // 2
s1 = s[:l]
s2 = s[l+1:][::-1]
if s1 != s2:
    print('No')
    sys.exit()
m = l // 2
a1 = s1[:m]
b1 = s2[:m]
if l % 2 != 0:
    m += 1
a2 = s1[m:]
b2 = s2[m:]
if a1 != a2 or b1 != b2:
    print('No')
    sys.exit()
print('Yes')

Submission status: Wrong Answer

Solution code:
''' python---code_marshal
'''

x=raw_input();ch1,ch2=True,True
s1=x[:(len(x)-1)/2];s2=x[(len(x)+3)/2-1:]
if s1==s1[::-1] and s2==s2[::-1]:print "Yes"
else:print"No"

Submission status: Wrong Answer

Solution code:
s = input()

def is_Palindrome(s):
  mid = len(s) // 2
  if len(s[:mid]) < 1 or len(s[mid+1:]) < 1:
    return False
  if s[:mid] == s[mid+1:]:
    return True
  else:
    return False    

mid = len(s) // 2
if is_Palindrome(s) and is_Palindrome(s[:mid]) and is_Palindrome(s[mid+1:]):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s = input()

def is_Palindrome(s):
  mid = len(s) // 2
  if len(s[:mid]) == 0 or len(s[mid+1:]) == 0:
    return False
  if s[:mid] == s[mid+1:]:
    return True
  else:
    return False    

mid = len(s) // 2
if is_Palindrome(s) and is_Palindrome(s[:mid]) and is_Palindrome(s[mid+1:]):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s = input()

def is_Palindrome(s):
  mid = len(s) // 2
  if s[:mid] == s[mid+1:]:
    return True
  else:
    return False    

mid = len(s) // 2
if is_Palindrome(s) and is_Palindrome(s[:mid]) and is_Palindrome(s[mid+1:]):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
import numpy as np

def judge(s):
    l = len(s)
    for i in range(int(l/2)):
        if(s[i] != s[l-1-i]):
            return False
    return True

def main():
    args = input().rstrip().split(' ')
    S = np.array([c for c in args[0]])
    l = len(S)
    s1 = np.array([S[i] for i in range(0, int(l/2))])
    s2 = np.array([S[i] for i in range(int(l/2)+1, l)])
    if(judge(s1) and judge(s2)):
        print('Yes')
    else:
        print('No')
    
    
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import numpy as np

def judge(s1, s2):
    l = len(s1)
    for i in range(l):
        if(s1[i] != s2[l-1-i]):
            return 'No'
    return 'Yes'

def main():
    args = input().rstrip().split(' ')
    S = np.array([c for c in args[0]])
    l = len(S)
    s1 = np.array([S[i] for i in range(0, int(l/2))])
    s2 = np.array([S[i] for i in range(int(l/2)+1, l)])
    print(judge(s1, s2))
    
    
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3

s = input()
srev = s[::-1]
subs = s[:(len(s)-1)//2]
subsrev = subs[::-1]
subs2 = s[(len(s)+3)//2+1:len(s)]
subs2rev = subs2[::-1]

for i in range(len(s)):
    if s[i] != srev[i]:
        print('No')
        exit(0)
for i in range(len(subs)):
    if subs[i] != subsrev[i]:
        print('No')
        exit(0)
for i in range(len(subs2)):
    if subs2[i] != subs2rev[i]:
        print('No')
        exit(0)
print('Yes')

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3

s = input()
srev = s[::-1]
subs = s[:(len(s)-1)//2]
subsrev = subs[::-1]
subs2 = s[(len(s)+3)//2+1:len(s)+1]
subs2rev = subs2[::-1]

for i in range(len(s)):
    if s[i] != srev[i]:
        print('No')
        exit(0)
for i in range(len(subs)):
    if subs[i] != subsrev[i]:
        print('No')
        exit(0)
for i in range(len(subs2)):
    if subs2[i] != subs2rev[i]:
        print('No')
        exit(0)
print('Yes')

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3

s = input()
srev = s[::-1]
subs = s[:(len(s)-2)//2+1]
subsrev = subs[::-1]
subs2 = s[(len(s)+3)//2+1:len(s)+1]
subs2rev = subs2[::-1]

for i in range(len(s)):
    if s[i] != srev[i]:
        print('No')
        exit(0)
for i in range(len(subs)):
    if subs[i] != subsrev[i]:
        print('No')
        exit(0)
for i in range(len(subs2)):
    if subs2[i] != subs2rev[i]:
        print('No')
        exit(0)
print('Yes')

Submission status: Wrong Answer

Solution code:
s=list("akasaka")
N=len(s)
a=int((N-1)/2)
b=int((N+1)/2)
if  s[::-1]==s and s[:a]==s[b:]:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
top = s[:(n-1)//2]
under = s[(n+1)//2:]

if top == top[::-1]:
  if under == under[::-1]:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
top = s[0:n//2]
under = s[(n+3)//2+1:n]
 
if top == top[::-1]:
  r = True
else:
  print("No")
  r = False
if (r):
  if under == under[::-1]:
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
top = s[:n//2]
under = s[n//2+1:n]

if s == s[::-1]:
  if top == top[::-1]:
    if under == under[::-1]:
      print("Yes")
    else:
      print("No")
  else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
top = s[0:n//2]
under = s[n//2+1:n]

if top == top[::-1]:
  r = True
else:
  print("No")
  r = False
if (r):
  if under == under[::-1]:
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
top = s[0:n//2]
under = s[n//2+1:n]

if top == top[::-1]:
  if under == under[::-1]:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
top = s[0:n//2]
under = s[n//2+2:n-1]
if top == top[::-1]:
  if under == under[::-1]:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
def palindrome(x):
    reverse = x[::-1]
    for i in range(len(x)):
        if (x[i] != reverse[i]):
            return False
    return True

c = input()
l = len(c)
["No","Yes"][palindrome(c) & palindrome(c[:(l-1)//2])& palindrome(c[(l+2)//2:])]

Submission status: Wrong Answer

Solution code:
s = input()
# 1. Sは回文である。
rs = s[::-1]
q1 = 0
if s == rs:
  q1 = 1
# 2. Nを Sの長さとするとき、Sの 1文字目から (N−1)/2
#    文字目まで(両端含む)からなる文字列は回文である。
n = len(s)
h = int((n-1)/2)
s1 = s[:h:]
rs1 = s[::-1]
q2 = 0
if (s1 == rs1):
  q2 = 1
# 3. Sの (N+3)/2文字目から N文字目まで
#    (両端含む)からなる文字列は回文である。
n = len(s)
h = int((n+2)/2)
s2 = s[h::]
rs2 = s2[::-1]
q3 = 0
if (s2 == rs2):
  q3 = 1
if q1 == 1 and q2 == 1 and q3 ==1:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s = input()
# 1. Sは回文である。
rs = s[::-1]
q1 = 0
if s == rs:
  q1 = 1
print("q1=",q1)
# 2. Nを Sの長さとするとき、Sの 1文字目から (N−1)/2
#    文字目まで(両端含む)からなる文字列は回文である。
n = len(s)
h = int((n-1)/2)
print("n,h=",n,h)
s1 = s[:h:]
print("s1=",s1)
rs1 = s[::-1]
q2 = 0
if (s1 == rs1):
  q2 = 1
print("q2=",q2)
# 3. Sの (N+3)/2文字目から N文字目まで
#    (両端含む)からなる文字列は回文である。
n = len(s)
h = int((n+2)/2)
print("n,h=",n,h)
s2 = s[h::]
print("s2=",s2)
rs2 = s2[::-1]
q3 = 0
if (s2 == rs2):
  q3 = 1
print("q3=",q3)
if q1 == 1 and q2 == 1 and q3 ==1:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S = input()
if len(S) < 7:
	print("No")
	exit()
for i in range(len(S)//2):
	if S[i] != S[-i-1]:
		print("No")
		exit()
S_front = S[:(len(S)//2)]
for i in range(len(S_front)//2):
	if S_front[i] != S_front[-i-1]:
		print("No")
		exit()
S_back = S[(len(S)+1)//2:]
for i in range(len(S_back)//2):
	if S_back[i] != S_back[-i-1]:
		print("No")
		exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
S = input()
if len(S) < 7:
	print("No")
	exit()
for i in range(len(S)//2):
	if S[i] != S[-i-1]:
		print("No")
		exit()
S_front = S[:(len(S)//2)]
print(S_front)
for i in range(len(S_front)//2):
	if S_front[i] != S_front[-i-1]:
		print("No")
		exit()
S_back = S[(len(S)+1)//2:]
print(S_back)
for i in range(len(S_back)//2):
	if S_back[i] != S_back[-i-1]:
		print("No")
		exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
S = input()
c = True
for i in range (len(S)//2):
  if S[i]==S[len(S)//2-i-1]==S[len(S)//2+1+i]==S[len(S)-i-1]:
    c = True
  else:
    c = False
    continue
if (c):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
S = input()
c = True
for i in range (len(S)//2):
  if S[i]==S[len(S)//2-i-1] and S[len(S)//2+1+i]==S[len(S)-i-1] and S[i]==S[len(S)-i-1]:
    c = True
  else:
    c = False
if (c):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
S = input()
c = True
for i in range (len(S)//2):
  if S[i]==S[len(S)//2-i-1]==S[len(S)//2+1+i]==S[len(S)-i-1]:
    c = True
  else:
    c = False
if (c):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
S = input()
Sl = len(S)
Scenter = int((len(S) - 1) / 2)
for i in range(Scenter // 2):
    if not S[i] == S[Scenter - 1 - i]:
        print("No")
        quit()
for i in range(Scenter // 2):
    if not S[i + 1 + Scenter] == S[len(S) - 1 - i]:
        print("No")
        quit()
print("Yes")

Submission status: Wrong Answer

Solution code:
S = list(str(input()))
inv = list(reversed(S))
n = len(S)
d = int((n-1)/2)
q = int((n+1)/2)
if S != inv:
    print('No')
    print("1")
else:
    if S[:d] == S[q:]:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)


############ ---- Input Functions ---- ############
def in_int():
    return (int(input()))


def in_list():
    return (list(map(int, input().split())))


def in_str():
    s = input()
    return (list(s[:len(s) - 1]))


def in_ints():
    return (map(int, input().split()))


ss = in_str()


def check(ss):
    i = 0
    j = len(ss)-1
    while i < j:
        if ss[i] != ss[j]:
            return False

        i+=1
        j-=1

    return True



n = len(ss)

if n%2 == 0:
    print('NO')
else:
    if check(ss) and check(ss[:n//2]):
        print("YES")
    else:
        print('NO')

Submission status: Wrong Answer

Solution code:
def RoKuKer(s):
    n = len(s)
    if n%2 != 1:
        print 0
        return "No" 

    l = s[:(n-1)/2]; r = s[(n+1)/2:]; r_reverse = ''
    for i in r:
        r_reverse = i + r_reverse
    if l != r_reverse:
        return "No"

    ll = l[:(len(l)-1)/2]; lr = l[(len(l)+1)/2:]; lr_reverse = ''
    for j in lr:
        lr_reverse = j + lr_reverse
    if ll != lr_reverse:
        return "No"

    rl = r[:(len(r)-1)/2]; rr = r[(len(r)+1)/2:]; rr_reverse = ''
    for k in rr:
        rr_reverse = k + rr_reverse
    if rl != rr_reverse:
        return "No"
    
    return "Yes"




if __name__ == '__main__':
    S = str(raw_input())
    print RoKuKer(S)

Submission status: Wrong Answer

Solution code:
s=raw_input()
n=len(s)
ans="Yes"
for i in range(n):
  if s[i]!=s[n-1-i]:
    ans="No"
    break
for i in range((n-1)/2):
  if s[i]!= s[(n-1)/2-1-i]:
    ans="No"
    break

Submission status: Wrong Answer

Solution code:
s=raw_input()
n=len(s)
ans="Yes"
for i in range(n):
  if s[i]!=s[n-1-i]:
    ans="No"
    break
for i in range((n-1)/2):
  if s[i]!= s[(n-1)/2-1-i]:
    ans="No"
    break

Submission status: Wrong Answer

Solution code:
li=list(input())
li_rev=li
li_rev.reverse()
n=len(li)
li_slice=li[0:int((n-1)/2)]
li_slrev=li_slice
li_slrev.reverse()
n=len(li)
if li==li_rev:
    if li_slice==li_slrev:
        print('Yes')
    else:
        print('No1')
else:
    print('No2')

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3

s = list(str(input()))
N = len(s)


def disc(s):
    if len(s) == 1:
        return True
    s1 = s[:len(s)//2]
    s2 = s[len(s)//2+1:]
    s2.reverse()
    if s1 == s2:
        return True
    else:
        return False


if disc(s) and disc(s[:(N-1)//2]) and disc(s[(N+3)//2-1:]):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3

s = list(str(input()))
N = len(s)


def disc(s):
    s1 = s[:len(s)//2]
    s2 = s[len(s)//2+1:]
    s2.reverse()
    if s1 == s2:
        return True
    else:
        return False


if disc(s) and disc(s[:(N-1)//2]) and disc(s[(N+3)//2-1:]):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3

s = list(str(input()))
N = len(s)


def disc(s):
    s1 = s[:len(s)//2]
    s2 = s[len(s)//2:]
    s2.reverse()
    if s1 == s2:
        return True
    else:
        return False


if disc(s) and disc(s[:(N-1)//2]) and disc(s[(N+3)//2-1:]):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3

import copy

s = list(str(input()))
N = len(s)


def disc(s):
    s1 = s[:len(s)//2]
    s2 = s[len(s)+1//2:]
    s2.reverse()
    if s1 == s2:
        return True
    else:
        return False


if disc(s) and disc(s[:(N-1)//2]) and disc(s[(N+3)//2-1:]):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3

import copy

s = list(str(input()))
N = len(s)


def disc(s):
    s1 = s[:len(s)//2]
    s2 = s[len(s)//2+1:]
    s2.reverse()

    if s1 == s2:
        return True
    else:
        return False


if disc(s) and disc(s[:(N-1)//2]) and disc(s[(N+3)//2-1:]):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3

import copy

s = list(str(input()))
N = len(s)


def disc(s):
    s1 = s[:len(s)//2]
    s2 = s[len(s)//2+1:]
    s2.reverse()

    if s1 == s2:
        return True
    else:
        return False


print(s)
print(s[:(N-1)//2])
print(s[(N+3)//2-1:])

if disc(s) and disc(s[:(N-1)//2]) and disc(s[(N+3)//2-1:]):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
a = S[:(len(S)-1)//2]
b = S[(len(S)+3)//2-1:]
print("Yes" if a==a[::-1] and b==b[::-1] else "No")

Submission status: Wrong Answer

Solution code:
S = input()

def Check1(S):
    for i in range((len(S) - 1) // 2):
        if S[i] != S[len(S) - 1 - i]:
            return False
    return True

def Check2(S):
    S2 = ""
    for i in range(0, (len(S) - 1) // 2):
        S2 = S2 + S[i]
    return Check1(S2)

def Check3(S):
    S3 = ""
    for i in range((len(S) + 3) // 2, len(S)):
        S3 = S3 + S[i]
    return Check1(S3)

if Check1(S) and Check2(S) and Check3(S):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
F=S[0:(N-1)//2]
B=S[(N+3)//2-1:N]
print(F,B)
if(F==B):
    l=len(F)
    for i in range(l//2):
        if(F[i]!=F[l-1-i]):
            print("No")
            break
    print("Yes")
else:
    print("No")