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:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time, copy,bisect
from operator import itemgetter
#from heapq import heappush, heappop
#import numpy as np
#from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson
#from scipy.sparse import csr_matrix
#from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

stdin = sys.stdin

ni = lambda: int(ns())
nf = lambda: float(ns())
na = lambda: list(map(int, stdin.readline().split()))
nb = lambda: list(map(float, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

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

S = ns()
N = len(S)
p = S[:(N-1)//2]
l = S[(N+3)//2 - 1:]
if judge(p) and judge(l):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s=input()
n=len(s)
m=(n-1)//2
t=s[:m]

for i in range(m):
  #print(s[i],s[-i-1])
  if s[i]!=s[-i-1]:
    print('No')
    exit()

l=(m-1)//2
for i in range(l):
  #print(t[i],t[-i-1])
  if t[i]!=t[-i-1]:
    print('No')
    exit()
print('Yes')

Submission status: Wrong Answer

Solution code:
s=input()
n=len(s)
m=(n-1)//2
t=s[:m]
if m%2==0:
  print('No')
  exit()

for i in range(m):
  #print(s[i],s[-i-1])
  if s[i]!=s[-i-1]:
    print('No')
    exit()

l=(m-1)//2
for i in range(l):
  #print(t[i],t[-i-1])
  if t[i]!=t[-i-1]:
    print('No')
    exit()
print('Yes')

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
SS=S[0:(N-1)//2]
SSS=S[(N+1)//2:N+1]

for i in range((N-1)//2):
  if SS[i]!=SS[-1-i]:print('No');exit()
  if SSS[i]!=SSS[-1-i]:print('No');exit()
print('Yes')

Submission status: Wrong Answer

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


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


flag = palind(s)
if flag:
    m = (n-1)//2
    sb = s[:m]
    flag = palind(sb)
    if flag:
        sa = s[m+1:]
        flag = palind(sa)

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

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
m = int((n-1)/2)

sb = s[:m]
sa = s[m+1:]
flag = False

for i in range(0, int((m-1)/2)):
    if sb[i] != sb[-(i+1)]:
        flag = True
        break

    if sa[i] != sa[-(i+1)]:
        flag - True
        break

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

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
m = int((n-1)/2)

sb = s[:m]
sa = s[m+1:]
flag = False

for i in range(0, int((m-1)/2)+1):
    if s[i] != s[-(i+1)]:
        flag = True
        break

    if s[i] != s[-(i+1)]:
        flag - True
        break

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

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
m = int((n-1)/2)

sb = s[:m]
sa = s[m+1:]
flag = False

for i in range(0, int((m-1)/2)):
    if s[i] != s[-(i+1)]:
        flag = True
        break

    if s[i] != s[-(i+1)]:
        flag - True
        break

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

Submission status: Wrong Answer

Solution code:
string=input()
palindrome=False
palin1=False

def palin(string):
    palindrome=False
    if string==string[::-1]:
        palindrome=True
    return palindrome

palindrome=palin(string)

if palin(string[int((len(string)-1)/2)])==True and palindrome==True:
    palin1=True
print(string[int((len(string)+3)/2)-1:len(string)])
if palin(string[int((len(string)+3)/2)-1:len(string)])==True and palin1==True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
string=input()
palindrome=False
palin1=False

def palin(string):
    palindrome=False
    if string==string[::-1]:
        palindrome=True
    return palindrome

palindrome=palin(string)

if palin(string[int((len(string)-1)/2)])==True and palindrome==True:
    palin1=True

if palin(string[int((len(string)+3)/2)-1:int((len(string)+3)/2)+2])==True and palin1==True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s=input()
a=s[:len(s)//2]
b=s[(len(s)+3)//2:]
if s==s[::-1] and a==a[::-1] and b==b[::-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:]
if s==s[::-1] and a==a[::-1] and b==b[::-1]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s=input()
count=0
count_1=0
count_2=0
for i in range((len(s)-1)//2):
    if s[i]==s[-(i+1)]:
        count+=1
for j in range(len(s[:(len(s)+1)//2])//2):
    if s[:(len(s)+1)//2][j]==s[:(len(s)+1)//2][-(j+1)]:
        count_1+=1
for k in range(len(s[(len(s)+3)//2:])):
    if s[(len(s)+3)//2:][k]==s[(len(s)+3)//2:][-(k+1)]:
        count_2+=1
if count==(len(s)-1)//2 and count_1==len(s[:(len(s)+1)//2])//2 and count_2==len(s[(len(s)+3)//2:]):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s=input()
count=0
count_1=0
for i in range((len(s)-1)//2):
    if s[i]==s[-(i+1)]:
        count+=1
for j in range(len(s[:(len(s)+1)//2])//2):
    if s[:(len(s)+1)//2][j]==s[:(len(s)+1)//2][-(j+1)]:
    	count_1+=1
if count==(len(s)-1)//2 and count_1==len(s[:(len(s)+1)//2])//2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
if len(s) < 6:
  print('No')
  exit()
  
if s[::-1] != s:
  print('No')
  exit()
s = s[:len(s)//2]
if s[::-1] != s:
  print('No')
  exit()
print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
if s[0:3] == s[:-4:-1] :
    print('Yes')
else :
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
array = list(S)
N = len(array)
a = (N-2)//2
b = (N+2)//2
if array[0:a] == array[b:N-1]:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
def resolve():
    s = input()
    if s == s[::1]:
        s_1 = s[:len(s)//2]
        s_2 = s[(len(s)+1)//2:]
        if (s_1 == s_1[::-1]) and (s_2 == s_2[::-1]):
            print('Yes')
        else:
            print('No')
    else:
        print('No')
resolve()

Submission status: Wrong Answer

Solution code:
def resolve():
    s = input()
    if s == s[::1]:
        s_1 = s[:len(s)//2]
        s_2 = s[(len(s)+1)//2:]
        if s_1 == s_1[::-1] and s_2 == s_2[::-1]:
            print('Yes')
        else:
            print('No')
    else:
        print('No')
resolve()

Submission status: Wrong Answer

Solution code:
S = list(input())
n = len(S)
t = (n-1)//2
p = (t-1)//2


if S[:t] == S[t+1:][::-1]:
    T = list(S[:t])
    if T[:p] == T[p+1:][::-1]:
        print('Yes')
    else:print('No')
else:print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
s=''.join(list(reversed(S)))

T=S[0:int((N-1)/2)]
NT=len(T)
t=''.join(list(reversed(T)))

U=S[int((N+1)/2):N]
NU=len(U)
u=''.join(list(reversed(U)))

if S[0:int((N-1)/2)] == s[0:int((N-1)/2)] and T[0:int((NT-1)/2)] == t[0:int((NT-1)/2)] and U[0:int((NU-1)/2)] == u[0:int((NU-1)/2)]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
h=int((N-1)/2)
T=S[0:h]
t = int((len(T)-1)/2)
U=S[int((N+3)/2)-1:N]
i = int((len(U)-1)/2)
if S[0:h]==S[N-1:h:-1] and T[0:t]==T[len(T)-1:t:-1] and U[0:i]==U[len(U)-1:i:-1]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

fN =N[0:(lenN - 1)//2]
lN =N[(lenN + 3)//2-1:]
print(("No","Yes")[(0,1)[fN == fN[-1::-1]]*(0,1)[lN == lN[-1::-1]]])

Submission status: Wrong Answer

Solution code:
S = input()

#print ((len(S)-1)//2)
#print ((len(S)+3)//2)
#print (S[0:(len(S)-1)//2])
#print (S[((len(S)+3)//2)-1:len(S)])

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=list(input())
n=len(s)
if s[::1] == s[::-1] and s[:((n-1)//2):1]==s[:((n-1)//2):-1] and s[((n+3)//2)-1:n:1]==s[((n+3)//2)-1:n:-1]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s=list(input())
n=len(s)
if s[::1] != s[::-1]:
    print('No')
else:
    if s[:((n-1)//2):1]!=s[:((n-1)//2):-1]:
        print('No')
    else:
        if s[((n+3)//2)-1:n:1] != s[((n+3)//2)-1:n:-1]:
            print('No')
        else:
            print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
kaibunkai = input()
n = len(kaibunkai)
zenhan = kaibunkai[:(n-1)//2]
kouhan = kaibunkai[(n+3)//2-1:]
print(zenhan,kouhan)


def kaibun_desuka(bun):
  s = len(bun)
  for x in range(s//2):
    if bun[x] != bun[-x-1]:
      return False
  return True

if kaibun_desuka(kaibunkai) and kaibun_desuka(zenhan) and kaibun_desuka(kouhan):
  print("Yes")

  
else:
  print("No")

Submission status: Wrong Answer

Solution code:
a=input()
b=0
c=0
d=0
if len(a)==3:
  print("Yes")
else:
  for i in range((len(a)-1)//4):
    if a[i]!=a[int((len(a)//2)-i)]:
      c=c+1
    if a[int((len(a)//2)+1+i)]!=a[-i]:
      c=c+1
  if c==0:
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

Solution code:
a=input()
b=0
c=0
d=0
for i in range((len(a)-1)//4):
  if a[i]!=a[int((len(a)//2)-i)]:
    c=c+1
  if a[int((len(a)//2)+1+i)]!=a[-i]:
    c=c+1
if c==0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
import math
s = list(input())
n = len(s)
s1 = s[ : n-1 // 2]
s2 = s[n+3 // 2 - 1 : n]
flag = 1

for i in range(len(s) // 2):
    if s[i] != s[- i - 1]:
        flag = 0

for i in range(len(s1) // 2):
    if s1[i] != s1[- i - 1]:
        flag = 0

for i in range(len(s2) // 2):
    if s2[i] != s2[- i - 1]:
        flag = 0

print('Yes' if flag == 1  else 'No')

Submission status: Wrong Answer

Solution code:
import math
s = list(input())
n = int(len(s))
s1 = s[ : int((n-1)/2)]
s2 = s[int((n+3) / 2) - 1 : n]
flag = 1
for i in range(len(s1) // 2):
    if s1[i] != s1[- i - 1]:
        flag = 0

for i in range(len(s2) // 2):
    if s2[i] != s2[- i - 1]:
        flag = 0

print('Yes' if flag == 1  else 'No')

Submission status: Wrong Answer

Solution code:
import math
s = list(input())
n = int(len(s))
s1 = s[ : int((n-1)/2)]
s2 = s[int((n+3) / 2) - 1 : n]
flag = 0
for i in range(len(s1) // 2):
    if s1[i] == s1[int(len(s1)) - i - 1]:
        flag = 1
    else:
        break

for i in range(len(s2) // 2):
    if s2[i] == s2[int(len(s2)) - i - 1]:
        flag = 1
    else:
        break

print('Yes' if flag == 1  else 'No')

Submission status: Wrong Answer

Solution code:
import math
s = list(input())
n = int(len(s))
s1 = s[ : int((n-1)/2)]
s2 = s[int((n+3) / 2) - 1 : n]
flag = 0
for i in range(int(len(s1) / 2)):
    if s1[i] == s1[int(len(s1)) - i - 1]:
        flag = 1
    else:
        break

for i in range(int(len(s2) / 2)):
    if s2[i] == s2[int(len(s2)) - i - 1]:
        flag = 1
    else:
        break

print('Yes' if flag == 1  else 'No')

Submission status: Wrong Answer

Solution code:
import math
s = list(input())
n = int(len(s))
s1 = s[ : int((n-1)/2)]
s2 = s[int((n+3) / 2) - 1 : n]
print(s1)
print(s2)
flag = 0
print(int(len(s1)))
for i in range(int(len(s1) / 2)):
    if s1[i] == s1[int(len(s1)) - i - 1]:
        flag = 1
    else:
        break

for i in range(int(len(s2) / 2)):
    if s2[i] == s2[int(len(s2)) - i - 1]:
        flag = 1
    else:
        break

print('Yes' if flag == 1  else 'No')

Submission status: Wrong Answer

Solution code:
a=input()
b=0
c=0
d=0
for i in range(len(a)//4):
  if a[i]!=a[int((len(a)//2)-i)]:
    c=c+1
  if a[int((len(a)//2)+1+i)]!=a[-i]:
    c=c+1
if c==0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
import math
s = list(input())
n = int(len(s))
s1 = s[ : int((n-1)/2)]
s2 = s[int((n+3) / 2) - 1 : n]
flag1, flag2 = 0,0

for i in range(int(len(s1) / 2)):
    if s1[i] == s1[int(len(s1))-i-1]:
        flag1 = 1
    else:
        break

for i in range(int(len(s2) / 2)):
    if s2[i] == s2[int(len(s2))-i-1]:
        flag2 = 1
    else:
        break

print('Yes' if flag1 == 1 and flag2 == 1 else 'No')

Submission status: Wrong Answer

Solution code:
import math
s = list(input())
n = int(len(s))
s1 = s[ : int((n-1)/2)]
s2 = s[int((n+3) / 2) - 1 : n]
flag1, flag2 = 0,0
for i in range(int(len(s1) / 2)):
    if s1[i] == s1[int(len(s1))-i-1]:
        flag1 = 1

for i in range(int(len(s2) / 2)):
    if s2[i] == s2[int(len(s2))-i-1]:
        flag2 = 1

print('Yes' if flag1 == 1 and flag2 == 1 else 'No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

ls1 = S[0:int((N-1)/2-1)]
ls2 = S[int((N+3)/2-1):N]

if palindrome(S) == 0 and palindrome(ls1) and palindrome(ls2) == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
def is_kaibun(string):
    offset = 0 if len(string) % 2 == 0 else 1

    for i in range((len(string)//2)+1):
        if string[i] != string[len(string)-i-1]:
            return False
    else:
        return True


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

Submission status: Wrong Answer

Solution code:
S = input()
l = len(S) // 2
ll = l // 2
former = S[:l]
latter = S[l+1:]
for i in range(ll):
  if former[i] != former[-i-1] or latter[i] != latter[-i-1]:
    print("No")
    break
else:
  print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
print("Yes" if s == sorted(s) and s[:len(s)] == sorted(s[:len(s)]) and s[len(s)+1:] == sorted(s[:len(s)+1]) else "No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
flag = True
l, r = 0, len(s)-1
while l <= r:
    if s[l] == s[r]:
        l += 1
        r -= 1
    else:
        flag = False
        break
if flag:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
mid = n//2

ans = 'No'

if s[:mid] == s[mid+1:]:
    q = s[:mid]
    q_mid = len(q)//2

    t = s[mid+1:]
    t_mid = len(t)//2

    if q[:q_mid] == q[q_mid+1:] and t[:t_mid] == t[t_mid+1:]:
        ans = 'Yes'

print(ans)

Submission status: Wrong Answer

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

S_1=S[:N//2]
S_2=S[N//2+1:]

N=len(S_1)
ans='Yes'
for n in range(N):
    if S_1[n] != S_1[-(n+1)]:
        ans='No'
        break
    if S_2[n] != S_2[-(n+1)]:
        ans='No'
        break   

print(ans)

Submission status: Wrong Answer

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

if s == s[::-1] and t == t[::-1]:
  ans = "Yes"
else:
  ans = "No"
  
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
s = S[:(N-1)//2]
t = S[(N+3)//2-1:]
n = len(s)
s1 = s[:(n-1)//2]
s2 = s[(n+3)//2-1:]
t1 = t[:(n-1)//2]
t2 = t[(n+3)//2-1:]

check = True
for i in range((N-1)//2):
  if s[i] != t[-1-i]:
    check = False

check2 = True
if check:
  for j in range((n-1)//2):
    if s1[j] != s2[-1-j] or t1[j] != t2[-1-j]:
      check2 = False
  if check2:
    ans = "Yes"
  else:
    ans = "No"

else:
  ans = "No"
  
  
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
def isKaibun(ss):    
    return ss==ss[::-1]

s = input()

n=len(s)

if isKaibun(s) & ((n-1)//2)%2 !=0 & isKaibun(s[:((n-1)//2)]):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def isKaibun(ss):    
    return ss==ss[::-1]

s = input()

n=len(s)

if isKaibun(s) and ((n-1)//2)%2 !=0 and isKaibun(s[:((n-1)//2)]):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def isKaibun(ss):
    if len(ss)%2==0:
        return False
    for i in range((len(ss)-1)//2):
        if ss[i]!=ss[-i-1]:
            return False
    return True

s = input()

n=len(s)

if isKaibun(s) and isKaibun(s[:((n-1)//2)]):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def isKaibun(ss):
    if len(ss)%2==0:
        return False
    for i in range((len(ss)-1)//2):
        if ss[i]!=ss[-i-1]:
            return False
    return True

s = input()

n=len(s)

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

Submission status: Wrong Answer

Solution code:
def isKaibun(ss):
    if len(ss)%2==0:
        return False
    for i in range((len(ss)-1)//2+1):
        if ss[i]!=ss[-i-1]:
            return False
    return True

s = input()

n=len(s)

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

Submission status: Wrong Answer

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

s = input()

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

Submission status: Wrong Answer

Solution code:
S = list(input())
MID = (len(S) // 2) + 1


LAST = len(S) + 1



F = S[0:MID - 1]
L = S[MID : LAST]
LL = L[::-1]


if F != LL or (((len(S)-1)/2)%2) == 0:
    print('No')
    exit()

    
    MID_F = (len(F) // 2) + 1
    MID_L = (len(L) // 2) + 1

    FFF = F[0:MID_F-1]
    FFFF = F[MID_F : LAST]
    FFFFF = FFFF[::-1]
    if FFF != FFFFF:
        print('No')
        exit()

        LLL = L[0:MID_F-1]
        LLLL = L[MID_F : LAST]
        LLLLL = LLLL[::-1]
        if LLL != LLLLL:
            print('No')
            exit()
        

            
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
S = list(input())
MID = (len(S) // 2) + 1


LAST = len(S) + 1



F = S[0:MID - 1]
L = S[MID : LAST]
LL = L[::-1]


if F != LL or (((len(S)-1)/2)%2) == 0:
    print('No')

    
    MID_F = (len(F) // 2) + 1
    MID_L = (len(L) // 2) + 1

    FFF = F[0:MID_F-1]
    FFFF = F[MID_F : LAST]
    FFFFF = FFFF[::-1]
    if FFF != FFFFF:
        print('No')


        LLL = L[0:MID_F-1]
        LLLL = L[MID_F : LAST]
        LLLLL = LLLL[::-1]
        if LLL != LLLLL:
            print('No')

            
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
S = list(input())
MID = (len(S) // 2) + 1

print(S)
print(MID)
LAST = len(S) + 1



F = S[0:MID - 1]
L = S[MID : LAST]
LL = L[::-1]
print(F)
print(L)
print(LL)

if F != LL or (((len(S)-1)/2)%2) == 0:
    print('No')

    
    MID_F = (len(F) // 2) + 1
    MID_L = (len(L) // 2) + 1

    FFF = F[0:MID_F-1]
    FFFF = F[MID_F : LAST]
    FFFFF = FFFF[::-1]
    if FFF != FFFFF:
        print('No')


        LLL = L[0:MID_F-1]
        LLLL = L[MID_F : LAST]
        LLLLL = LLLL[::-1]
        if LLL != LLLLL:
            print('No')

            
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
S=list(input())
N=len(S)
x=0
for i in range(int((N-1)/2)):
    if S[i]!=S[-(i+1)]:
        print("No")
        break
    elif i==int((N-1)/2)-1:
        x+=1
if x==1:
    S_l=S[:int((N-1)/2)]
    for i in range(int(len(S_l)/2)+1):
        if S_l[i]!=S_l[-(i+1)]:
            print("No")
            break
        elif i==int(len(S_l)/2)-1:
            x+=1
if x==2:
    S_m=S[int((N+3)/2)-1:N]
    for i in range(int(len(S_m)/2)+1):
        if S_m[i]!=S_m[-(i+1)]:
            print("No")
            break
        elif i==int(len(S_m)/2)-1:
            print("Yes")

Submission status: Wrong Answer

Solution code:
S=list(input())
N=len(S)
x=0
for i in range(int((N-1)/2)):
    if S[i]!=S[-(i+1)]:
        print("No")
        break
    elif i==int((N-1)/2)-1:
        x+=1
if x==1:
    S_l=S[:int((N-1)/2)]
    for i in range(int(len(S_l)/2)):
        if S_l[i]!=S_l[-(i+1)]:
            print("No")
            break
        elif i==int(len(S_l)/2)-1:
            x+=1
if x==2:
    S_m=S[int((N+3)/2)-1:N]
    for i in range(int(len(S_m)/2)):
        if S_m[i]!=S_m[-(i+1)]:
            print("No")
            break
        elif i==int(len(S_m)/2)-1:
            print("Yes")

Submission status: Wrong Answer

Solution code:
S=list(input())
N=len(S)
x=0
for i in range(int((N-1)/2)):
    if S[i]!=S[-(i+1)]:
        print("No")
        break
    elif i==int((N-1)/2)-1:
        x+=1
if x==1:
    S_l=S[:int((N-1)/2)]
    for i in range(int(len(S_l)/2)):
        if S_l[i]!=S_l[-(i+1)]:
            print("No")
            break
        elif i==int(len(S_l)/2)-1:
            x+=1
if x==2:
    S_m=S[int((N+3)/2)-1:N]
    for i in range(int(len(S_l)/2)):
        if S_m[i]!=S_m[-(i+1)]:
            print("No")
            break
        elif i==int(len(S_m)/2)-1:
            print("Yes")

Submission status: Wrong Answer

Solution code:
S = list(input())
l = len(S)

def judge(arr):
  l = len(arr)
  if len(arr) % 2 == 0:
    print("No")
    exit()
  for i in range(int((l-1)/2)):
    if S[i] != S[l-1-i]:
      print("No")
      exit()
judge(S)
center = int((l-1)/2)
judge(S[0:center])
judge(S[center+1:l])
print("Yes")

Submission status: Wrong Answer

Solution code:
S = input()
n = len(S)
check = True
if (n-1) % 4 == 0:
  print("No")
  exit()
half = (n-1)/2
zen, kou = [], []
for i in range(0, int((n-1)/2)):
  j = int((n-1)/2+i)+1
  zen.append(S[i])
  kou.append(S[j])
p = len(zen)
q = len(kou)
if zen != kou:
  print("No")
  exit()
for i in range(p):
  if zen[i] != zen[p-i-1]:
    check = False
for i in range(q):
  if kou[i] != zen[q-i-1]:
    check = False
if check:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S = input()
n = len(S)
check = True
if (n-1) % 4 == 0:
  print("No")
  exit()
half = (n-1)/2
zen, kou = [], []
for i in range(0, int((n-1)/2)):
  j = int((n-1)/2+i)+1
  zen.append(S[i])
  kou.append(S[j])
p = len(zen)
q = len(kou)
for i in range(p):
  if zen[i] != zen[p-i-1]:
    check = False
for i in range(q):
  if kou[i] != zen[q-i-1]:
    check = False
if check:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s=input()
n=len(s)
for i in range(int((n-1)/2)):
    if s[i]==s[int((n-1)/2)-1-i] and s[int((n+3)/2)-1+i]==s[n-1-i]:
        continue
    else:
        print("No")
#        print(s[i],s[int((n-1)/2)-1-i],s[int((n+3)/2)-1+i],s[n-1-i])
        exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
def partpall(s,n):
	if s!=s[::-1]:
		return False
	else:
		return True

def pall(s,n):
	if s!=s[::-1]:
		return False
	return partpall(s[n//2 +1 :],n) and partpall(s[:n//2 ],n)


# s=input("enter:")
s="akakaka"
# print("sucess",s,s[::-1])
# revStr=s[::-1]
n=len(s)
print(n)
if pall(s,n):
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

Solution code:
def partpall(s,n):
	if s!=s[::-1]:
		return False
	else:
		return True

def pall(s,n):
	if s!=s[::-1]:
		return False
	return partpall(s[n//2 +1 :],n) and partpall(s[:n//2 ],n)


# s=input("enter:")
s="akakaka"
# print("sucess",s,s[::-1])
# revStr=s[::-1]
n=len(s)
print(n)
if pall(s,n):
	print("True")
else:
	print("False")

Submission status: Wrong Answer

Solution code:
#

Submission status: Wrong Answer

Solution code:
import sys
read = sys.stdin.buffer.read
s = read().decode("utf-8")
H = s[:(len(s) - 1) // 2]
B = s[(len(s) - 1) // 2 + 1:-1]

if H == H[::-1] and B == B[::-1]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
r_S=S[::-1]
c1=int((N-1)/2)
c2=int((N+3)/2)
S1=S[:c1]
r_S1=S1[::-1]
S2=S[(c2-1):]
r_S2=S2[::-1]


#kaibun hantei
if S1==r_S1 and S1==r_S1 and S2==r_S2:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
c1=int((N-1)/2)
c2=int((N+3)/2)
S1=S[:c1]
r_S=S[::-1]
r_S1=S1[::-1]
S2=S[(c2-1):]
r_S2=S2[::-1]


#kaibun hantei
N_s=int((len(S)-1)/2)
N_s1=int((len(S1)-1)/2)
N_s2=int((len(S2)-1)/2)

if S1[:N_s]==r_S1[:N_s] and S1[:N_s1]==r_S1[:N_s1] and S2[:N_s2]==r_S2[:N_s2]:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
def resolve():
    def is_rotatable(S):
        print(S)
        for i in range(len(S)//2):
            if S[i] != S[-1-i]:
                return False
        return True
    S = input()
    N = len(S)
    if is_rotatable(S) and is_rotatable(S[:N//2]) and is_rotatable(S[(N//2)+1:]):
        print("Yes")
    else:
        print("No")


if '__main__' == __name__:
    resolve()

Submission status: Wrong Answer

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

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

first = S[:(length - 1) // 2]
second = S[(length + 1) // 2:]
#print(first)
#print(second)

if check_palin(first) == True and check_palin(second) == True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()

flag = 0
for i in range(0, len(S), 1):
	if S[i] != S[len(S)-1-i]:
		flag = 1

for i in range(0, (len(S) + 1) //2, 1):
	if S[i] != S[len(S)//2-1-i]:
		flag = 1

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

Submission status: Wrong Answer

Solution code:
S = input()

flag = 0
for i in range(0, len(S), 1):
	if S[i] != S[len(S)-1-i]:
		flag = 1

for i in range(0, (len(S) + 1) //2, 1):
	if S[i] != S[(len(S)-1)//2-i]:
		flag = 1

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

Submission status: Wrong Answer

Solution code:
S = input()

flag = 0
for i in range(0, len(S), 1):
	if S[i] != S[len(S)-1-i]:
		flag = 1

for i in range(0, (len(S) + 1) //2, 1):
	if S[i] != S[len(S)-1-i]:
		flag = 1

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

Submission status: Wrong Answer

Solution code:

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

Submission status: Wrong Answer

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

for i in range(N//2):
  if S[i] != S[-i-1]:
    print("No")
    exit()
    
for i in range(N//4):
  if S[i] != S[N//2-1]:
    print("No")
    exit()
  if S[i + N//2 +1] != S[-i]:
    print("No")
    exit()
    
print("Yes")

Submission status: Wrong Answer

Solution code:
s = str(input())
n = len(s)
ans = "Yes"
j_1 = 0
for i in range((n-1)//2):
  if(s[i]!=s[n-i-1]):
    j_1 += 1
    ans = "No"
    break
if(j_1==0):
  j_2 = 0
  for i in range((n-1)//4):
    if(s[i]!=s[(n-1)//2-i]):
      j_2 += 1
      ans = "No"
      break
  j_3 = 0
  if(j_3 == 0):
    for i in range((n-1)//4):
      if(s[(n+1)//2+i]!=s[n-i-1]):
        j_3 += 1
        ans = "No"
        break
print(ans)

Submission status: Wrong Answer

Solution code:
s = str(input())
n = len(s)
ans = "Yes"
j_1 = 0
for i in range((n-1)//2):
  if(s[i]!=s[-1*(i+1)]):
    j_1 += 1
    ans = "No"
    break
if(j_1==0):
  j_2 = 0
  for i in range((n-1)//4):
    if(s[i]!=s[(n-1)//2-i]):
      j_2 += 1
      ans = "No"
      break
  j_3 = 0
  if(j_3 == 0):
    for i in range((n-1)//4):
      if(s[(n+1)//2+i]!=s[n-i-1]):
        j_3 += 1
        ans = "No"
        break
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
n1 = (n-1)//2
n2 = (n+1)//2

if s[:n1] == s[:n1][::-1] and s[n2:] == s[n2:][::-1]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
n1 = (n-1)//2
n2 = (n+2)//2

if s[:n1] == s[:n1][::-1] and s[n2:] == s[n2:][::-1]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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