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 isKaibun(s, length):
    flag = True
    for i in range(round((length-1)/2)):
        if s[i] != s[length-1-i]:
            flag = False
            break
    return flag



orta = int((n+1)/2)-1

if isKaibun(s, n) and isKaibun(s[:orta], orta) and isKaibun(s[orta+1:], orta):
    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_]

a_len_round = round(a_len_/2)
a_round = a[0:a_len_round-1]
a_re_round_re = list(reversed(a_re_))
a_re_round_re_ = a_re_round_re[0:a_len_round-1]

a_round_ = a[0:a_len_round]
a_re_round_re__ = a_re_round_re[0:a_len_round]

if a_len_ % 2 == 0:
  print('No')
else:
  if a == a_re:
    if a_round == a_re_round_re_ and a_round_ == a_re_round_re__ :
      print('Yes')
    else:
      print('No')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:

s = list(input())
for i in range(len(s)//2):
    if s[i] != s[len(s)//2-1-i]:
        print("No")
        exit()
for i in range(len(s)//2):
    if s[-1-i] != s[len(s)//2+1+i]:
        print("No")
        exit()

print("Yes")

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 or len(s) <=3:
  print('No')
else:
  print('Yes')

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-1]
        S2 = s[n//2+1:]
        for i in range(n//2-1):
            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)
 
import math
M = math.floor((N-3)/2)
L = math.floor((N-3)/4)
 
a = 0
    
for i in range(M):
  if S[i] != S[N-i-1]:
    a = 1
    
if a == 0 and L % 2 == 0:
  p = math.floor((N-3)/8)
  for k in range(p-1):
    if S[k] != S[M-k-1]:
      a = 1
      
elif a == 0 and L % 2 == 1:
  p = math.floor(((N-3)/4-1)/2)
  for k in range(p-1):
    if S[k] != S[M-k-1]:
      a = 1
    
if a == 0:
  print('Yes')
  
else:
  print('No')

Submission status: Wrong Answer

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

    if S == "".join(S1):
        return "Yes"
    else:
        return "No"

print(palindrome("aka"))

Submission status: Wrong Answer

Solution code:
def isPalindrome(s):
  print(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)

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

if isPalindrome(left) and isPalindrome(right):
  if left==right:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
def is_parindrome(s: str) -> bool:
    return s == s[::-1]


s = input()
n = len(s)
first = s[0: (n - 1) // 2]
second = s[(n+3)//2-1:]
# print(first, second)

if is_parindrome(first) is True and is_parindrome(second) is True:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
string=input()
if(string==string[::-1]):
      print("Yes")
else:
      print("No")

Submission status: Wrong Answer

Solution code:
s = input()
s_len = len(s)
 
def judge(start=0, end=s_len):
  print(start, end)
  for i in range(start, end):
    print(s[i], s[end-1-i])
    if s[i] == s[end-1-i]:
      continue
    else:
      return 0
  return 1
 
if judge() and judge(end=(s_len-1)//2) and judge(start=(s_len+3)//2-1):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s = input()
m = len(s) // 2
l = s[:m]
r = s[len(s) + 3 // 2 - 1:]


def check(s):
    mid = len(s) // 2
    left = s[:mid]
    right = s[mid+1:]
    if left == right[::-1]:
        return True
    else:
        return False

if check(s) and check(r) and check(l):
    print("Yes")
else:
    print("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 = math.floor(count / 2)

ans = "Yes"

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

print(ans)

Submission status: Wrong Answer

Solution code:
str = input()
n = len(str)
str_list = list(str)

ans = 'Yes'
for i in range(0,n//2):
    if str_list[i] != str_list[n//2-i-1]:
        ans = 'No'

for j in range(n//2+1,n):
    if str_list[i] != str_list[-i-1]:
        ans = 'No'

print(ans)

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
forw = S[:int((N-1)/2)]


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


if forw == forw[::-1] and back == back[::-1]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

if((N-1)/2%2==1):
    while (i<((N-1)/2-1)/2):
        if( (S[i]==S[int((N-1)/2-i-1)]) & (S[i]==S[int((N-1)/2+1+i)]) & (S[i]==S[int(N-1-i)]) ):
            i+=1
        else:
            break;
    if(i==int((N-1)/2-1)/2):
        print('Yes')
    else:
        print('No')
    
else:
    while (i<=(N-1)/4):
        if( (S[i]==S[int((N-1)/2-i-1)]) & (S[i]==S[int((N-1)/2+1+i)]) & (S[i]==[int(N-1-i)]) ):
            i+=1
        else:
            break;
    if(i==(N-1)/4):
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
S = input()

def isKaibun(s):
    l = len(s)
    return s[:l//2] == s[-1:l//2:-1]

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

Submission status: Wrong Answer

Solution code:
def kaibun(s):
    N = len(s)

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

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

Submission status: Wrong Answer

Solution code:
def check(s: str, n: int):
    return s[:int((n-1)/2)] == s[int((n+1)/2):][::-1]


s = input()
n = len(s)

if check(s, n) and check(s[:int((n-1)/2)], (n-1)/2) and check(s[int((n+1)/2):], (n-1)/2):
    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)
exit()

Submission status: Wrong Answer

Solution code:
S = str(input())

N_half_S = len(S) // 2
half_S = S[0:N_half_S]
convS = half_S[::-1]

N_quoter_S = N_half_S // 2
quoter_S = half_S[0:N_quoter_S]
conv_quoter_S = quoter_S[::-1]

if half_S == convS and quoter_S == conv_quoter_S :
  print("Yes")
else :
  print("No")

Submission status: Wrong Answer

Solution code:
def kaibun(sl):
    for i in range(len(sl)):
        if sl[i] != sl[-1-i]:
            return 'No'
            break
        else:
            return 'Yes'


s = input()



sl = []
out = 'Yes'
slz = []
slk = []

for i in range(len(s)):
    sl.append(s[i])

for i in range((len(s)-1) // 2):
    slz.append(s[i])


for i in range((len(s)+1)//2,len(s)):
    slk.append(s[i])



    
    
out = kaibun(sl)
out = kaibun(slz)
out = kaibun(slk)
print(out)

Submission status: Wrong Answer

Solution code:

def ispalindrome(s):
    h = len(s)
    h = int(h/2)
    if (h % 2) == 0:
        for a, b in zip(s[:h], reversed(s[h:])):
            if a != b: return 0
    else:
        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)-1):]
        result &= ispalindrome(str_half)

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

Submission status: Wrong Answer

Solution code:
word = input()

n = len(word)

a = (n-1)//2
b = (n+3)//2
word2 = word[:a]
word3 = word[b-1:]

def kai1():
    for i in range(a):
        if(word[i] != word[-1*i]):
            return False
        else:
            return True
def kai2():
    wl = len(word2)
    if(wl % 2 == 0):
        wl = wl//2
    else:
        wl = (wl-1)//2
    for i in range(wl):
        if(word2[i] != word2[-1*(i+1)]):
            return False
    return True
def kai3():

    wl = len(word3)
    if(wl % 2 == 0):
        wl = wl//2
    else:
        wl = (wl-1)//2
    for i in range(wl):
        if(word3[i] != word3[(-1*(i+1))]):
            return False
    return True

if(kai1() and kai2() and kai3()):
    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] and 3 <= len(S) <= 99:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
S=input()
cnt=0

L=int((len(S)-1)/2)
#print(L)
if len(S)>5:
    for i in range(L):
        #print(S[i])
        #print(S[-(i+1)])
        if S[i]==S[-(i+1)]:
            cnt+=1
            
    if cnt==L:
        S=S[0:L]
        cnt=0
        #print(S)
        L=int((len(S)-1)/2)
        #print(L)
        for i in range(L):
            #print(S[i])
            #print(S[-(i+1)])
            if S[i]==S[-(i+1)]:
                cnt+=1
        #print(cnt)
        #print(L)
        if cnt==L:
            print('Yes')
        else:
            print('No')
            
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import collections
import itertools as it
import math
import numpy as np

S = input()
# A = int(input())
# A = map(int, input().split())
# A = list(map(int, input().split()))
# A = [int(input()) for i in range(N)]
#
# c = collections.Counter()

pivot = len(S)//2
S1 = S[:pivot]
S2 = S[pivot+1:][::-1]
if S1 != S2:
    print('No')
    exit()

N = len(S)
if N == 1:
    print('Yes')
    exit()
else:
    S_ = S1
    pivot = len(S_)//2
    S1_ = S_[:pivot]
    S2_ = S_[pivot+1:][::-1]
    if S1_ != S2_:
        print('No')
        exit()

N = len(S)
if N == 1:
    print('Yes')
    exit()
else:
    S_ = S2
    pivot = len(S_)//2
    S1_ = S_[:pivot]
    S2_ = S_[pivot+1:][::-1]
    if S1_ != S2_:
        print('No')
        exit()

print('Yes')

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 == zen[::-1] and kou == kou[::-1]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:

def main():
    s = input()
    if len(s) % 2  == 0:
        print("No")
        return
    N = int(len(s))
    # print(N)
    s1 = s[0:int((N-1)/2)]
    s2 = s[int((N+1)/2):N]

    # print(s1)
    # print(s2)

    i = 0
    j = int((N - 1) / 2) - 1
    # print(j)
    while True:
        if i > j:
            break
        if s1[i] != s1[j]:
            print("No")
            return
        i += 1
        j -= 1

    i = 0
    j = int((N - 1) / 2) - 1
    while True:
        if i > j:
            break
        if s2[i] != s2[j]:
            print("No")
            return
        i += 1
        j -= 1


    print("Yes")
    return


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:

s = list(input())
for i in range(len(s)//2):
    if s[i] != s[len(s)//2-1-i]:
        print("No")
        exit()
for i in range(len(s)//2):
    if s[-1-i] != s[len(s)//2+1+i]:
        print("NO")
        exit()

print("Yes")

Submission status: Wrong Answer

Solution code:
import math
a=input()
leng = len(a)
for i in range(int((leng-1)/2)):
    # print(i,leng-i-1,a[i],a[leng-i-1])
    if a[i] != a[leng-i-1]:
        print("No")
        exit(0)
for i in range(math.floor(((leng - 1) / 2 ) / 2)):
    # print(i, int(((leng - 1) / 2 ) ) -i-1 , a[i], a[int(((leng - 1) / 2 ) ) -i-1])
    if a[i] != a[int(((leng - 1) / 2 ) ) -i-1]:
        # print("No")
        exit(0)
hf = int((leng-1)/2) +1
for i in range(math.floor(((leng - 1) / 2 ) / 2)):
    # print(i + hf, int(((leng - 1) / 2 ) ) -i-1 + hf , a[i + hf], a[hf +int(((leng - 1) / 2 ) ) -i-1])
    if a[i] != a[int(((leng - 1) / 2 ) ) -i-1 + hf]:
        # print("No")
        exit(0)
print("Yes")

Submission status: Wrong Answer

Solution code:
x = input()
if x[::-1] == x:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s = str(input())

tmp_p = 0

tmp = ''
for i in range(len(s)//2):
    tmp += s[-(i+1)]
#print(tmp)
if tmp != s[0:len(s)//2]:
    tmp_p += 1

tmp_2 = s[0:(len(s)-1)//2]
tmp = ''
for i in range(len(tmp_2)//2):
    tmp += tmp_2[-(i+1)]
#print(tmp)
if tmp != tmp_2[0:len(tmp_2)//2]:
    tmp_p += 1


tmp_3 = s[(len(s)+3)//2:]
tmp = ''
if len(tmp_3) != 1:
    for i in range(len(tmp_3)//2):
        tmp += tmp_3[-(i+1)]
    #print(tmp)
    if tmp != tmp_3[len(tmp_3)//2:]:
        tmp_p += 1

if tmp_p != 0:
    print('No')
else:
    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 )) or (not check_str( s2 )) ):
    print( "No" )
  else:
    print( "Yes" )

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

#s1

Submission status: Wrong Answer

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

s = input()
n = len(s)

kai1 = int((n - 1) / 2)
kai2 = int((n + 3) / 2)

first = s[0:kai1]
second = s[kai2-1:n]

if palindrome(first) == 0:
    if palindrome(second) == 0:
        print('Yes')
        exit()

print('No')

Submission status: Wrong Answer

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

if((N-1)/2%2==1):
    while (i<((N-1)/2-1)/2):
        print(S[i],S[int((N-1)/2-i-1)],S[int((N-1)/2+1+i)],S[int(N-1-i)])
        if( (S[i]==S[int((N-1)/2-i-1)]) & (S[i]==S[int((N-1)/2+1+i)]) & (S[i]==S[int(N-1-i)]) ):
            i+=1
        else:
            break;
    if(i==int((N-1)/2-1)/2):
        print('Yes')
    else:
        print('No')
    
else:
    while (i<=(N-1)/4):
        print(S[i],S[int((N-1)/2-i-1)],S[int((N-1)/2+1+i)],S[int(N-1-i)])
        if( (S[i]==S[int((N-1)/2-i-1)]) & (S[i]==S[int((N-1)/2+1+i)]) & (S[i]==[int(N-1-i)]) ):
            i+=1
        else:
            break;
    if(i==(N-1)/4):
        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,n2):
    ni = n-i
    if s[i:i+1] != s[ni-1:ni]:
      return False
  return True

s = input('')
if check(s):
  # 1文字目～(N-1)/2文字目が回文か、判定 
  n2 = int((len(s)-1)/2)
  s2 = s[0:n2]
  if check(s2):
    # (N+3)/2 文字目までの回文判定
    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:
str = list(input())

def isKaibun(src):
  rev = src[:]
  rev.reverse()

  return src == rev


N = len(str)

if isKaibun(str[0:(N-1)//2]) and isKaibun(str[(N-1+3)//2:N]):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s = input()


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

def reverse(s): 
    return s[::-1]

def isPalindrome(s): 
    rev = reverse(s) 
  
    if (s == rev): 
        return True
    return False

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

Submission status: Wrong Answer

Solution code:
def reverse(s):
    return s[::-1]


def isPalindrome(s):
    # Calling reverse function
    rev = reverse(s)

    # Checking if both string are equal or not
    if (s == rev):
        return True
    return False


S = input()
if len(S)%2==1:
    if isPalindrome(S):
        a = S[0: int((len(S) - 1) / 2)]
        b = S[int((len(S)+3)/2-1): len(S)]
        if isPalindrome(a) and isPalindrome(S):
            print("YES")
        else:
            print("NO")
    else:
        print("NO")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
s = str(input())

num = int((len(s)-1) / 2)
num2 = int((len(s)+3) / 2)

f = s[:num]
b = s[num2-1:len(s)]

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

Submission status: Wrong Answer

Solution code:
S = str(input())
N = len(S)
flag1 = 0
flag2 = 0
flag3 = 0
for i in range(N//2):
    if(S[i]!=S[-i-1]):
        break
        flag1 = 0
    else:
        flag1 = 1
S1 = S[0:(N-1)//2]

for i in range(len(S1)):
    if(S1[i]!=S1[-i-1]):
        break
        flag2 = 0
    else:
        flag2 = 1

S2 = S[(N+2)//2:]
for i in range(len(S2)):
    if(S2[i]!=S2[-i-1]):
        break
        flag3 = 0
    else:
        flag3 = 1
if flag1 == 1 and flag2 == 1 and flag3 == 1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
count = 0
halfn = int((n-1) / 2)
whalfn = int((n-1) / 4)
half = s[0:halfn]

for i in range(len(s)):
    if s[i] != s[-i-1]:
      count += 1
      break
    else:
      pass



if count == 0:
  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+3)/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")
        #print(a[i],a[N2-i])
        #print(a[N3+i],a[N-1-i])
        sys.exit()
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:
# -*- coding: utf-8 -*-
"""
Created on Sun Mar 22 21:21:55 2020

@author: azikausy
"""


S = list(input())
N = len(S)
forw = S[:int((N-1)/2)]


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

if forw == forw[::-1] and back == back[::-1]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S=input()
length=len(S)
S_2=S[0:(length-1)//2]
#print(S_2)
S_3=S[(length+3)//2-1:length]
#print(S_3)

#flagが0なら回文である
flag=0


def kaibun(strings):
    for i in range(len(strings)):
        if strings[i]!=strings[len(strings)-1]:
            return 1
        else:
            return 0
#kaibun(S)
#kaibun(S_2)
#kaibun(S_3)

if kaibun(S)==kaibun(S_2)==kaibun(S_3)==0:
    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:

s = input()
n = len(s)
s2 = s[:(n-1)//2]
s3 = s[(n+3)//2-1:]
n2 = len(s2)
n3 = len(s3)
f = True

print(s2)
print(s3)

for i in range(n//2):
#    print(s[i])
#    print(s[n-(i+1)])
    if s[i] != s[n-(i+1)]:
        f = False
        break

for i in range(n2//2):
#    print(s[i])
#    print(s[n-(i+1)])
    if s2[i] != s2[n2-(i+1)]:
        f = False
        break

for i in range(n3//2):
#    print(s[i])
#    print(s[n-(i+1)])
    if s3[i] != s3[n3-(i+1)]:
        f = False
        break




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

Submission status: Wrong Answer

Solution code:
def main():
  s = input()
  temp = s[:len(s)//2]
  if not temp == s[len(s)//2+1:]:
    return 'No'
  if not temp[:len(temp)//2] == temp[len(temp)//2+1:]:
  	return 'No'
  temp = s[len(s)+3//2:]
  if not temp[:len(temp)//2] == temp[len(temp)//2+1:]:
  	return 'No'
  
  return 'Yes'

print(main())

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
j1 = S[:int((N-1)/2)] == S[int((N-1)/2+1):]

j2_str = S[0:int((N-1)/2)]
l2 = len(j2_str)
j2 = j2_str[:int((l2-1)/2)] == j2_str[int((l2-1)/2+1):]

j3_str = S[int((N+3)/2-1):]
l3 = len(j3_str)
j3 = j3_str[:int((l3-1)/2)] == j3_str[int((l3-1)/2+1):]

if N<7:
    ans='No'
elif j1&j2&j3:
    ans = 'Yes'
else :
    ans = 'No'
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()


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


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

Submission status: Wrong Answer

Solution code:

def main():
    s = input()
    if len(s) % 2  == 0:
        print("No")
        return
    N = int(len(s))
    # print(N)
    s1 = s[0:int((N-1)/2)]
    s2 = s[int((N+1)/2):N]

    # print(s1)
    # print(s2)

    i = 0
    j = int((N - 1) / 2) - 1
    # print(j)
    while True:
        if i > j:
            break
        if s1[i] != s1[j]:
            print("No")
            return
        i += 1
        j -= 1

    i = 0
    j = int((N - 1) / 2) - 1
    while True:
        if i > j:
            break
        if s2[i] != s2[j]:
            # print("No")
            return
        i += 1
        j -= 1


    print("Yes")
    return


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
s = list(str(input()))
n = len(s)
N = int((n-1)/2)
M = int((n+3)/2)
l = []
m = []
for i in range(N):
    l.append(s[i])
for i in range (M-1,N):
    m.append(s[i])
a = ''.join(l)
b = ''.join(m)
l.reverse()
m.reverse()
A = ''.join(l)
B = ''.join(m)
if (a==A and b==B):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
raw_input = input()
S_list = list(raw_input)
N = len(S_list)

def judge_par(s_list,n):
    n_half = (n-1) // 2
    s_top = s_list[:n_half]
    s_bottom = s_list[(n_half+1):]
    s_bottom.reverse()
    if s_top == s_bottom:
        return True
    else:
        return False
    
if judge_par(S_list,N) == True:
    N_half = (N-1) // 2
    S_top = S_list[:N_half]
    S_bottom = S_list[(N_half+1):]
    if judge_par(S_top,N_half) == True and judge_par(S_bottom,N_half) == True:
        print ("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def check(s: str, n: int):
    return s[:int((n-1)/2)] == s[int((n+1)/2):][::-1]


s = input()
n = len(s)

print(check(s, n))
print(check(s[:int((n-1)/2)], (n-1)/2))
print(check(s[int((n+1)/2):], (n-1)/2))
if check(s, n) and check(s[:int((n-1)/2)], (n-1)/2) and check(s[int((n+1)/2):], (n-1)/2):
    print("Yes")
else:
    print("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 = math.floor(count / 2)

ans = "Yes"

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

print(ans)

Submission status: Wrong Answer

Solution code:
word = list(input())
front = word[0:int((len(word)-1)/2)] 
new_front = list(reversed(front))
rear = word[int(((len(word)-1)/2)+1):]
new_rear = list(reversed(rear))
ans = 0
if front == new_front:
  ans += 1
if rear == new_rear:
  ans += 1
  
if ans == 2:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

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

if con_1 == con_1[::-1] and con_2 == con_2[::-1]: 
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = input()

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

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:
s=input()
n=len(s)
end_1=(n-1)//2
s_1=s[0:end_1]
end_2 = (n+3)//2
s_2=s[end_2-1::]

if s_1 == s_1[::-1] and s_2 == s_2[::-1]:
	print('Yes')
else:
	print('No')

Submission status: Wrong Answer

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


back = S[int((N+3)/2)-1:]
print(forw, back)

if forw == forw[::-1] and back == back[::-1]:
    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 and ( 3 <= l <= 99 ):
        res = 'Yes'
    else:
        res = 'No'
    return res


print(main(S))

Submission status: Wrong Answer

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