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

#initialize
IsKaibun = 'NO'

N = len(S)

def check_kaibun( mojiretu ):
    names = len(mojiretu)
    IsKaibunLocal = 'YES'
    for name in range((names + 1) // 2):
        if mojiretu[name] != mojiretu[names - 1 - name]:
            IsKaibunLocal = 'NO'

    return IsKaibunLocal

#pre check
if N%2 != 1 and N < 3 and N >  99 :
    PRE_CHECK = 1

#1st check
IsKaibun = check_kaibun(S)

#2nd check
if IsKaibun == 'YES':
    IsKaibun =  check_kaibun(S[ 0 : int((N-1)/2) ])

#3rd check
if IsKaibun == 'YES':
    IsKaibun = check_kaibun(S[ int((N+3)/2 - 1) : N ])

#output
print(IsKaibun)

Submission status: Wrong Answer

Solution code:
S = input()

#initialize
IsKaibun = 0

N = len(S)

def check_kaibun( mojiretu ):
    names = len(mojiretu)
    for name in range((names + 1) // 2):
        if mojiretu[name] != mojiretu[names - 1 - name]:
            IsKaibun = 0
            break
    IsKaibun = 1
    return IsKaibun

#pre check
if N%2 != 1 and N < 3 and N >  99 :
    PRE_CHECK = 1

#1st check
check_kaibun(S)
#print(IsKaibun)

#2nd check
#print(S[ 0 : int((N-1)/2) ])
check_kaibun(S[ 0 : int((N-1)/2) ])
#print(IsKaibun)

#3rd check
check_kaibun(S[ int((N+3)/2) : N ])

#output
print(IsKaibun)

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
def is_pali(s):
    for ind, i in enumerate(s[:len(s)//2]):
        if(i==s[-ind-1]):
            continue
        else:
            return False
    return True

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

Submission status: Wrong Answer

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

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

c=1
for i in range(len(s1)-1):
  if s1[i]!=s1[-1-i]:
    c=0
for i in range(len(s2)-1):
  if s2[i]!=s2[-1-i]:
    c=0

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

Submission status: Wrong Answer

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

s1=s[:s_l//2]
s2=s[s_l//2+1:]

c=1
for i in range(len(s1)-1):
  if s1[i]!=s1[-1-i]:
    c=0
for i in range(len(s2)-1):
  if s2[i]!=s2[-1-i]:
    c=0

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#  B.py
#  
#  Copyright 2020 BHASKAR <>
#  
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#  
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#  
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
#  MA 02110-1301, USA.
#  
#  


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

Submission status: Wrong Answer

Solution code:
s=list(input())
half_s=int((len(s)-1)/2)
def kaibun_hantei(p):
  half_l=int((len(p)-1)/2)
  if p[:half_l]==p[(half_l+1):][::-1]:
    if len(p)%2==1:
      return 100
    

if kaibun_hantei(s)==100:
  if kaibun_hantei(s[:half_s])==100:
    if kaibun_hantei(s[(half_s+1):])==100:
      print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s=list(input())
half_s=int((len(s)-1)/2)
def kaibun_hantei(p):
  half_l=int((len(p)-1)/2)
  if p[:half_l]==p[(half_l+1):][::-1]:
    if len(p)%2==1:
      return 100
    

if kaibun_hantei(s)==100:
  if kaibun_hantei(s[:half_s])==100:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s=list(input())
half_s=int((len(s)-1)/2)
def kaibun_hantei(p):
  half_l=int((len(p)-1)/2)
  if p[:half_l]==p[(half_l+1):][::-1]:
    return 100

if kaibun_hantei(s)==100:
  if kaibun_hantei(s[:half_s])==100:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s1 = input()
l1 = len(s1)
l2 = (l1 + 1) / 2
l2 = int(l2)
s2 = s1[0:l2-1]
s3 = s1[l2 + 2:]


def kaibun(b):
    for i in range(len(b)):
        k = -1 * (i+1)
        if b[i] == b[k]:
            continue
        else:
            print("No")
            exit()


kaibun(s1)
kaibun(s2)
kaibun(s3)
print("Yes")

Submission status: Wrong Answer

Solution code:
s=input()
n=len(s)
def pal(x):
    for i in range(len(x)//2):
        if x[i]!=x[-1-i]:
            return False
    return True
if pal(s[:n//2]) and pal(s[n//2+1:]):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
def Palindrome(S):
    if int(len(S)/2)==int((len(S)+1)/2):
        return "No"
    if len(S)==1:
        return "Yes"
    for i in range(int(len(S)/2)):
        if S[i]==S[len(S)-i-1]:
            YorN="Yes"
        else:
            YorN="No"
            break
    return YorN
S = input()
Sl = list(S)
left = right = "No"
if Palindrome(Sl) == "Yes":
    middle=int(len(Sl)/2)
    left  = Palindrome(Sl[:middle])
    right = Palindrome(Sl[middle+1:])
if left == "Yes" and right == "Yes":
    YorN = "Yes"
else:
    YorN = "No"
print(YorN)

Submission status: Wrong Answer

Solution code:
def is_palindrome(s):
    l = len(s)
    return l % 2 == 1 and s[:l // 2] == s[l // 2 + 1:][::-1]


S = input()
L = len(S)

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

Submission status: Wrong Answer

Solution code:

S = input()
N = len(S)



a = S[0:(N-1)//2-1]
b = S[0:(N-1)//2-1:-1]

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

e = S[:N-1]
f = S[:N-1:-1]

if a == b and c ==d and e == f:
  print('Yes')
  
else:
  print('No')

Submission status: Wrong Answer

Solution code:
S=input()
L=(len(S)-1)//2
T=S[:L]
U=S[L+1:]
M=(len(T)-1)//2
N=(len(U)-1)//2
V=T[:M]
W=T[M+1:]
X=U[:N]
Y=U[N+1:]
if T==U and V==W and X==Y:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
ch = list(S)
num = len(S)
n1 = int((num-1)/2)
result = str("Yes")
i = int(0)
j = int(0)
while i < n1:
    if ch[i] == ch[n1-1-i]:
        i = i+1
    else:
        result = str("No")
        break
if result == "Yes":
    while j < n1:
        if ch[num - n1+j] == ch[num - j-1]:
            j = j+1
        else:
            result = str("No")
            break
print(result)

Submission status: Wrong Answer

Solution code:
print("input")
S = input()
ch = list(S)
num = len(S)
n1 = int((num-1)/2)
result = str("Yes")
i = int(0)
j = int(0)
while i < n1:
    if ch[i] == ch[n1-1-i]:
        i = i+1
    else:
        result = str("No")
        break
if result == "Yes":
    while j < n1:
        if ch[num - n1+j] == ch[num - j-1]:
            j = j+1
        else:
            result = str("No")
            break
print(result)

Submission status: Wrong Answer

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

if s1 == "".join(list(reversed(s1))) and s2 == "".join(list(reversed(s2))):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!

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

S = input()
mid = (len(S)-1)//2

if check(S[:mid]) and check(S[mid+1:]):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
input_str = input()

length = len(input_str)
first_check = int((length - 1) / 2)
second_check = int((length + 3) / 2)

def check_kaibun(s):
    ll = len(s)
    before = s[:int((ll - 1)/2)]
    after = s[int((ll + 3)/2) - 1:]
    after = after[::-1]
    if before == after:
        return True
    else:
        return False

if check_kaibun(input_str) and check_kaibun(input_str[:first_check]) and check_kaibun(input_str[second_check-1:]):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
input_str = input()

length = len(input_str)
first_check = int((length - 1) / 2)
second_check = int((length + 3) / 2)

def check_kaibun(s):
    ll = len(s)
    before = s[:int((ll - 1)/2)]
    after = s[int((ll + 3)/2) - 1:]
    if before == after:
        return True
    else:
        return False

if check_kaibun(input_str) and check_kaibun(input_str[:first_check]) and check_kaibun(input_str[second_check-1:]):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def kaibun(mojiretu):
    leg = len(mojiretu)
    if leg == 1:
        return True
    mid = (leg-1) // 2
    if len(mojiretu) % 2 == 0:
        return mojiretu[0:mid+1] == mojiretu[mid+1:]
    else:
        return mojiretu[0:mid] == mojiretu[mid+1:]

def fin():
    print('No')
    quit()

input_line = input()
if not kaibun(input_line):
    fin()

N = len(input_line)

if not kaibun(input_line[0:(N-1)//2]):
    fin()


print('Yes')

Submission status: Wrong Answer

Solution code:
def kaibun(mojiretu):
    leg = len(mojiretu)
    if leg == 1:
        return True
    mid = (leg-1) // 2
    if mojiretu[0:mid] != mojiretu[mid+1:]:
        return False
    return True

def fin():
    print('No')
    quit()

input_line = input()
if not kaibun(input_line):
    fin()

N = len(input_line)

if not kaibun(input_line[0:(N-1)//2]):
    fin()


print('Yes')

Submission status: Wrong Answer

Solution code:
def kaibun(mojiretu):
    leg = len(mojiretu)
    if leg == 1:
        return True
    mid = (leg-1) // 2
    if mojiretu[0:mid] != mojiretu[mid+1:]:
        return False
    return True

def fin():
    print('No')
    quit()

input_line = input()
if not kaibun(input_line):
    print('f')
    fin()

N = len(input_line)

if not kaibun(input_line[0:(N-1)//2]):
    print('S')
    fin()


print('Yes')

Submission status: Wrong Answer

Solution code:
def kaibun(mojiretu):
    leg = len(mojiretu)
    if leg == 1:
        return True
    mid = (leg-1) // 2
    for i in range(mid):
        if mojiretu[i] != mojiretu[(mid+1)+i]:
            return False
    return True

def fin():
    print('No')
    quit()

input_line = input()
if not kaibun(input_line):
    fin()

N = len(input_line)

if not kaibun(input_line[0:(N-1)//2]):
    fin()
if not kaibun(input_line[(N+1)//2:]):
    fin()

print('Yes')

Submission status: Wrong Answer

Solution code:
def kaibun(mojiretu):
    leg = len(mojiretu)
    if leg == 1:
        return True
    mid = int((leg-1) /2)
    for i in range(mid):
        if mojiretu[i] != mojiretu[(mid+1)+i]:
            return False
    return True

def fin():
    print('No')
    quit()

input_line = input()
if not kaibun(input_line):
    fin()

N = len(input_line)

if not kaibun(input_line[0:int((N-1)/2)]):
    fin()
if not kaibun(input_line[int((N+3)/2):]):
    fin()

print('Yes')

Submission status: Wrong Answer

Solution code:
import sys
def kaibun(mojiretu):
    leg = len(mojiretu)
    if leg == 1:
        return True
    mid = int((leg-1) /2)
    for i in range(mid):
        if mojiretu[i] != mojiretu[(mid+1)+i]:
            return False
    return True

input_line = input()
if not kaibun(input_line):
    print('No')
    sys.exit()

N = len(input_line)
if not kaibun(input_line[0:int((N-1)/2+1)]):
    print('No')
    sys.exit

if not kaibun(input_line[int((N+3)/2+1):]):
    print('No')
    sys.exit

print('Yes')

Submission status: Wrong Answer

Solution code:
def kaibun(mojiretu):
    leg = len(mojiretu)
    if leg == 1:
        return True
    mid = int((leg-1) /2)
    for i in range(mid):
        if mojiretu[i] != mojiretu[(mid+1)+i]:
            return False
    return True

input_line = input()
if not kaibun(input_line):
    print('No')
    quit()

N = len(input_line)
if not kaibun(input_line[0:int((N-1)/2+1)]):
    print('No')
    quit()

if not kaibun(input_line[int((N+3)/2+1):]):
    print('No')
    quit()

print('Yes')

Submission status: Wrong Answer

Solution code:
def kaibun(mojiretu):
    leg = len(mojiretu)
    mid = int((leg-1) /2)
    for i in range(mid):
        if mojiretu[i] != mojiretu[(mid+1)+i]:
            return False
    return True

input_line = input()
if not kaibun(input_line):
    print('No')
    quit()

N = len(input_line)
if not kaibun(input_line[0:int((N-1)/2+1)]):
    print('No')
    quit()

if not kaibun(input_line[int((N+3)/2+1):]):
    print('No')
    quit()

print('Yes')

Submission status: Wrong Answer

Solution code:
def kaibun(mojiretu):
    leg = len(mojiretu)
    mid = int((leg-1) /2)
    for i in range(mid):
        if mojiretu[i] != mojiretu[(mid+1)+i]:
            return False
    return True

input_line = input()
if not kaibun(input_line):
    print('No')
    quit()

mid = int((len(input_line)-1) /2)
if not kaibun(input_line[0:mid]):
    print('No')
    quit()

if not kaibun(input_line[mid+1:]):
    print('No')
    quit()

print('Yes')

Submission status: Wrong Answer

Solution code:
s = list(input())
n = len(s)
a = int((n-1)/2)
b = int(n/4+1)

if s[:a] == s[:a:-1]:
  if s[:b] == s[b+1:a-b-1:-1]:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s = input()
ps1 = s[:len(s)//2]
ps2 = s[(len(s)+2)//2:]

if s == reversed(s) and ps1 == reversed(ps1) and ps2 == reversed(ps2):
    print("Yes")
else :
    print("No")

Submission status: Wrong Answer

Solution code:
def is_palindrome(n_str):
    return True if n_str == n_str[::-1] else False

def is_strong_palindrome(n_str):
    length = len(n_str)
    flag = False
    if is_palindrome(n_str):
        flag = True
    if is_palindrome(n_str[:(length-1)//2]) and is_palindrome(n_str[(length+3)//2-1:]):
        flag = True
    else:
        flag = False
    return flag

s = input()
if is_strong_palindrome(s):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
def is_palindrome(n_str):
    return True if n_str == n_str[::-1] else False

def is_strong_palindrome(n_str):
    length = len(n_str)
    if (is_palindrome(n_str) and is_palindrome(n_str[:(length-1)//2]) and is_palindrome(n_str[(length+3)//2-1:])):
        return 'Yes'
    else:
        return 'No'
    
s = input()
is_strong_palindrome(s)

Submission status: Wrong Answer

Solution code:
def is_palindrome(n_str):
    return True if n_str == n_str[::-1] else False

def is_strong_palindrome(n_str):
    length = len(n_str)
    if is_palindrome(n_str) and is_palindrome(n_str[:(length-1)//2]) and is_palindrome(n_str[(length+3)//2-1:]):
        return 'Yes'
    else:
        return 'No'
    
s = input()
is_strong_palindrome(s)

Submission status: Wrong Answer

Solution code:
def is_palindrome(n_str):
    return True if n_str == n_str[::-1] else False

def is_strong_palindrome(n_str):
    length = len(n_str)
    if is_palindrome(n_str) and is_palindrome(n_str[:(length-1)//2]) and is_palindrome(n_str[(length+3)//2-1:]):
        return 'Yes'
    else:
        return 'No'
    
s = input()

Submission status: Wrong Answer

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

str = input()
is_palindrome = palindrome(str)
n = len(str)
if n % 2 == 1:
  is_palindrome = palindrome(str[:(n - 1)// 2]) and palindrome(str[(n + 1) // 2:])

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

Submission status: Wrong Answer

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

str = input()
is_palindrome = palindrome(str)
n = len(str)
if n % 2 == 1:
  is_palindrome = palindrome(str[:(n - 1) // 2]) and palindrome(str[(n + 3) // 2:])

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

Submission status: Wrong Answer

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

str = input()
is_palindrome = palindrome(str)
n = len(str)
if n % 2 == 1:
  is_palindrome = palindrome(str[:n // 2]) and palindrome(str[n // 2 + 1:])

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

Submission status: Wrong Answer

Solution code:
def isPalindrome(s):
  return s == s[::-1]
 
s = input()
n = len(s)
res =  isPalindrome(s) and isPalindrome(s[:n//2+1]) and isPalindrome(s[n//2+2:])
print("Yes" if res else "No")

Submission status: Wrong Answer

Solution code:
def isPalindrome(s):
  return s == s[::-1]
 
s = input()
n = len(s)
res =  isPalindrome(s) and isPalindrome(s[:n//2+1]) and isPalindrome(s[n//2+2:])
print(res)

Submission status: Wrong Answer

Solution code:

S = input()
N = int(len(S))
M = N % 2

def kaibun(s,n):
    for i in range(n%2):
        if s[i] != s[-1-i]:
            print("No")
            exit()
    

S1 = []*M
S2 = []*M
S1 = S[0:M]
S2 = S[M+1:N]
kaibun(S,N)
kaibun(S1,M)
kaibun(S2,M)
print("Yes")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
count = 0
ans = True
while count <= n and ans == True:
  for i in range(1,n+1):
    if s[i-1]!=s[-i]:
      ans = False
    
  for i in range(1,int((n-1)/2)+1):
    if s[i-1]!=s[-i]:
      ans = False
      
  count += 1
 
if ans:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)
mod = 1000000007


def solve():
    s = S()
    n = len(s)
    s1 = s[:(n-1)//2]
    s2 = s[((n+3)//2)-1:][::-1]
    if len(s1) % 2 == 0:
        s11 = s1[:len(s1)//2]
    else:
        s11 = s1[:(len(s1)-1)//2]
    s12 = s1[((len(s1)+3)//2)-1:][::-1]
    print(s1, s2, s11, s12)
    if s1 == s2 and s11 == s12:
        print('Yes')
    else:
        print('No')
    return


# Solve
if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

Solution code:
#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)
mod = 1000000007


def solve():
    s = S()
    n = len(s)
    s1 = s[:(n-1)//2]
    s2 = s[((n+3)//2)-1:][::-1]
    s11 = s1[:(len(s1)-1)//2]
    s12 = s1[((len(s1)+3)//2)-1:][::-1]
    if s1 == s2 and s11 == s12:
        print('Yes')
    else:
        print('No')
    return


# Solve
if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

Solution code:
#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)
mod = 1000000007


def solve():
    s = S()
    n = len(s)
    s1 = s[:(n-1)//2]
    s2 = s[((n+3)//2)-1:][::-1]
    s11 = s1[:(len(s1)-1)//2]
    s12 = s1[((len(s1)+3)//2)-1:][::-1]
    print(s1, s2, s11, s12)
    if s1 == s2 and s11 == s12:
        print('Yes')
    else:
        print('No')
    return


# Solve
if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

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

if s1 == s1[::-1] and s2 == s2[::-1]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)
mod = 1000000007


def solve():
    s = S()
    n = len(s)
    s1 = s[:(n-1)//2]
    s2 = s[((n+3)//2)-1:][::-1]
    if s1 == s2 and set(s1[:(len(s1)-1)//2]) == set(s1[((len(s1)+3)//2)-1:]):
        print('Yes')
    else:
        print('No')
    return


# Solve
if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

Solution code:
#B
S = input()
Slist = list(S)
ans = 'Yes'
for k in range (int(len(Slist) / 2)):
    if Slist[k] != Slist[len(Slist) - k - 1]:
        ans = 'No'
N = len(Slist)
if ans == 'Yes':
    for k in range (int((N)/4)):
        if Slist[k] != Slist[int((N-1)/2) - k - 1]:
            ans = 'No'
if ans == 'Yes':
    for k in range (int((N)/4)):
        if Slist[N-k-1] != Slist[int((N+3)/2) - k - 1]:
            ans ='No'
print(ans)

Submission status: Wrong Answer

Solution code:
#B
S = input()
Slist = list(S)
ans = 'Yes'
for k in range (int(len(Slist) / 2)):
    if Slist[k] != Slist[len(Slist) - k - 1]:
        ans = 'No'
N = len(Slist)
if ans == 'Yes':
    for k in range (int((N-1)/4)):
        if Slist[k] != Slist[int((N-1)/2) - k - 1]:
            ans = 'No'
if ans == 'Yes':
    for k in range (int((N)/4)):
        if Slist[N-k-1] != Slist[int((N+3)/2) - k - 1]:
            ans ='No'
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = list(map(str, input()))
N = len(S)

N1 = int((N - 1) / 2)
#一つ目の条件
s1 = S[:N1]
s1_dash = s1[::-1]
#二つ目の条件
N2 = int((N + 3) / 2) - 1
s2 = S[N2:]
s2_dash = s2[::-1]
if s1 == s1_dash:
  if s2 == s2_dash:
    ans = "Yes"
  else:
    ans = "No"
else:
  ans = "No"
print(ans)

Submission status: Wrong Answer

Solution code:
S = list(map(str, input()))
N = len(S)

def main():
  N1 = int((N - 1) / 2)
  #一つ目の条件
  s1 = S[:N1]
  s1_dash = s1[::-1]
  #二つ目の条件
  N2 = int((N + 3) / 2) - 1
  s2 = S[N2:]
  s2_dash = s2[::-1]
  if s1 == s1_dash:
    if s2 == s2_dash:
      ans = "Yes"
    else:
      ans = "No"
  else:
    ans = "No"
  print(ans)
  

if __name__ == '__main__':
	main()

Submission status: Wrong Answer

Solution code:
def judge(s):
    inv_str = s[::-1]
    # print(inv_str)
    if(s == inv_str):
        return 0
    else:
        return 1

x = str(input())
len = len(x)
x1 = x[:int((len-1)/2)]
x2 = x[int((len+3)/2-1):]

if(judge(x1)==0 and judge(x2)==0 and judge(x)):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def judge(s):
    inv_str = s[::-1]
    # print(inv_str)
    if(s == inv_str):
        return 0
    else:
        return 1

x = str(input())
len = len(x)
x1 = x[:int((len-1)/2)]
x2 = x[int((len+3)/2-1):]

if(judge(x1)==0 and judge(x2)==0):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def judge(s):
    inv_str = s[::-1]
    print(inv_str)
    if(s == inv_str):
        return 0
    else:
        return 1

x = str(input())
len = len(x)
x1 = x[:int((len-1)/2)]
x2 = x[int((len+3)/2-1):]

if(judge(x1)==0 and judge(x2)==0):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
flag = True
for i in range((len(S) - 1) // 2 //2):
    if S[i] != S[(len(S) - 1) // 2 -1 - i]:
        flag = False

for i in range((len(S) - (len(S) + 3 // 2)) // 2):
    if S[(len(S) + 3) // 2 -1 + i] != S[len(S) - 1 - i]:
        flag = False
        
if flag:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = str(input())
N = len(S)
L = []
for i in range(int((N-1)/2)):
    if S[i] == S[int((N-3)/2)-i] and S[int((N+1)/2)+i] == S[N-i-1]:
        L.append('Yes')
    else:
        L.append('No')
if all(x=='Yes' for x in L):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
T = list(S)
M = (N-1)/2
i = 0
j = int(M)

if j%2 == 1:
    while i > j:
        if T[i] != T[j-1]:
            j = -1
            break
        i += 1
        j -= 1
else :
    while i == j:
        if T[i] != T[j]:
            j = -1
            break
        i += 1
        j -= 1
        
P = int((N+3)/2)
i = 0
while P < N:
    if T[i] != T[P-1]:
        j = -1
        break
    i += 1
    P += 1

if j != -1:
    print('Yes')
else :
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
T = list(S)
M = ((N-1)/2)-1
i = 0
j = int(M)

if (j+1)%2 == 1:
    while i == j:
        if T[i] != T[j]:
            j = -1
            break
        i += 1
        j -= 1
else :
    while i+1 == j:
        if T[i] != T[j]:
            j = -1
            break
        i += 1
        j -= 1
        
P = int((N+3)/2)-1
i = 0
while P < N:
    if T[i] != T[P]:
        j = -1
        break
    i += 1
    P += 1

if j != -1:
    print('Yes')
else :
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
T = list(S)
M = ((N-1)/2)-1
i = 0
j = int(M)

if N < 3:
    j = -1
elif N > 99:
    j = -1
elif N%2 == 0:
    j = -1

while i == j:
    if T[i] != T[j]:
        j = -1
        break
    i += 1
    j -= 1
    
P = int((N+3)/2)-1
i = 0
while P < N:
    if T[i] != T[P]:
        j = -1
        break
    i += 1
    P += 1

if j != -1:
    print('Yes')
else :
    print('No')