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 checkPalindrome(str1, str2):
  for i in range(len(str1) // 2):
    if str1[i] != str2[i]:
      return False
  return True
    
s = input()
rs = ''.join(list(reversed(s)))
print(s, rs)
cri1 = checkPalindrome(s, rs)

s2 = s[:len(s) // 2]
rs2 = ''.join(list(reversed(s2)))
print(s2, rs2)
cri2 = checkPalindrome(s2, rs2)

s3 = s[len(s) // 2 + 1:len(s)]
rs3 = ''.join(list(reversed(s3)))
print(s3, rs3)
cri3 = checkPalindrome(s3, rs3)

if cri1 and cri2 and cri3:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
# coding: utf-8

S = input()
# print(S)

N = len(S)
# print(N)

def judge(N, S):
    bf = (N-1) // 2
    af = (N+3) // 2 - 1
    
    if S[:bf] == S[af:]:
        flg = True
    else:
        flg = False
    return flg

rev = S[(N+3) // 2 - 1:]
rev = rev[::-1]

if S[:(N-1) // 2] == rev:
    b_S = S[:(N-1) // 2]
    a_S = S[(N+3) // 2 - 1:]
    if judge(len(b_S), b_S) == True and judge(len(a_S), a_S) == True:
        print("Yes")
    else:
        print("No:")
    exit()
else:
    print("No")

Submission status: Wrong Answer

Solution code:
from copy import copy

S = input()
Slist = []
par = []
rap = []

for s in S:
    Slist.append(s)

if len(Slist)==3:
    if Slist==list(reversed(Slist)):
        print("Yes")
    else:
        print("No")
else:
    rap = copy(Slist)
    list(reversed(rap))
    if Slist==rap:
        rap = []
        par = copy(Slist)
        par = par[:(len(par)-1)//2]
        rap = copy(par)
        list(reversed(rap))
        if par==rap:
            rap = []
            par = copy(Slist)
            par = par[(len(par)+3)//2]
            rap = copy(par)
            list(reversed(rap))
            if par==rap:
                print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
s = str(input())
h = len(s)

s_1 = s[:(h-1)//2]
h_1 = len(s_1)//2

s_2 = s[(h+3)//2-1:]
h_2 = len(s_2)//2

ans = 0

for a, b in zip(s_1[:h_1], reversed(s_1[h_1:])):
    if a!=b:
        ans -= 10000000000
        break
    else:
        ans += 1
        continue

for a, b in zip(s_2[:h_2], reversed(s_2[h_2:])):
    if a!=b:
        ans -= 10000000000
        break
    else:
        ans += 1
        continue


if ans > 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def isPalindrome(s):
    n = len(s)
    front = s[0:int((n-1)/2)]
    back = s[int((n+1)/2):]
    return front == back[::-1]


s = input()

sResult = isPalindrome(s)

if not sResult:
    print("No")
else:
    n = len(s)
    front = s[0:int((n-1)/2)]
    back = s[int((n+1)/2):]
    fResult = isPalindrome(front)
    bResult = isPalindrome(back)
    if len(front) == 1:
        print("No")
    elif fResult and bResult:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
S = input()
S_first_len = len(S) // 2
S_first_left = S_first_len

S_f_l_ = S[:S_first_len]
S_f_r_ = S[S_first_len + 1:]
S_f_r_ = S_f_r_[::-1]
#print(S_f_l_)
#print(S_f_r_)

if S_f_l_ == S_f_r_:
    S_s_len = (S_first_len +3) // 2
    S_sec = S[S_s_len + 1:]
    #print('' + S_sec)
    S_len = len(S_sec) // 2
    S_sec_l = S_len

    S_s_l_ = S_sec[:S_sec_l]
    S_s_r_ = S_sec[S_sec_l + 1:]
    S_s_r_ = S_s_r_[::-1]
    #print(S_s_l_)
    #print(S_s_r_)
    if S_s_l_ == S_s_r_:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()
k1 = ''
k2 = ''
for i in range(0,(len(S) - 1) // 2):
  k1 += S[i]
for i in range(((len(S) + 3) // 2) - 1, len(S)):
  k2 += S[i]
#print(k1)
#print(k2)
if k1 == k1[::-1] and k2 == k2[::-1] and 3 <=len(S):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
x = "malayalam"
w = "" 
for i in x: 
    w = i + w 
    if (x==w): print("YES")
    else: print("NO")

Submission status: Wrong Answer

Solution code:
def palindrome(string): return 1 if string==string[::-1] else 0

kaibun=input()

N=len(kaibun)
A=kaibun[0:int((N-1)/2)]
B=kaibun[int((N+3)/2-1):int(N)]


if N>=5 & palindrome(A) & palindrome(B):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()

N = int((len(S)-1)/2)
for i in range(int(N//2)):
    if (S[i] != S[N-1-i]):
        print('No')
        break
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
def istrue(s):
	for a, b in zip(s, reversed(s)):
		if a != b:
			return False
	return True


s = input()
fl = (len(s)-1)/2
el = (len(s)+3)/2-1
f = s[0:int(fl)]
e = s[int(el):len(s)]

if istrue(f) is False:
	print("No")
	exit()
if istrue(e) is False:
	print("No")
	exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
s = list(input())
n = len(s)
ans = "Yes"
x = (n-1)//2-1
y = (n+3)//2-1
n-=1
for i in range(x):
    if s[i] != s[x-i]:
        ans = "No"
        break
    if s[y+i] != s[n-i]:
        ans = "No"
        break
print(ans)

Submission status: Wrong Answer

Solution code:
s=str(input())

cnt=0

num=len(s)//2

a=s[:num]
b=s[num+1:]
print(a)
print(b)

num2=len(a)//2
c=a[:num2]
d=a[num2+1:]

print(c)
print(d)

num3=int((len(s)+3)/2-1)
s1=s[num3:]
num4=len(s1)//2
e=s1[:num4]
f=s1[num4+1:]

print(e)
print(f)

if a==b[::-1]:
    cnt +=1

if c==d[::-1]:
    cnt +=1

if e==f[::-1]:
    cnt +=1

if cnt==3:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
flag = True
moji1 = S[:((N-1)//2)]
for i in range(N//2):
    if moji1[i]!=moji1[len(moji1)-1-i]:
        flag = False
moji = S[((N+3)//2)-1:]
for i in range(N//2):
    if moji[i]!=moji[len(moji)-1-i]:
        flag = False
print("Yes" if flag==True else "No")

Submission status: Wrong Answer

Solution code:
import sys, re
import math
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

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

s = input()
count = len(s)

helfCount = int(count / 2 - 1)

ans = True

for x in range(0, helfCount):
    if s[x] != s[count - x - 1] :
        ans = False
        break

print(ans)

Submission status: Wrong Answer

Solution code:
def isKaibun(s):
  for a, b in zip(s, reversed(s)):
    if a != b:
      return False
  return True

S = list(input())
N = len(S)
if isKaibun(S[:(N-1)//2]) and isKaibun(S[2+(N+1)//2:]):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
def palindrome(string): return 1 if string == string[::-1] else 0


s = input()
N = len(s)
# print(s[0:(N - 1) // 2])
# print(s[(N + 3) // 2 - 1:N])

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

Submission status: Wrong Answer

Solution code:
s = list(input())
n = len(s)
ans = 'No'
for i in range(int((n-1)/2)):
    if s[i] == s[n-1-i]:
        if ((n-1)/2)%2 == 0:

            for j in range(int((n-1)/4)):
                if s[j] == s[int((n-1)/2) - j -1]:
                    ans = 'Yes'
        else:
            if n == 3:
                ans = 'Yes'
            else:
                for j in range(int(((n-1)/2 - 1)/2)):
                    if s[j] == s[int((n-1)/2) - j -1]:
                        ans = 'Yes'
print(ans)

Submission status: Wrong Answer

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

#前半部分の回文チェック
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")

Submission status: Wrong Answer

Solution code:
S = input()

def is_batch(s):
    c = len(s)//2
    fs = s[c+1:]
    ls = s[:c]

    if fs == ls:
        return True
    else:
        return False

ans = 'No'
n = len(S)
if is_batch(S):
    if is_batch(S[0:(n//2)]):
        ans = 'Yes'
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()

length = len(S)

if length%2 == 0:
    mini_length = length//2
    if mini_length%2 != 0:
        left_center = mini_length//2
        right_center = mini_length + left_center
        left_left = S[:left_center]
        left_right = S[left_center+1:mini_length]
        right_left = S[mini_length:right_center]
        right_right = S[right_center+1:length]
        if (left_left == left_right[::-1]) and (right_left == right_right[::-1]):
            print('Yes')
        else:
            print('No')
    else:
        left_center = mini_length//2
        right_center = mini_length + left_center
        left_left = S[:left_center]
        left_right = S[left_center:mini_length]
        right_left = S[mini_length:right_center]
        right_right = S[right_center:length]
        if (left_left == left_right[::-1]) and (right_left == right_right[::-1]):
            print('Yes')
        else:
            print('No')

else:
    mini_length = length//2
    if mini_length%2 != 0:
        left_center = mini_length//2
        right_center = mini_length + left_center + 1
        left_left = S[:left_center]
        left_right = S[left_center+1:mini_length]
        right_left = S[mini_length+1:right_center]
        right_right = S[right_center+1:length]
        if (left_left == left_right[::-1]) and (right_left == right_right[::-1]):
            print('Yes')
        else:
            print('No')
    else:
        left_center = mini_length//2
        right_center = mini_length + left_center + 1
        left_left = S[:left_center]
        left_right = S[left_center:mini_length]
        right_left = S[mini_length+1:right_center]
        right_right = S[right_center:length]
        if (left_left == left_right[::-1]) and (right_left == right_right[::-1]):
            print('Yes')
        else:
            print('No')

Submission status: Wrong Answer

Solution code:
def ispalindrome(s):
    h = len(s) // 2
    for a, b in zip(s[:h], reversed(s[h+1:])):
        if a != b: return print('No')
        return print('Yes')
stri = input()
s = list(stri)

ispalindrome(s)

Submission status: Wrong Answer

Solution code:
moji = input()
n=len(moji)
mae=moji[0:(n-1)//2]
ato=moji[(n+3)//2-1:n]
mae0 = mae[::-1]
ato0 = ato[::-1]
if ((mae == mae0) and (ato == ato0)):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
if n ==3:
	if s[0] == s[2]:
		print("Yes");exit()
	else:
		print("No");exit()
		
def check_reverse(a,b):
	for i in range((b-a)//2):
		if s[a+i] != s[b-1-i]:
			return False
		return True

if check_reverse(0,(n-1)//2) and check_reverse((n-1)//2+1,n) and check_reverse(0,n):
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

Solution code:
s=input()

e = int((len(s)-1)/2)
s1=s[:e]
s2 = ''.join(list(reversed(s1)))
if s1!=s2: print("No")
else:
    e = int((len(s)+3)/2)-1
    s1=s[e:]
    s2 = ''.join(list(reversed(s1)))
    if s1!=s2: print("No")
    else: print("Yes")

Submission status: Wrong Answer

Solution code:
s = str(input())

def check(text):
    n = len(text)
    if n == 1:
        return True

    left = int((n-1)/2)
    right = int((n+3)/2 - 1)
    if text[0:left] == text[right:n] and check(text[0:left]):
        return True
    return False

if check(s):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def palindrome(S):
    S1 = list(S)
    S1.reverse()
    S2 = "".join(S1)


    if S == S2:
        return "Yes"
    else:
        return "No"

Submission status: Wrong Answer

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

N_2 = (N+1) // 2 -1

if (N+1) % 4 == 0:
  N1 = N2 = (N+1) // 4 -1
  N3 = N4 = (N1+1) * 3 -1
else:
  N1 = (N-1) // 4 -1 
  N2 = N1 + 1
  N3 = N_2 + N1 +1
  N4 = N3 + 1
  
#print(N1, N2, N3, N4)
#print(S[0:N1+1], S[N2:N_2], S[N_2+1:N3+1], S[N4:N])

if S[0:N1+1] == S[N2:N_2][::-1] and S[N_2+1:N3+1] == S[N4:N][::-1]:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

def is_kaibunn(s):
    n = len(s)
    if n%2==0:
        return False
    a = []
    b = []
    for i in range(int((n-1)/2)):
        a.append(s[i])
        b.append(s[n-i-1])
    return a == b

if (is_kaibunn(S) and is_kaibunn(S[0:int((N-1)/2)]) and is_kaibunn(S[int((N+3)/2)-1:N])):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def check(s):
#  print("check:{}".format(s))
  n = len(s)
  n2 = int(n/2)
  if n == 1:
    return False
  for i in range(0,n):
    ni = n-i
#    print("{}:{}/{}".format(i,s[i:i+1],s[ni-1:ni]))
    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]
  if check(s2):
    n3 = int((len(s)+3)/2)
    s3 = s[n3-1:]
    if check(s3):
      print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
  print('No')

Submission status: Wrong Answer

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

c = (len(s)-1) // 2

l = s[:c]
r = s[-c::][::-1]

ss = s[(n+3)//2-1:]
nn = len(ss)
cc = (nn-1) // 2
ll = ss[:cc]
rr = ss[-cc::][::-1]

if l == r and ll == rr:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
def checkPalindrome(str1, str2):
  for i in range(len(str1) // 2):
    if str1[i] != str2[i]:
      return False
    return True
    
s = input()
rs = ''.join(list(reversed(s)))
cri1 = checkPalindrome(s, rs)

s2 = s[:len(s) // 2]
rs2 = ''.join(list(reversed(s2)))
cri2 = checkPalindrome(s2, rs2)

s3 = s[len(s) // 2 + 1:len(s)]
rs3 = ''.join(list(reversed(s3)))
cri3 = checkPalindrome(s3, rs3)

if cri1 and cri2 and cri3:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
def isBatch(s):
    for i in range(len(s)//2):
        if s[i] != s[-i-1]:
            return False
    return True

def main():
    s = input()
    condtion1 = (len(s) - 1) // 2
    condtion2 = (len(s) + 3) // 2
    flag = False
    for i, j in [(1, condtion1), (condtion2, len(s))]:
        if isBatch(s[i-1:j]):
            flag = True
        else:
            flag = False
    if flag:print("Yes")
    else: print("No")

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def resolve():
    s = input()
    if len(s) == 3:
        print("Yes")
        exit()
    s1 = s[0:((len(s)-1)//2)]
    s2 = s[((len(s)+3)//2)-1:]
    rs1 = s1[::-1]
    rs2 =s2[::-1]
    if s1 == rs1 and s2 == rs2:
        print("Yes")
    else:
        print("No")
resolve()

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
x = input()
w = "" 
for i in x: 
    w = i + w 
    if (x==w): 
        print("YES")

Submission status: Wrong Answer

Solution code:

def ispalindrome(s):
    h = len(s)
    if (h % 2) == 0:
        h = int(h/2)
        for a, b in zip(s[:h], reversed(s[h:])):
            if a != b: return 0
    else:
        h = int(h/2)
        for a, b in zip(s[:h], reversed(s[h+1:])):
            if a != b: return 0
    return 1

str_in = input()
N = len(str_in)
result = ispalindrome(str_in)

if result == 0:
    print('No')
else:
    str_half = str_in[:int((N-1)/2)]
    result &= ispalindrome(str_half)

    if result == 0:
      print('No')
    else:
        str_half = str_in[int((N+3)/2):]
        result &= ispalindrome(str_half)

        if result == 0:
            print('No')
        else:
            print('Yes')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
def isPalindrome(s):
    n = len(s)
    front = s[0:int((n-1)/2)]
    back = s[int((n+1)/2):]
    return front == back[::-1]


s = input()

sResult = isPalindrome(s)

if not sResult:
    print("No")
else:
    n = len(s)
    front = s[0:int((n-1)/2)]
    back = s[int((n+1)/2):]
    fResult = isPalindrome(front)
    bResult = isPalindrome(back)
    if fResult and bResult:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# ABC159_B
s=input()
n=len(s)
# if n==1:
#     print('No')
#     exit()

n=n//2
f=''
e=''
f=s[:n]
e=s[-n:]
for i in range(int(n//2)):
    if f[i]==f[-1-i] and e[i]==e[-i-1]:
        pass
    else:
        print('No')
        exit()

print('Yes')

Submission status: Wrong Answer

Solution code:

def check_str( ss ):
  sslen = len(ss)
  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 ) ):
    print( "No" )
  elif( not check_str( s2 ) ):
    print( "No" )
  else:
    print( "Yes" )

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

#s1

Submission status: Wrong Answer

Solution code:
s = str(input())

def check(text):
    n = len(text)
    if n == 1:
        return True

    left = int((n-1)/2)
    right = int((n+3)/2 - 1)
    if text[0:left] == text[right:n] and check(text[0:left]):
        return True
    return False

if check(s):
    n = len(s)
    if (n + 1) % 4 == 0:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = str(input())

num = int((len(s)-1) / 2)

f = s[:num]
b = s[num+1:]

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

Submission status: Wrong Answer

Solution code:
def main():
    s = input()
    sl = len(s)

    if s[:(sl//2)] != s[(sl//2)+1:]:
        print('No')
        exit()
    s1 = s[:((sl-1)//2)]
    s1l = len(s1)
    if s1[:(s1l//2)] != s1[(s1l//2)+1:]:
        print('No')
        exit()
    s2 = s[((sl+3)//2)-1:]
    s1l = len(s2)
    if s2[:(s1l//2)] != s2[(s1l//2)+1:]:
        print('No')
        exit()
    print('Yes')

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
s = input()

s_ = s[:len(s)//2]
_s = s[1+len(s)//2:]

if s_ != _s:
  print('No')
  quit()

if s_[:len(s_)//2] == s_[1+len(s_)//2:]:
  
  if _s[:len(_s)//2] == _s[1+len(_s)//2:]:
    print('Yes')
    quit()

print('No')

Submission status: Wrong Answer

Solution code:
S = list(input())
N = len(S)
n1 = (N - 1) // 2
n2 = (N + 3) // 2

res1 = S[:n1]
res2 = S[n2-1:]

if(res1 == list(reversed(res1)) and res2 == list(reversed(res2))):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = str(input())
def palindrome(string): 
    return True if string==string[::-1] else False

ans = "No"
if palindrome(S) and palindrome(S[:(len(S)-1)//2]) and palindrome(S[(len(S)+3)//2 + 1:]):
    if (len(S)+3)%2 == 0:
        ans = "Yes"

print("No")

Submission status: Wrong Answer

Solution code:
def kaibun(s):
    n = len(s)
    if n%2==0:
        S1 = s[:n//2]
        S2 = s[n//2:]
        for i in range(n//2):
            if S1[i]!=S2[i]:
                return False
        return True
    else:
        S1 = s[:n//2]
        S2 = s[n//2+1:]
        for i in range(n//2):
            if S1[i]!=S2[i]:
                return False
        return True
        
S = input()
# print(len(S))
s1 = S[:int((len(S)-1)/2)]
s2 = S[int((len(S)+3)/2-1):]

s_b = kaibun(S)
s1_b = kaibun(s1)
s2_b = kaibun(s2)

if (s_b and s1_b and s2_b):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S=(input())

N = len(S)

one = S[0:((N-1)//2)]
two = S[(N+3)//2-1:N]

def check_kai(text):
    left = len(text)//2
    
    for i in range(left):

        if text[i] != text[len(text)-1-i]:
            print('No')
            exit(0)

    
check_kai(one)
check_kai(two)
print('Yes')

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
if n ==3:
	if s[0] == s[2]:
		print("Yes");exit()
	else:
		print("No");exit()
		
def check_reverse(a,b):
	for i in range((b-a)//2):
		if s[a+i] != s[b-1-i]:
			return False
		return True

if check_reverse(0,(n-1)//2) and check_reverse((n-1)//2+1,n):
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

Solution code:
s=input()

a=s[::-1]
n=len(s)
ans=False
for i in range(n):
    if s[i]==a[i]:
        ans=True
    else:
        ans=False
        
b=s[:int((n-1)/2)]
c=b[::-1]
for i in range(int((n-1)/2)):
    if b[i]==c[i]:
        ans=True
    else:
        ans=False
d=s[int((n+3)/2)-1:]
e=d[::-1]

for i in range(n-int((n+3)/2)+1):
    if d[i]==e[i]:
        ans=True
    else:
        ans=False

if ans:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
def resolve():
    s = input()
    s1 = s[0:((len(s)-1)//2)]
    s2 = s[((len(s)+3)//2)-1:]
    rs1 = s1[::-1]
    rs2 =s2[::-1]
    if s1 == rs1 and s2 == rs2:
        print("Yes")
    else:
        print("No")
resolve()

Submission status: Wrong Answer

Solution code:
s = input()

def check(s):
    if len(s) == 1:
        return True

    before = s[: len(s) // 2]
    if len(s) % 2 == 0:
        after = s[((len(s) // 2)):]
    else:
        after  = s[((len(s) // 2) + 1):]

    if before == after:
        return True
    else:
        return False

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

Submission status: Wrong Answer

Solution code:
s = input()

def check(ss):
    idx = 1
    nn = (len(ss)-1)//2
    if nn <= 0:
        return False
    for i in range(nn):
        #print('s ss[i], ss[-i-1]: ', s, ss[i], ss[-i-1])
        if ss[i] != ss[-i-1]:
            return False
    return True
    

if check(s):
    if check(s[:(len(s)-1)//2]):
        if check(s[(len(s)+3)//2-1:]):
            print('Yes')
            exit()

print('No')

Submission status: Wrong Answer

Solution code:
S = list(input())
N = len(S)
M = (N-1)//2
S1 = S[:(N-1)//2]
S2 = S[(N+3)//2-1:]
S2.reverse()
S11 = S1[:M//2]
S12 = S1[(M+3)//2-1:]
print(S11)
print(S12)
S12.reverse()

if S1 == S2 and S11 == S12:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = list(input())
N = len(S)
if N%4 == 3:
    if S[0:int((N-1)/2)] == S[int((N+1)/2):N]:
        flag = True
        s = S[0:int((N-1)/2)]
        for i in range(N//4):
            if s[i] != s[-i-1]:
                flag=False
        if flag:
            print('Yes')
        else:
            print('No')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()


def is_palindrome(s):
    N = len(s)
    half = (N - 1) // 2
    return S[:half] == S[-half:][::-1]


if is_palindrome(S) and is_palindrome(S[: (len(S) - 1) // 2]):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

ans = 'Yes'

if n == 3:
    if s[0] != s[2]:
        ans = 'No'
else:
    for i in range(int((n-1) / 4)):
        if s[i] != s[int((n-3) / 2 - i)]:
            ans = 'No'
            break
        elif s[int((n+1) / 2 + i)] != s[-(i+1)]:
            ans = 'No'
            break

print(ans)

Submission status: Wrong Answer

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

def isPalindrome(S, i, j):
    i = int(i)
    j = int(j)
    while S[i] == S[j]:
        i+=1
        j-=1
        if i == j or j == i - 1:
            return True
        elif i > j:
            return False
    return False

if isPalindrome(S, 0, N-1) and isPalindrome(S, 0, (N-1)/2-1) and isPalindrome(S, (N+3)/2-1, N-1):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s=list(input())
N=len(s)
tmp=s[0:int((N-1)/2)+1]
tmp_rev=tmp[::-1]

tmp2=s[int((N+3)/2)-1:]
tmp2_rev=tmp2[::-1]

if tmp==tmp_rev and tmp2==tmp2_rev:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s = input()
l = len(s)
c = (l-1)//2

count = 0
check = 0
for i in range(0,c-1):
  if s[i] == s[l-i-1]:
    count = count + 1
    
if count == c-1:
  check = check + 1

count1 = 0  
for j in range(0, c-1):
  if s[j] == s[c-j-1]:
    count1 = count1 + 1

if count1 == c-1:
  check = check + 1

print(check)
if check == 2:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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


if (n+1)%4 is not 0:
	print("No")

else:
	for i in range((n-3)//4):
		if s[i]!=s[(n-3)//2-i] or s[(n+1)//2+i]!=s[n-1-i]:
			print("No")
			break

	#for i in range((n-3)//4):
		#if s[(n+1)//2+i]!=s[n-1-i]:
			#print("No")
			#break
	print("Yes")

Submission status: Wrong Answer

Solution code:
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")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
if n == 3:
    print("No")
elif (n//2)%2 == 0:
    l, r = s[:(n-1)//2], s[(n+1)//2:]
    m = len(l)
    ll, lr = l[:(m)//2], l[(m)//2:]
    rl, rr = l[:(m)//2], l[(m)//2:]
    if ll == lr[::-1] and rl == rr[::-1]:
        print("Yes")
    else:
        print("No")
else:
    l, r = s[:(n-1)//2], s[(n+1)//2:]
    m = len(l)
    ll, lr = l[:(m-1)//2], l[(m+1)//2:]
    rl, rr = l[:(m-1)//2], l[(m+1)//2:]
    if ll == lr[::-1] and rl == rr[::-1]:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
import itertools#これは色々使える組み込み関数みたいなやつ
#import math#数学的計算はこれでいける。普通に0.5乗しても計算可能
#w=input()
from operator import itemgetter
from sys import stdin
#input = sys.stdin.readline#こっちの方が入力が早いが使える時に使っていこう

N=3
M=3
i=0
j=0
k=0

s=input()
a=[i for i in s]
#print(a)
N=len(s)
#print(N)
N1=int(((N-1)/2-1)/2+1)
N2=int((N-1)/2-1)
N3=int((N-1)/2+1)
for i in range(N1):
    if a[i]==a[N2-i] and a[N3+i]==a[N-1-i]:
        pass
    else:
        print("No")
        sys.exit()
    #print(a[i],a[N2-i])
    #print(a[N3+i],a[N-1-i])
print("Yes")
#N=int(input())
#A=int(input())
#B=int(input())
#print(N)
"1行1つの整数を入力を取得し、整数と取得する"


#number_list=list(map(int, input().split(" ")))#数字の時
#print(number_list)
"12 21 332 とか入力する時に使う"
"1行に複数の整数の入力を取得し、整数として扱う"

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
#メモ
for i in number_list:#こっちの方がrage使うより早いらしい
    print(number_list[i-1])

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'''
x=[]
y=[]
for i in range(N):
    x1, y1=[int(i) for i in input().split()]
    x.append(x1)
    y.append(y1)
print(x)
print(y)
"複数行に2数値を入力する形式 x座標とy座標を入力するイメージ"
'''

'''
mixlist=[]
for i in range(N):
    a,b=input().split()
    mixlist.append((int(a),b))
print(mixlist)
"複数行にintとstrを複合して入力するやつ，今回はリスト一つで処理している"
'''

'''
#array=[input().split()for i in range(N)]
#print(type(array[0][0]))
#print(array)
"正方行列にstr型の値を入力"
'''

#brray=[list(map(int, input().split(" ")))for i in range(N)]
#print(type(brray[0][0]))
#print(brray)
'''
入力
1 2
4 5
7 8
出力結果
[[1, 2], [4, 5], [7, 8]]
'''
"列数に関して自由度の高いint型の値を入力するタイプの行列"
#以下に別解を記載
#N, M = [int(i) for i in input().split()]
'''
table = [[int(i) for i in input().split()] for m in range(m)]

print(type(N))
print(N)
print(type(M))
print(M)

print(type(table))
print(table)
'''




#s=input()
#a=[int(i) for i in s]
#print(a[0])
#print([a])
#単数値．桁ごとに分割したい．入力と出力は以下の通り
#イメージとして1桁ごとにリストに値を入れているかんじ

'''
入力
1234
出力
1
[[1, 2, 3, 4]]
'''




'''
word_list= input().split(" ")
print(word_list[0])
"連続文字列の入力"
"qw er ty とかの入力に使う"
"入力すると空白で区切ったところでlistの番号が与えられる"
'''



'''
A, B, C=stdin.readline().rstrip().split()#何個でもいけることが多い
print(A)
"リストではなく独立したstr型を入れるなら以下のやり方でOK"
'''


#a= stdin.readline().rstrip()
#print(a.upper())
"aという変数に入っているものを大文字にして出力"




#なんかうまく入力されるけど
#a=[[int(i) for i in 1.strip()]for 1 in sys.stdin]
#a = [[int(c) for c in l.strip()] for l in sys.stdin]]
#print(a)
#複数行の数値を入力して正方行列を作成

Submission status: Wrong Answer

Solution code:
#/usr/bin/env python
def isKaibun(s):
    l = len(s)
    for i in range(l // 2):
        if s[i] != s[-(i+1)]:
            return False
    return True

def main():
    s = input()
    l = len(s)
    s1 = s[:(l-1) // 2]
    s2 = s[(l + 3) // 2 + 1:]

    if isKaibun(s) and isKaibun(s1) and isKaibun(s2):
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
s = input()

rs = s[::-1]

if s == rs:
  n = (len(s) -1 )//2
  if n % 2 :
    ss = s[0:n]
    rss = ss[::-1]
    if ss == rss :
      print("Yes")
    else:
      print("No")
  else:
    print("No")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S = list(input())
N = len(S)
n1 = (N - 1) // 2
n2 = (N + 3) // 2

res1 = S[:n1]
res2 = S[n2-1::]

if(res1 == list(reversed(res1)) and res2 == list(reversed(res2))):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = list(str(input()))
N = len(S)
if ((N-1)//2)%2:
  n = (N-1)//2
  e = (n-1)//2
  s = (n+3)//2-1
else:
  n = N//2
  e = n//2
  s = n//2
#print(S[:(N-1)//2] , S[(N+3)//2-1:] , S[:e], S[s:n])
if S[:(N-1)//2] == S[(N+3)//2-1:] and S[:e] ==  S[s:n]:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
from sys import stdin
input = stdin.readline
s = input()
n = len(s)
flag=True

if s[::-1] != s:
  flag=False
end = (n-1)//2
temp = s[:end]
if temp[::-1] !=temp:
  flag=False
start = (n+3)//2
temp = s[start-1:]
if temp[::-1]!=temp:
  flag=False
  
  
if flag==True:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S = input()
# S = "atcorder"
N = len(S)

left = 1
right = int((N-1) / 2)
subS = S[left-1:right]
flag = True
for i in range(int(len(subS)/2)):
  if subS[i]!=subS[-1-i]:
    flag = False

left = int((N+3) / 2)
right = N
subS = S[left-1:N]
for i in range(int(len(subS)/2)):
  if subS[i]!=subS[-1-i]:
    flag = False

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