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:
s = input()
n = len(s)


def f(s):
    n = len(s)
    if n % 2 == 0:
        return s[:n // 2] == s[n // 2:]
    else:
        return s[:n // 2] == s[n // 2 + 1:]


if f(s) and f(s[:(n - 1)//2 + 1]) and f(s[(n + 3) // 2 - 1:]):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = list(input())
S1 = S[0:int((len(S) - 1) / 2)]
S2 = S[int((len(S) + 3) / 2) - 1:]

if len(S1) % 2 == 0:
    S3 = S1[0:int((len(S1) - 1) / 2) + 1]
    S4 = S1[int((len(S1) + 3) / 2) - 1:]
else:
    S3 = S1[0:int((len(S1) - 1) / 2)]
    S4 = S1[int((len(S1) + 3) / 2) - 1:]

if S1 == S2 and S3 == S4 and not len(S1) == 1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
S = list(input())


def is_kaibun(token):
    N = len(token)
    x = int((N-1)/2)
    y = int((N+3)/2)
    front = S[0:x]
    back = S[y-1:N]
    if not front == back:
        return False
    return True


N = len(S)
x = int((N-1)/2)
y = int((N+3)/2)
front = S[0:x]
back = S[y-1:N]

if is_kaibun(S) and is_kaibun(front) and is_kaibun(back):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def ispalindrome(str): return 1 if str == str[::-1] else 0
S = input()
N = len(S)

i1 = int((N-1)/2)
i2 = int((N+3)/2)-1
strong = True
print(S[:i1], S[i2:])
if not ispalindrome(S):
  strong = False
if not ispalindrome(S[:i1]):
  strong = False
if not ispalindrome(S[i2:]):
  strong = False

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

Submission status: Wrong Answer

Solution code:
s=input()

n=len(s)
flag=0

for i in range(int((n-1)/2)):
    if s[i] == s[n-1-i]:
        a =0
    else:
        flag = 1

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

Submission status: Wrong Answer

Solution code:
S=str(input())

N=int(len(S))

count = 0
counta=0
for i in range((N-1)//2):
    if S[i]==S[(N-1)//2-i-1]:
        count+=0
    else:
        count+=1

for i in range((N-1)//2):
    if S[i+(N+1)//2]==S[N-1-i]:
        count+=0
    else:
        count+=1
if count == 0 :
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def main():
    # def showargs(func):
    #     def inner(text):
    #         print(f"StateMent:{text}")
    #         print(f"ReversedStateMent:{text[::-1]}")
    #         return func(text)
    #     return inner
    def ispalindrome(str): return 1 if str == str[::-1] else 0

    str= input()
    n=len(str)
    N=int((n-1)/2)
    # M, N = map(int, input().split())
    # A=[0]*N
    # B=[0]*N
    # for i in range(N):
    #     A[i],B[i] = map(int,input().split())
    # for i in range(N):
    #     print(B[i])

    # print(showargs(N))
    # s1 = str[:N]
    # s2 = str[N:]
    
    # s_first= str[:N]
    s_first, s_second, s_last = str[:N], str[N:N+1], str[N+1:]
    # print(s_first,s_second,s_last)
    if ispalindrome(str):
        if ispalindrome(s_first) and ispalindrome(s_last):
            print("Yes")
            return
        else:
            print("No1")
            return
    else:
        print("No2")
        return
main()

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
a = N % 4
ans = "Yes"
if a == 1:
    x = (N - 1) / 4
    x = int(x)
    for i in range(x):
        if (S[i] != S[2 * x - i - 1]) or (S[2 * x + 1 + i] != S[N - 1 - i]):
            ans = "No"
elif a == 3:
    x = (N - 3) / 4
    x = int(x)
    for i in range(x):
        if (S[i] != S[2 * x - i]) or (S[2 * x + 2 + i] != S[N - 1 - i]):
            ans = "No"
print(ans)

Submission status: Wrong Answer

Solution code:
def judge(s):
    l = int((len(s)-1)/2)
    if s[:l] == s[l+1:][::-1]:
        return True
    else:
        return False

def main(s):
    l = int((len(s)-1)/2)
    frag1 = judge(s)
    frag2 = judge(s[:l])
    frag3 = judge(s[l+1:])
    if frag1 and frag2 and frag3:
        return 'Yes'
    else:
        return 'No'

s = input()
print(main(s))

Submission status: Wrong Answer

Solution code:
s = input()

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

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 = input()
l = len(s)

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

Submission status: Wrong Answer

Solution code:
def B():
    S = input()
    if not S:
        print('No')
        return
    if len(S) == 3:
        if not S[0] == S[2]:
            print('No')
            return
    for i in range(len(S)//4):
        # print(S[i], S[len(S)//2-i-1], S[len(S)//2+i+1], S[-i-1])
        if not (S[i] == S[(len(S)-1)//2-i-1] == S[(len(S)+3)//2+i-1] == S[-i-1]):
            print('No')
            return
    print('Yes')
B()

Submission status: Wrong Answer

Solution code:
s = input()

s1 = s[0:round(len(s)/2)-1]
s2 = s[round(len(s)/2):len(s)]

if s1 == s2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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


def check(s):
    for i in range(len(s) // 2):
        c1 = s[i]
        c2 = s[-(i+1)]
        if c1 != c2:
            return False
    return True

main()

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
print(s, n)
i = int(((n-1)/2)-1)
j = int(((n+3)/2)-1)
#print(i, j)
l = s[:i+1]
l2 = l[::-1]
r = s[j:]
r2 = r[::-1]
#print(l, l2, r, r2)
if l == l2 and r == r2 and l == r:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

def kaibun(t):
    flg = False
    for i in range(int((len(t) + 1) / 2)):
        if t[i] == t[len(t) - 1 - i]:
            flg = True
        else:
            flg = False
    return flg

f1 = kaibun(s)
f2 = kaibun(s[0:int((len(s) - 1) / 2)])
f3 = kaibun(s[int((len(s) + 1) / 2):len(s)])

if f1 and f2 and f3:
    print('Yes')
else:
    print('No')

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[(N+3)//2:]):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S = input()


def main(s):
    l = len(s)

    left = s[:int((l - 1) / 2)]
    right = s[int((l + 3) / 2) - 1:l]

    left_rev = ''.join(list(reversed(left)))
    right_rev = ''.join(list(reversed(right)))

    if left == left_rev and right == right_rev:
        res = 'Yes'
    else:
        res = 'No'
    return res


print(main(S))

Submission status: Wrong Answer

Solution code:
s = input()

n = len(s)

ans = 0

s1 = s[:int((n - 1) / 2)]
s2 = s[int((n + 3) / 2) - 1:]

s5 = s[::-1]

s3 = s1[::-1]
s4 = s2[::-1]

print(s5, s3, s4)
if s1 == s3:
    ans += 1

if s2 == s4:
    ans += 1

if s == s5:
    ans += 1

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

Submission status: Wrong Answer

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

s = input()
n = int(len(s)/2)

s1 = s[:n]
s2 = s[n+1:]

if is_kaibun(s1) == True:
  if s1 == s2:
    print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s = input()

def pal(s):
  n = len(s)
  if n % 2 == 0:
    if s[:(n-1)//2 + 1] == s[((n+3)//2) - 1:]:
      return True
    else:
      return False
  else:
    if s[:(n-1)//2] == s[((n+3)//2) - 1:]:
      return True
    else:
      return False
n = len(s)
if pal(s) and pal(s[:(n-1)//2]) and pal(s[((n+3)//2) - 1:]):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
import numpy as np
a     = list(input())

a_len = len(a)
a_len_= int((a_len-1)/2)

a_    = a[0:a_len_]
a_re  = list(reversed(a))
a_re_ = a_re[0:a_len_]

if a_len_ % 2 == 0:
  print('No')
else:
  if a == a_re:
    if a_ == a_re_:
      print('Yes')
    else:
      print('No')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = list(input())
N = len(S)
forw = S[:N//2]


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

Submission status: Wrong Answer

Solution code:
text = str(input())
n = len(text)
target = (n-1)//2

print(target)

bef = text[:target]
aft = text[target+1:]
tfa = aft[::-1]

if bef == tfa:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

if n == n[::-1]:
  if n[:((x-1)//2)] == n[:((x-1)//2)][::-1]:
    if n[:((x+3)//2)] == n[:((x+3)//2)][::-1]:
      print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
a=input()
a=list(a)
a1=[]
b1=[]
c1=[]
for i in range(len(a)-1,-1,-1):
    a1.append(a[i])
b=a[0:(len(a)-1)//2]
for i in range(len(b)-1,-1,-1):
    b1.append(a[i])
c=a[(len(a)+3)//2-1:len(a)]
for i in range(len(c)-1,-1,-1):
    c1.append(a[i])



if(a==a1):
    if(b==b1 and c==c1):
        print("YES")
    else:
        print("NO")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
s = list(input())
t = s[::-1]
n = len(s)
if s != t:
  print ('No')
  exit()
if n == 3:
  print('Yes')
  exit()
d = s[:int((n-1)/2)+1]
e = d[::-1]
r = s[int((n+3)/2-1):]
q = r[::-1]
#print(r,q)
if d != e:
  print('No')
  exit()
if r != q:
  print ('No')
  exit()
  
print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

def is_kaibun(s):
    for i in range(len(s) // 2):
        if s[i] != s[-i-1]:
            print('No')

N = len(S)
is_kaibun(S)
is_kaibun(S[:(N-1)//2])
is_kaibun(S[(N+3)//2-1:])
print('Yes')

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
ok = N > 3
for i in range(int((N-1)/2)):
  if S[i] != S[-(i+1)]:
    ok = False
a = int((N + 3) / 2)
b = a + int((N-a) // 2)
for i, j in enumerate(range(a-1, b)):
  if S[j] != S[-(i+1)]:
    ok = False
print('Yes' if ok else 'No')

Submission status: Wrong Answer

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

i = 0
ans = 'Yes'
while 0 + i < n // 2 - 1 - i:
  if s[0] != s[n-1] or s[0] != s[n // 2 -1] or s[0] != s[n // 2 +1]:
    ans = 'No'
    break
  i += 1

print(ans)

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[:(n-1)//2] == S[(n+3)//2-1:n]:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S = input()

end = len(S)
half = int(end/2)

for i in range(0,half):
    if S[i] is not S[half-1-i]:
        print("NO")
        exit()
S1 = S[0:half]
S2 = S[half+1:end]

if S1 == S2:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
S = input()
if(S==S[::-1]) and S != "level":
      print("Yes")
else:
      print("No")

Submission status: Wrong Answer

Solution code:
def kaibun(s):
    flg = False
    if len(s) % 2 == 0:
        if s[0:int((len(s)/2)-1)] == s[int(len(s)/2):len(s)-1:-1]:
            flg =True
    else:
        if s[0:int((len(s)-1)/2-1)] == s[int((len(s)+1)/2):len(s)-1:-1]:
            flg =  True
    return flg



s = input()
ans = "No"



if kaibun(s):
    if kaibun(s[0:int((len(s)-1)/2-1)]) and kaibun(s[int((len(s)+1)/2):len(s)-1]):
        ans = "Yes"
print(ans)

Submission status: Wrong Answer

Solution code:
s=str(input())
def judge(s):
  l=len(s)
  if l%2==0:
    return 0
  else:
    pass
  for i in range((l-1)//2):
    if s[i]==s[-i-1]:
      pass
    else:
      return 0
  return 1
L=len(s)
if judge(s) and judge(s[0:(L-1)//2]) and judge(s[(L+3)//2-1:]):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
S = list(input())


def is_kaibun(token):
    N = len(token)
    x = int((N-1)/2)
    y = int((N+3)/2)
    front = S[0:x]
    back = S[y-1:N]
    if not front == back:
        return False
    return True


N = len(S)
x = int((N-1)/2)
front = S[0:x]

if is_kaibun(S) and is_kaibun(front):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = list(input())
n = len(s)
ans = "No"

if n == 3:
    if s[0] == s[2]:
        print("Yes")
        exit()
    else:
        print("No")
        exit()

if n == 5:
    if s[0] == s[1] == s[3] == s[4]:
        print("Yes")
        exit()
    else:
        print("No")
        exit()


n1 = int((n - 1)/4)

if n >= 7:
    for i in range(n1):
        if s[i] == s[n//2 - 1 - i] == s[n//2 + 1 + i] == s[n - 1 - i]:
            ans = "Yes"
        else:
            print("No")
            exit()
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def palin(a):
    if(a==a[::-1]):
        return True
    else:
        return False
def strong(s):
    if(palin(s[:(len(s)-1)//2]) and palin(s[((len(s)+3)//2)-1:])):
        return ("Yes")
    else:
        return("No")
s=input()
print(strong(s))

Submission status: Wrong Answer

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

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()

n = len(S)
ans = "No"
if S[:n//2] == S[n//2+1:][::-1]:
    S1 = S[:(n-1)//2]
    n1 = len(S1)
    if S1[:n1//2] == S1[n1//2+1:][::-1]:
        S2 = S[(n+3)//2-1:]
        n2 = len(S2)
        if S2[:n2//2] == S2[n2//2+1:][::-1]:
            ans = "Yes"

print(ans)

Submission status: Wrong Answer

Solution code:
##B
S = str(input())
N = int(len(S))
##print(N)
S1 = S[0:(N-1)//2]
N1 = len(S1)
S2 = S[(N+3)//2-1:N]
N2 = len(S2)

if S1 == S2:
    if S1[0:(N1-1)//2] == S1[(N1+3)//2-1:N1]:
        if S2[0:(N2-1)//2] == S2[(N2+3)//2-1:N2]:
            print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()

def isKaibun(s):
    l = int(len(s)/2)
    #print(l)
    f = True
    
    for i in range(l):
        #print(s[i], s[-(i+1)])
        if s[i] != s[-(i+1)]: f = False
    return f
    
def isStrongKaibun(s):
    if len(s)==1:
        return True
    else:
        if isKaibun(s):
            return isStrongKaibun(s[0:int(len(s)/2)])
        else:
            return False

print("Yes" if isStrongKaibun(s) else "No")

Submission status: Wrong Answer

Solution code:
s = input()

n = len(s)

s_l = s[0:int((n-1)/2)]
s_r = ''.join(reversed(s[int((n-1)/2)+1:]))

if s_l == s_r :
    print('Yes')

else:
    print('No')

Submission status: Wrong Answer

Solution code:
def ispalindrome(str): return 1 if str == str[::-1] else 0
S = input()
N = len(S)

i1 = int((N-1)/2)
i2 = int((N+3)/2)-1
strong = True
if not ispalindrome(S[:i1]):
  strong = False
if not ispalindrome(S[i2:]):
  strong = False

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

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
 
import math
M = math.floor((N-3)/2)
 
a = 0
 
for i in range(M):
  if S[i] != S[i+M+2]:
    a = 1
    
for j in range(M):
  if S[i] != S[N-i-1]:
    a = 1
    
if a == 0:
  print('Yes')
  
else:
  print('No')

Submission status: Wrong Answer

Solution code:
data = input()
S = [c for c in data]
S_inverse = list(reversed(S))

print(S)
print(S_inverse)

if S != S_inverse:
    print("No")
    exit(0)

N = len(S)
if S[: int((N - 1) / 2)] != S_inverse[int((N + 3) / 2):]:
    print("No")
    exit(0)

if S[int((N + 3) / 2):] != S_inverse[:int((N - 1) / 2)]:
    print("No")
    exit(0)

print("Yes")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
if n == 3:
    print("Yes")
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:
s = input()

first = (len(s)-1)//2
sec = (len(s)+3)//2

if s[:first] == s[:first][::-1]:
    if s[sec-1:] == s[sec-1:][::-1]:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import math
import sys

s = input()
n= len(s)

"""
sが回文かどうかのチェック
"""
end = math.ceil(n/2)
for i in range(end):
  head = s[i]
  tail = s[-i-1]
  if head != tail:
    print('No')
    sys.exit()
    
"""
2つめチェック
"""
end = int((n-1)/2-1)
for i in range(end):
  head = s[i]
  tail = s[end-i]
  if head != tail:
    print('No')
    sys.exit()

"""
3つめチェック
"""
start=int((n+3)/2-1)
end = n-1
iteration=0
for i in range(start,end):
  head = s[i]
  tail = s[end-iteration]
  iteration+=1
  if head != tail:
    print('No')
    sys.exit()

Submission status: Wrong Answer

Solution code:
s1 = str(input())
s2 = ''
for i in range(len(s1)):
    s2 += s1[- i - 1]
if s1 != s2:
    print('No')
    exit()

t1 = s1[0 : (len(s1)) // 2]
t2 = ''
for i in range(len(t1)):
    t2 += t1[- i - 1]
if t1 != t2:
    print('No')
    exit() 

u1 = s1[(len(s1) + 3) // 2 + 1::]
u2 = ''
for i in range(len(u1)):
    u2 += u1[- i - 1]
if u1 != u2:
    print('No')
    exit() 
print('Yes')

Submission status: Wrong Answer

Solution code:
def isPalindrome(s): 

    rev = ''.join(reversed(s)) 
  
    if (s == rev): 
        return True
    return False

s = input()
ans = isPalindrome(s) 
  
if (ans): 
    print("Yes") 
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]:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

def palindromic(word):
    return word == word[::-1]
if palindromic(s1) and palindromic(s2):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
def kaibun(s,n):
    return s[0:(n+1)//2-1]==s[n:(n+3)//2-2:-1]

if(kaibun(S,N) & kaibun(S[0:(N+1)//2-1],N//2) & kaibun(S[N:(N+3)//2-2:-1],N//2)):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
#!python3.4.3

S = input()
N = len(S)


def hantei(s, n):
  if s[:n//2] == s[:n//2:-1]:
    return True
  else:
    return False

S1 = S[0:(N-1)//2]
S2 = S[((N+3)//2)-1:]


if hantei(S, N) and hantei(S1, len(S1)) and hantei(S2, len(S2)):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
org_str = input()

new_str_list = list(reversed(org_str))

new_str = org_str[::-1]
if org_str == new_str:
    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 palindrome(A) & palindrome(B):
    print('YES')
else:
    print('NO')

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 s[0:left] == s[right:n] and check(s[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=input()
n=len(s)
s1=s[:n//2]
s2=s[n//2+1:]
test =True
if(s!=s[::-1]):
	test=False
if (s1!=s1[::-1]):
	test=False
if(s2!=s2[::-1]):
	test=False
if(test==True):
	print("YES")
else:
	print("NO")

Submission status: Wrong Answer

Solution code:
s = list(input())
n = len(s)
sl = int((n-1)/2)
sl2 = int((n+3)/2-1)
flag = 0
circle1 = s[:sl]
circle2 = s[sl2:]
#print(circle2)
for i in range(len(circle1)//2):
    if circle1[i] != circle1[len(circle1) - 1 - i]:
        print('No')
        exit()
for j in range(len(circle2)//2):
    if circle2[j] != circle2[len(circle2) - 1 - i]:
        print('No')
        exit()
print('Yes')

Submission status: Wrong Answer

Solution code:
s = input()
hs = s[:int((len(s)-1)/2)]
def iskb(s):
    n = len(s)
    k = 1
    for i in range(int((n-1)/2)):
        if s[i] != s[-(i+1)]:
            k = 0
            break
    return k
if iskb(s)+iskb(hs) == 2:
    print("Yes")
else:
    print("No")

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

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 = str(input())

ans = 0

def kaibun(tex):
  n = len(tex)
  before = tex[0:int((n-1)/2)]
  after = tex[int((n+3)/2-1):]
  if before == after:
    return 1
  else:
    return 0
    
ans += kaibun(s)
ans += kaibun(s[0:int((len(s)-1)/2)])
ans += kaibun(s[int((len(s)+3)/2-1):])

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

Submission status: Wrong Answer

Solution code:
def isPalindrome(s):
  n=len(s)
  i=0
  while(i<=(n-1)/2):
    if s[i]==s[-(i+1)]:
      i+=1
    else:
      return False
  return True

s=input()
n=len(s)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
text_ = input()

if text_ != text_[::-1]:
    print('No')
elif text_[:((len(text_) - 1)//2)] != text_[:((len(text_) - 1)//2)][::-1]:
    print('No')
elif text_[:((len(text_) + 3) // 2)] != text_[:((len(text_) + 3) // 2)][::-1]:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
s = input()

def kaibun_check(s):
    n = len(s)
    zenhan_s = s[:int((n - 1)/2)]
    zenhan = zenhan_s == zenhan_s[::-1]
    kouhan_s = s[int((n + 1)/2):]
    kouhan = kouhan_s == kouhan_s[::-1]
    return zenhan and kouhan

print("Yes" if kaibun_check(s) else "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:]
    ls1 = len(s1)
    for i in range(len(s1)//2):
        if s1[i] == s1[ls1-1-i] and s2[i] == s2[ls1-1-i]:
            continue
        else:
            print("No")
            exit()
    print("Yes")
resolve()

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	B
# CreatedDate:  2020-03-22 20:59:36 +0900
# LastModified: 2020-03-22 21:24:32 +0900
#


import os
import sys


def main():
    S = input()
    N = len(S)
    S_b = S[:(N-1)//2]
    S_a = S[(N+3)//2:]
    for i in range((N+1)//2-1):
        if S[i]!=S[-(i+1)]:
            print("No")
            return 
    for i in range((len(S_b)+1)//2):
        if S_b[i]!=S_b[-(i+1)]:
            print("No")
            return 
    for i in range((len(S_a)+1)//2):
        if S_a[i]!=S_b[-i]:
            print("No")
            return 
    print("Yes")



if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

S = input().strip()
#N, M = list(map(int, input().strip().split()))
result = 'No'
N = len(S)
"""
print(S[0:(N-1)//2])
print(isKaibun(S[0:(N-1)//2]))
print(S[(N+3)//2-1::])
print(isKaibun(S[(N+3)//2-1::]))
"""
if isKaibun(S[0:(N-1)//2]) and isKaibun(S[(N+3)//2-1::]):
  result = 'Yes'
print(result)

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
#print(s, n)
i = int(((n-1)/2)-1)
j = int(((n+3)/2)-1)
#print(i, j)
l = s[:i+1]
l2 = l[::-1]
r = s[j:]
r2 = r[::-1]
#print(l, l2, r, r2)
if l == l2 and r == r2:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

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


def check(s):
    print(s)
    for i in range(len(s) // 2):
        c1 = s[i]
        c2 = s[-(i+1)]
        if c1 != c2:
            return False
    return True

main()

Submission status: Wrong Answer

Solution code:
s = list(input())
t = s[::-1]
n = len(s)
if s != t:
  print ('No')
  exit()
if n == 3:
  print('Yes')
  exit()
d = s[:int((n-1)/2)+1]
e = d[::-1]
#print(d,e)
r = s[int((n+3)/2-1):]
q = r[::-1]
#print(r,q)
if d != e:
  print('No')
  exit()
if r != q:
  print ('No')
  exit()

Submission status: Wrong Answer

Solution code:
S = input()
S = list(S)
S_1 = S[0:int((len(S)-1)/2)]
S_2 = S[int((len(S)-1)/2)+1:len(S)]
if S_1 == S_2:
    if len(S_1) % 2 == 0:
        S_1_1 = S_1[0:int((len(S_1)-1)/2)+1]
        S_1_2 = S_1[int((len(S_1)-1)/2)+1:len(S_1)]
        S_2_1 = S_2[0:int((len(S_2)-1)/2)+1]
        S_2_2 = S_2[int((len(S_2)-1)/2)+1:len(S_2)]
    else:
        S_1_1 = S_1[0:int((len(S_1)-1)/2)]
        S_1_2 = S_1[int((len(S_1)-1)/2)+1:len(S_1)]
        S_2_1 = S_2[0:int((len(S_2)-1)/2)]
        S_2_2 = S_2[int((len(S_2)-1)/2)+1:len(S_2)]
    if S_1_1 == S_1_2:
        if S_2_1 == S_2_2:
            print('Yes')
        else:
            print('No')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = input()
flg = 0
n = len(s)
s1 = s[0:(n-1)//2]
s2 = s[(n+3)//2-1:]
for i in range(1,len(s1)//2+1):

  if s1[i-1] != s1[-i]:
    flg = 1
    break
  if s2[i-1] != s2[-i]:
    flg = 1
    break 

print("Yes" if flg == 0 else "No")

Submission status: Wrong Answer

Solution code:
def kaibunCheck(s):
  flag = True
  if len(s) % 2 == 1:
    n = len(s)
    for i in range((n + 1) // 2):
      if s[i] != s[(i + 1) * (-1)]:
        flag = False
  else:
    flag = False
    
  return flag
        
S = input()
N = len(S)

S1 = S[:(N - 1) // 2]
S2 = S[(N + 1) // 2 :]

if kaibunCheck(S) == True and kaibunCheck(S1) == True and kaibunCheck(S2) == True:
  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+2:]
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:
S = list(input())
S1 = S[0:int((len(S) - 1) / 2)]
S2 = S[int((len(S) + 3) / 2) - 1:]

if len(S1) % 2 == 0:
    S3 = S1[0:int((len(S1) - 1) / 2) + 1]
    S4 = S1[int((len(S1) + 3) / 2) - 1:]
else:
    S3 = S1[0:int((len(S1) - 1) / 2)]
    S4 = S1[int((len(S1) + 3) / 2) - 1:]
    
if S1 == S2 and S3 == S4:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
zen = S[:int((N-1)/2)]
kou = S[int((N+3)/2)-1:]
if zen == ''.join(list(reversed(zen))) and kou == ''.join(list(reversed(kou))):
    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//2)//2)):
  print(s[i],s[((n//2)-1)-i])
  if((s[i] != s[((n//2)-1)-i]) and s[((n+3)/2) != s[-(i+1)]]):
    print("No")
    exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
s = input()

n = len(s)

firsthalf = s[:(n - 1)//2]
secondhalf = s[(n + 3)//2 - 1:]
#
# print(firsthalf)
# print(secondhalf)

revfirst = firsthalf[::-1]
revsecond = secondhalf[::-1]
revitself = s[::1]
#
# print(revfirst)
# print(revsecond)

if s == revitself and firsthalf == revfirst and secondhalf == revsecond:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

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

n = len(s)

ss = (n-1) // 2

first = s[:ss]
second = s[(ss+1):]



if(palindrome(first) and palindrome(second)):
    print("Yes")
else:
    print("No")