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 ispalindrome(s):
    h = len(s) // 2
    for a, b in zip(s[:h], reversed(s[h+1:])):
        if a != b: return 0
    return True

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

if ispalindrome(S) and ispalindrome(S1) and ispalindrome(S2):
    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)

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

ans = 0


for i in range(h_1):
    if s_1[i] != s_1[h_1-i-1]:
       ans -= 10000000000
       break
    else:
        ans += 1
        continue
        
for i in range(h_2):
    if s_2[i] != s_2[h_2-i-1]:
       ans -= 10000000000
       break
    else:
        ans += 1
        continue



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

Submission status: Wrong Answer

Solution code:
S = input()

def isStrong(S, j):
    if j<=1:
        return True
    elif j%2==1:
        mid = (j - 1)//2
#         print("up",S[i:mid],S[mid+1:j][::-1])
        if S[:mid] != S[mid+1:j][::-1]:
            return False
    else:
        mid = j//2
#         print("down",S[i:mid+1],S[mid+1:j][::-1])
        if S[:mid] != S[mid:j][::-1]:
            return False
    
    return isStrong(S, mid)
 
if isStrong(S, len(S)):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

for i in range((N+1)//4-1):
    if S[i] != S[(N+1)//2-2-i]:
        flag = False
        break

for i in range((N+3)//2, (N+5)//4-1):
    if S[i] != S[-2-i]:
        flag = False
        break

if flag == True:
    print('Yes')
elif flag == False:
    print('No')

Submission status: Wrong Answer

Solution code:
s = str(input())
s_l = []
for i in range(len(s)):
    s_l.append(s[i])

n = len(s) - 1

m = n // 2 - 1

Tsuyoi = True
i = 0

while i <= m // 2:
    if s_l[i] != s_l[m - i]:
        Tsuyoi = False
        break
    if s_l[m + i + 2] != s_l[n - i]:
        Tsuyoi = False
        break
    if s_l[i] != s_l[n-i]:
        tsuyoi = False
        break
    i += 1

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

Submission status: Wrong Answer

Solution code:
S = input()

def Pal(S_):
    if len(S_) == 1:
        return True
    else:
        S_len = (len(S_) - 1) // 2
        S_left = S_[:S_len]
        S_right = S_[S_len + 1:]
        S_right = S_right[::-1]
        if S_left == S_right:
            return True
        else:
            return False

if len(S) % 2 == 1:
    if Pal(S):
        S_l = S[:(len(S) - 1)//2]
        S_r = S[(len(S) + 3)//2 + 1:]
        if Pal(S_l) and Pal(S_r):
            print('Yes')
        else:
            print('No')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
##1つ目の条件
n1 = int((n-1)/2)
s1 = s[0:n1]
s_rev = s1[::-1]
##2つめの条件
n2 = int((n+3)/2)
s2 = s[n2-1:n]
s2_rev = s2[::-1]
##判定
if s1 == s_rev and s2 == s2_rev:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
import math

s = input()
list = list(s)


num = math.floor(len(s)/2)
count = 0


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


else:
    for i in range(num):
        if list[i] == list[len(s) - 1 - i]:
            count += 1
        else:
            print("No")
            break

if len(s) == 3:
    None
else:
    if count == num:
        print("Yes")
    else:
        None

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3

import sys

sys.setrecursionlimit(10 ** 6)


def main():
	s = sys.stdin.readline().rstrip()
	n = len(s)
	front = s[:(n-1)//2]
	end = s[(n+3)//2-1:]
	if len(front) % 2 == 0:
		ff = front[:len(front)//2]
		fe = front[len(front)//2:]
	else:
		ff = front[:len(front)//2]
		fe = front[len(front)//2+1:]
	if len(front) % 2 == 0:
		ef = end[:len(end)//2]
		ee = end[len(end)//2:]
	else:
		ef = end[:len(end)//2]
		ee = end[len(end)//2+1:]
	if ff == fe and ef == ee:
		print("Yes")
	else:
		print("No")

main()

Submission status: Wrong Answer

Solution code:
from sys import stdin
input = stdin.readline
s = input()
n = len(s)
flag=True
end = (n-1)//2
temp = s[:end]
start = (n+3)//2
temp2 = s[start-1:n]
#print(s[::-1],"--",s)
if s[::-1] != s:
  #print(s[::-1],"--",s)
  flag=False

#print(temp[::-1],"--",temp)
elif temp[::-1] !=temp:
  #print(temp[::-1],"--",temp)
  flag=False

#print(temp2[::-1],"--",temp2)
elif temp2[::-1]!=temp2:
  #print(temp2[::-1],"--",temp2)
  flag=False
  
  
if flag==True:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
# This file is a "Hello, world!" in Python language by CPython for wandbox.
import sys

s = input()
if s != s[::-1]:
    print("No")
    sys.exit()
index = (int)(len(s) - 1) // 2
s1 = s[0:index]
if s1 != s1[::-1]:
    print("No1")
    sys.exit()
index1 = (len(s)+3) // 2
s2 = s[index1:-1]
if s2 != s2[::-1]:
    print("No2")
    sys.exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
def is_kaibunn(str): return 1 if str == str[::-1] else 0
word_front = input()
flag = 0
num = len(word_front)
word_back = word_front
while num > 1:
    if is_kaibunn(word_front) and is_kaibunn(word_back):
        flag = 1
    else:
        flag = 0
        break;
    
    if num%2 == 1:
        num_flag = 1
    else:
        num_flag = 0
    num = int(num/2)
    if num_flag == 1:
        word_front = word_front[0:num]
        word_back = word_back[num+1:]
    else:
        word_front = word_front[0:num]
        word_back = word_back[num:]       
if flag:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

for i in range(hn//2):
  if S[i] != S[hn-1-i]:
    print('No')
    exit()
for i in range(hn//2):
  if S[hn+1+i] != S[N-1-i]:
    print('No')
    exit()
x = hn//2
if hn % 2 == 1:
  if S[x] != S[N-1-x]:
    print('No')
    exit()
print('Yes')

Submission status: Wrong Answer

Solution code:
char = str(input())
length = len(char)
char_len = ((length-1)/2)
char_list = list(char)
cnt = 0
list1 = []
list2 = []

while cnt != char_len:
    list1.append(char_list[cnt])
    cnt += 1

cnt2 = ((char_len * -1)-1)
cnt3 = -1
while cnt3 != cnt2:
    list2.append(char_list[cnt3])
    cnt3 -= 1

if list1 == list2:
    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:]
print(s1, s2)
if s1 == s1[::-1] and s2 == s2[::-1]:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

revS = list(reversed(L))
print(revS)

preS = L[:int((N - 1) / 2)]
revPreS = list(reversed(preS))
print(revPreS)

backS = L[int((N + 2) / 2):]
revBackS = list(reversed(backS))
print(revBackS)

if L != revS:
    print("No")
elif preS != revPreS:
    print("No")
elif backS != revBackS:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
S = str(input())
N = len(S)
 
small = round((N-1)/2)
big = round((N+3)/2)-1
smallS = S[:small]
bigS = S[big:]
kaibunA = S[:round(N/2)-1]
kaibunB = S[round(N/2):]

if N > 5:
	if kaibunA == kaibunB:
		if smallS == bigS:
			print('Yes')
		else:
			print('No')
	else:
		print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
letters = input()

def kaibun_check(letters):
    count = 0
    if len(letters)%2 == 0 or len(letters)<0:
        return False
    for _ in range(len(letters)//2):
        count += 1
        if letters[count-1] != letters[-count]:
            return False
    return True

if kaibun_check(letters) and kaibun_check(letters[:(len(letters)-1)//2]) and kaibun_check(letters[(len(letters)+3)//2-1:]):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
S = input()
S_list = list(S)
tmp = S_list.copy()
N = len(S)
if N % 2 == 0:
  print("No")
  sys.exit()
else: #奇数個
  S_list.reverse()
  if S_list == tmp:
    tmp_2 = int((len(tmp)-1) / 2)
    tmp_2_list = tmp[:tmp_2]
    t2=tmp_2_list.copy()
    
    tmp_3 = int((len(tmp)+3) / 2)
    tmp_3_list = tmp[tmp_3-1:]
    t3 = tmp_3_list.copy()
    
    tmp_2_list.reverse()
    tmp_3_list.reverse()
    if tmp_2_list == t2 and tmp_3_list == t3:
      print("yes")
      sys.exit()
    else:
      print("No")
      sys.exit()
  else:
    print("No")
    sys.exit()

Submission status: Wrong Answer

Solution code:
inp = input()
part1 = inp[0:int((len(inp)-1)/2)]
part2 = inp[int((len(inp)+1)/2):]


def isParin(S):
    n = len(S)
    flg = 0
    for i in range(int(n/2)):
        print(S[i], S[n-1-i])
        if S[i] != S[n-1-i]:
            flg += 1
    if flg == 0:
        return True
    else:
        return False


if isParin(inp):
    if part1 == part2:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
given = input()
n = len(given)
left, rite = given[:(n - 1)//2], given[(n + 3)//2 - 1:]
if given == given[::-1]:
    if left == left[::-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]==S[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 pali(s):
  l=len(s)
  p=True
  for i in range((l-1)//2):
    if s[i]!=s[l-i-1]:
      p=False
      break
  return p


s=input()
l=len(s)
s1=[]
s2=[]
for i in range ((l-1)//2):
    s1.append(s[i])
for i in range ((l+3)//2-1, l):
    s2.append(s[i])

superpali=pali(s) and pali(s1) and pali(s2)
if superpali:
    print ("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys
def is_anagram(s):
    return s == s[::-1]
S = input()
N = len(S)
if N == 3:
    print('No')
    sys.exit()

cond1 = int(((N-1)/2))
cond1 = S[0:cond1]
cond2 = int(((N+3)/2)-1)
cond2 = S[cond2:]
if is_anagram(cond1) and is_anagram(cond2):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import math
S = input()
N_s = int((len(S)-1)/2)-1
N_l = int((len(S)+3)/2)

num = N_s
flg = True
num_std = len(S)-1
for k in range(len(S)):
    if S[k] != S[num_std] and k < num_std:
        flg = False
        print("No")
        break
    if k > num_std:
        break
    num_std -= 1
if flg and len(S) == 3:
    flg = False
    print("Yes")
if flg:
    for i in  range(N_s):
        if(S[i] != S[num]):
            if(num > i):
                print("No")
                break
        if(num == i or num < i):
            num2 = len(S)-1
            for j in range(N_l-1,len(S),1):
                if(S[j] != S[num2]):
                    if(num2 > j):
                        print("No")
                        break
                if(num2 == j or num < j):
                    print("Yes")
                    break
                num2 -= 1
        num -= 1

Submission status: Wrong Answer

Solution code:
inp = input()
part1 = inp[0:int((len(inp)-1)/2)]
part2 = inp[int((len(inp)+1)/2):]


def isParin(S):
    n = len(S)
    flg = 0
    for i in range(int(n/2)):
        print(S[i], S[n-1-i])
        if S[i] != S[n-1-i]:
            flg += 1
    if flg == 0:
        return True
    else:
        return False


if isParin(inp):
    if part1 == part2:
        print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
n = N+1
count = 0
if N>5:
  for i in range(0,int(n/4)-1):
    if ((S[i] == S[int(n/2) - 2 - i])& (S[int(n/2)] == S[N-1-i])):
        pass
    else:
        count +=1
elif N == 5:
  if ((S[0] == S[1]) & (S[3]== S[4])):
    pass
  else:
    count += 1
else:
  if (S[0] == S[1]):
    pass
  else:
    count +=1


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

Submission status: Wrong Answer

Solution code:
ls = list(map(str,input()))
a=[]
b=[]
c=[]
d=[]
e=[]
f=[]
n = len(ls)
for i in range(int((n-1)/2)):
    a.append(ls[i])
for j in range(int((n+1)/2),n):
    b.append(ls[j])
b.reverse()
if b != a:
    print('No')
else:
    if (n-1) % 4 ==0:
        for k in range(int((n-1)/4)):
            c.append(a[i])
        for l in range(int((n-1)/4),int((n-1)/2)):
            d.append(a[i])
        for m in range(int((n-1)/4)):
            e.append(b[i])
        for n in range(int((n-1)/4),int((n-1)/2)):
            f.append(b[i])
        d.reverse()
        f.reverse()
        if (c == d) and (e == f):
            print('Yes')
        else:
            print('No')
    else:
        for k in range(int((n-3)/4)):
            c.append(a[i])
        for l in range(int((n+1)/4),int((n-1)/2)):
            d.append(a[i])
        for m in range(int((n-3)/4)):
            e.append(b[i])
        for n in range(int((n+1)/4),int((n-1)/2)):
            f.append(b[i])
        d.reverse()
        f.reverse()
        if (c == d) and (e == f):
            print('Yes')
        else:
            print('No')

Submission status: Wrong Answer

Solution code:
s = input()
ll = len(s)
l = ll // 2

ans = True
t = l
if len(s) % 2 != 0:
    t = l - 1

for i in range(0, t):
    if s[i] != s[t-i]:
        ans = False

t = l
if len(s) % 2 != 0:
    t = l + 1

ll -= 1
c = 0
for i in range(t, ll):
    if s[i] != s[ll-c]:
        ans = False
    c += 1

if s[:t-1] != s[t:]:
    ans = False

print(ans)

Submission status: Wrong Answer

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

def is_kaibun(s):
    n = len(s)
    head = s[:(n - 1) // 2]
    tail = s[(n + 3) // 2-1:]
    print("head = {} tail = {}".format(head, tail[::-1]))
    return head == tail[::-1]

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

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")
    exit()
ls = []
l1 = (n-1)//2
l2 = l1+2
h = l1//2
f = True
for i in range(h):
    if s[i] == s[l1-i-1]:
        pass
    else:
        f = False
    if s[-i-1] == s[l2+i-1]:
        pass
    else:
        f = False
if f:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys; sys.setrecursionlimit(2147483647); input = sys.stdin.readline
from math import floor, ceil, sqrt, factorial, log
from collections import Counter, defaultdict, deque
from operator import itemgetter
INF = float('inf'); MOD = 10**9+7
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(MI())
def LIR(n): return [LI() for i in range(n)]
def IS(): return input().rstrip()

def main():
    S = IS()
    N = len(S)
    if N%2 == 1:
        a = N//2
        if S[:a] == S[a+1:][::-1]:
            b = N//4
            if S[:b] == S[b+1:a][::-1]:
                c = (N+3)//2-1; d = c+(N-c)//2
                if S[c:d] == S[d+1:][::-1]:
                    print('Yes')
                    sys.exit()
    print('No')

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
S = input()
l = len(S)
import sys
a = S[:((l-1)//2)]


for i in range(len(a)//2):

    if str(a[i])==str(a[-i]):
        pass
    else:
        print('No')
        sys.exit(0)

b = S[l+3//2:l]

for j in range(len(b)//2):
    if b[j]==b[-j]:
        pass
    else:
        print('No')
        sys.exit(0)

for k in range((l//2)):
    if S[k] == S[-k]:
        pass
    else:
        print('No')
        sys.exit(0)

print('Yes')

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

Submission status: Wrong Answer

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


s=input()
l=len(s)
s1=[]
s2=[]
for i in range ((l-1)//2):
    s1.append(s[i])
for i in range ((l+3)//2, l):
    s2.append(s[i])

superpali=pali(s) and pali(s1) and pali(s2)
if superpali:
    print ("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
c = (n-1)//2
d = (n+3)//2
e = s[0:c]
f = s[d-1:n]
if s[0:c] == e[::-1] or s[d-1:n] == f[::-1]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
given = input()
n = len(given)
left, rite = given[:(n - 1)//2], given[(n + 3)//2 - 1:]
print(left, rite)
if given == given[::-1]:
    if left == left[::-1]:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

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

N2 = len(a)
c = a[::-1]
d = b[::-1]




if N2 % 2 == 0:
    if a[0:N2//2] == c[0:N2//2] and b[0:N2//2] == d[0:N2//2]:
        print('Yes')
    else:
        print('No')

if N2 % 2 == 1:
    if a[0:(N2+1)//2] == c[0:(N2+1)//2] and b[0:(N2+1)//2] == d[0:(N2+1)//2]:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
S = input()

def Pal(S_):
    S_len = (len(S_) - 1) // 2
    S_left = S_[:S_len]
    S_right = S_[S_len + 1:]
    S_right = S_right[::-1]
    if S_left == S_right:
        return True
    else:
        return False
if len(S) % 2 == 1:
    if Pal(S):
        S_l = S[:(len(S) - 1)//2]
        S_r = S[(len(S) + 3)//2 + 1:]
        if Pal(S_l) and Pal(S_r):
            print('Yes')
        else:
            print('No')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import copy

S = input()
flag_fail = 0
N = len(S)

while N != 1:
  S_temp = copy.copy(S)
  N = len(S)
  K = N // 2
  if N == 2:
    break
  if K > 2 and K % 2 == 0:
    flag_fail = 2
    break
  else:
    for i in range(K):
      if S_temp[i] != S_temp[N - i - 1]:
        flag_fail = 3
        break
        
  if flag_fail != 0:
    print('No')
    break
  else:
    S = []
    S = S_temp[0:K]
if flag_fail == 0:
  print('Yes')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
str = input()
s = list(str)
n = len(s)


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


if is_kaibun(str):
    before = int((n-1)/2)
    later = int((n+3)/2)
    str_before = str[0:before]
    if is_kaibun(str_before):
        str_later = str[int(n/2+1):later]
        if is_kaibun(str_later):
            print("true")

Submission status: Wrong Answer

Solution code:
#input
S = input()

#output
N = len(S)
k = N//2
l = (N-3)//4
m = (3*N-1)//4
if S[0:k] == S[:k:-1] and S[0:l] == S[(N-3)//2:l:-1] and S[(N+1)//2:m] == S[N-1:m:-1]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
A = int((N - 1) / 2)
B = int((A - 1) / 2)
X = 0

for i in range(A):
  if S[i] != S[-i-1]:
    X += 1

if N == 5:
  if S[0] != S[1] :
    X += 1

if N >= 7:
  for i in range(B):
  	if S[i] != S[A-1] or S[-i-1] != S[-A]:
  	    X += 1
      
if X == 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

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

N2 = len(a)
c = a[::-1]
d = b[::-1]

print(a[0:(N2 + 1) // 2])
print(b[0:(N2 + 1) // 2])
print(c[0:(N2 + 1) // 2])
print(d[0:(N2 + 1) // 2])


if N2 % 2 == 0:
    if a[0:N2//2] == c[0:N2//2] and b[0:N2//2] == d[0:N2//2]:
        print('Yes')
    else:
        print('No')

if N2 % 2 == 1:
    if a[0:(N2+1)//2] == c[0:(N2+1)//2] and b[0:(N2+1)//2] == d[0:(N2+1)//2]:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

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

S = input()

length = len(S)

mini_length = length//2

if mini_length%2 != 0:
    left_center = mini_length//2
    right_center = mini_length + left_center + 1
    left_left = S[:left_center]
    left_right = S[left_center+1:mini_length]
    right_left = S[mini_length+1:right_center]
    right_right = S[right_center+1:length]
    left = S[:mini_length]
    right = S[mini_length+1:length]

    # if (left_left == left_right[::-1]) and (right_left == right_right[::-1]):
    #     print('Yes')
    # else:
    #     print('No')
    if (ispalindrome(left)==1) and (ispalindrome(right)==1):
        print('Yes')
    else:
        print('No')
else:
    left_center = mini_length//2
    right_center = mini_length + left_center + 1
    left_left = S[:left_center]
    left_right = S[left_center:mini_length]
    right_left = S[mini_length+1:right_center]
    right_right = S[right_center:length]
    left = S[:mini_length]
    right = S[mini_length+1:length]
    if (ispalindrome(left)==1) and (ispalindrome(right)==1):
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
inp = input()
part1 = inp[0:int((len(inp)-1)/2)]
part2 = inp[int((len(inp)+1)/2):]


def isParin(S):
    n = len(S)
    flg = 0
    for i in range(int(n/2)):
        print(S[i], S[n-1-i])
        if S[i] != S[n-1-i]:
            flg += 1
    if flg == 0:
        return True
    else:
        return False


if isParin(inp):
    if part1 == part2:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
def check(text):
    length = len(text)
    
    if length%2 == 0:
        print('No')
        exit()
    half = int((length-1)/2)
    after = text[half+1:]

    if text[:half] == after[::-1]:
        print('Yes')
        exit()
        
data = input()
length = len(data)

half = int((length-1)/2)
after = data[half+1:]

if data[:half] == after[::-1]:
    check(data[:half])
    check(after)

print('No')

Submission status: Wrong Answer

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

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

sm = int((n + 1) / 2)
s1m = int((len(s1) + 1) / 2)
s2m = int((len(s2) + 1) / 2)

if s[0 : sm - 1] == s[sm : n] \
   and s1[0 : s1m - 1] == s1[s1m : int(len(s1))] \
   and s2[0 : s2m - 1] == s2[s2m : int(len(s2))]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S=input()
n=len(S)
left=int((n-1)/2)
right=int((n+3)/2)
#rint(right)
cnt=0
for a, b in zip(S[:left], reversed(S[left+1:])):
  #print(a,b)
  if a == b: 
    cnt += 1
if cnt==left:
  flag=1

  for a, b in zip(S[right:], reversed(S[:right+1])):
    #print(a,b)
    if a == b: 
      cnt += 1
    #print(cnt)

  if cnt== right:
    print('Yes')
    exit() 
print("No")

Submission status: Wrong Answer

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

def is_kaibun(value):
  if value[:len(value)//2] == ''.join(list(reversed(value[len(value)//2+1:]))):
    return True
  
  return False
    

print(main())

Submission status: Wrong Answer

Solution code:
s=input()
n=len(s)
a=s[:int((n-1)/2)]
b=s[int((n+3)/2)-1:]
m=len(a)
c=a[:int((m-1)/2)]
d=b[int((m+3)/2)-1:]


if a==b:
    if c==d:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
st = input()
def iskaibun2(s):
    for i in range(len(s)-1):
        if(s[i]==s[-1-i]):
            continue;
        else:
            return 0;
            break;
    return 1;

l = len(st)
q = (l-1)//2
st1 = st[0:q]
st2 = st[q+1:]
if(iskaibun2(st1)==1 and iskaibun2(st2)==1):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
##1つ目の条件
n1 = int((n-1)/2)
s1 = s[0:n1]
s_rev = s1[::-1]

##2つめの条件
n2 = int((n+3)/2)
s2 = s[n2-1:n]
s2_rev = s2[::-1]

##判定
if s1 == s_rev and s2 == s2_rev:
  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'
        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)+3)//2), len(s)-1):
    slk.append(s[i-1])


f = 'Yes'
    
    
if kaibun(sl) == 'No':
	f = 'No'

if kaibun(slz) == 'No':
	f = 'No'

if kaibun(slk) == 'No':
	f = 'No'

print(f)

Submission status: Wrong Answer

Solution code:
S = input()
s = list(S)
def is_strong_palindrome(strings):
    a = len(strings)
    b = (len(strings) - 1) // 2
    c = (len(strings) + 3) // 2
    for i in range(b // 2):
        if strings[i] != strings[(b-i-1)]:
            return False
    for j in range(b // 2):
        if strings[c+j-1] != strings[a-j-1]:
            return False
    return True
if is_strong_palindrome(s) == True:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
s = input()
s1 = s[::-1]
l=len(s)

check = 0
if(s==s1):
    if(s[0:int((l-1)/2)] == s1[0:int((l-1)/2)]):
        if(s[int((l+3)/2)-1:l] == s1[int((l+3)/2)-1:l]):
            print("Yes")
            check =1
if(check ==0):
    print("No")

Submission status: Wrong Answer

Solution code:

def is_kaibunn(str): return 1 if str == str[::-1] else 0

word = input()
flag = 0
num = len(word)
word_front = word
word_back = word

while num > 0:
    #print(num)
    
    if is_kaibunn(word_front) and is_kaibunn(word_back):
        flag = 1
    else:
        flag = 0
        break;
    
    if num%2 == 1:
        num_flag = 1
    else:
        num_flag = 0
    num = int(num/2)
    #print(num)
    if num_flag == 1:
        word_front = word_front[0:num]
        word_back = word_back[num+1:]
    else:
        word_front = word_front[0:num]
        word_back = word_back[num:]       
    
    #print(word_front)
    #print(word_back)

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

Submission status: Wrong Answer

Solution code:
S = list(input())

def isp(x):
    N = len(x)
    if N == 1:
    	return False
    m = N//2 + 1
    one2m = x[:m-1]
    m2N = x[m:]
    for a, b in zip(one2m, reversed(m2N)):
        if a != b:
            return False
    return True

C = len(S)//2 + 1
l = S[:C-1]
r = S[C:]

if isp(S) and isp(l) and isp(r):
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

Solution code:
import sys; sys.setrecursionlimit(2147483647); input = sys.stdin.readline
from math import floor, ceil, sqrt, factorial, log
from collections import Counter, defaultdict, deque
from operator import itemgetter
INF = float('inf'); MOD = 10**9+7
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(MI())
def LIR(n): return [LI() for i in range(n)]
def IS(): return input().rstrip()

def main():
    S = IS()
    N = len(S)
    if N%2 == 1:
        a = N//2
        if S[:a] == S[a+1:][::-1]:
            b = a//2
            if S[:b] == S[b+1:a][::-1]:
                c = a+1; d = c+(N-c)//2
                if S[c:d] == S[d+1:][::-1]:
                    print('Yes')
                    sys.exit()
    print('No')

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def is_kaibun(kaibun):
    for i in range(len(kaibun)//2):
        if kaibun[i] != kaibun[-i-1]:
            return False
    return True
s = str(input())
if is_kaibun(s)==True:
    ku = int((len(s)-1)/2)
    news = s[:ku]
    a = 0
    for a in range(len(news)//2):
        if news[a] != news[-a-1]:
            print("No")
        else:
            ks = int((len(s)+1)/2)
            news = s[ks:]
            b = 0
            for b in range(len(news)//2):
                if news[b] != news[-b-1]:
                    print("No")
                else:
                    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def check(s):
	l = len(s)
	c = 1

	if l != 1:

		if l % 2 == 1:
			l -= 1

		for i in range(int(l/2)):
			if s[i] != s[0-1-i]:
				c = 0

	return c

if __name__ == '__main__':
	S = input()
	LEN = len(S)
	l = int((LEN-1)/2)

	r = l+1
	s1 = S[0:l]
	s2 = S[r:LEN]

	print(s1)
	print(s2)

	c = check(s1) * check(s2) * check(S)

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

Submission status: Wrong Answer

Solution code:
s = input()

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

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

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

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

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
      
  for i in range(int((n+3)/2)+1, n+1):
    if s[i-1]!=s[-i]:
      ans = False
      
  count += 1
 
if ans==True:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s = input()
x = s[::-1]

y = s[0:3]
a = y[::-1]

z = s[4:7]
b = z[::-1]

if len(s) >= 7:
	if list(s) == list(x) and list(y) == list(a) and list(z) == list(b):
		print("Yes")
	else:
		print("No")
else:
	print("No")

Submission status: Wrong Answer

Solution code:
import sys

S=str(input())
N=len(S)

N1=int((N-1)/2)
N2=int((N+3)/2-1)

S1=list(S[:N1])
S2=list(S[N2:])


S3=list(reversed(S1))
S4=list(reversed(S2))
Sr=list(reversed(S))

if S==Sr:
    if S1==S3:
        if S2==S4:
            print("Yes")
            sys.exit()
print("No")