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

tmp = ''
for i in range(len(s)//2):
    tmp += s[-(i+1)]
#print(tmp)
if tmp != s[0:len(s)//2]:
    print('No')
else:
    tmp_2 = s[0:(len(s)-1)//2]
    if len(tmp_2) == 3 and tmp_2[0] != tmp_2[2]:
        print('No')
    else:
        tmp_3 = ''
        for i in range(len(tmp_2)//2):
            tmp_3 += tmp_2[-(i+1)]
        #print(tmp_3)
        if tmp_3 != tmp_2[0:len(tmp_2)//2]:
            print('No')
            
        else:
            tmp_4 = s[(len(s)+3)//2-1:]
            
            if len(tmp_4) == 3 and tmp_4[0] != tmp_4[2]:
                print('No')
                
            else:
                tmp_5 = ''
                for i in range(len(tmp_4)//2):
                    tmp_5 += tmp_4[-(i+1)]
                #print(tmp_5)
                #print(tmp_4[len(tmp_4)//2+1::])
                if tmp_5 != tmp_4[len(tmp_4)//2+1::]:
                    print('No')
                    
                else:
                    print('Yes')

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
if(N%2==0):
  print('No')
else:
  a=S[:int((N-1)/2)]
  b=S[int((N+1)/2):]
  b=b[::-1]
  if(a==b):
    N=len(a)
    c=a[:int((N-1)/2)]
    d=a[int((N+1)/2):]
    d=d[::-1]
    if(c==d):
      e=b[:int((N-1)/2)]
      f=b[int((N+1)/2):]
      f=f[::-1]
      if(e==f):
        print('Yes')
      else:
        print('No')
    else:
      print('No')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = list(input())
n = len(s)
sign = 0
limit_1 = int((n-1)//2)

judge = limit_1%2
if judge == 0:
  limit_2 = int(limit_1//2)
elif judge == 1:
  limit_2 = int((limit_1-1)//2)

for i in range(limit_2):
  if not (s[i] == s[-i-limit_1]):
    sign = 1

if s[:limit_1] != s[limit_1+1:] :
  sign = 1

if sign == 0:
  ans = "Yes"
elif sign == 1:
  ans = "No"
  
print(ans)

Submission status: Wrong Answer

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


def is_palindrome(s):
    s_reverse = s[::-1]
    if s == s_reverse:
        return True
    else:
        return False

print(is_palindrome(S))

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

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
N1 = (N-1)//2
N2 = (N+3)//2

for s1, s2 in zip(S, S[::-1]):
    if s1 != s2:
        print('No')
        exit()
    else:
        continue

for s1, s2 in zip(S[0:N1+1], S[N1+1:0:-1]):
    if s1 != s2:
        print('No')
        exit()
    else:
        continue

for s1, s2 in zip(S[N2-1:N], S[N:N2-1:-1]):
    if s1 != s2:
        print('No')
        exit()
    else:
        continue

print('Yes')

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

def main():
    S = input().strip()

    n = (len(S) + 1) // 2
    a = S[:n]
    b = S[n-1:][::-1]

    nn = n // 2
    aa = a[:-1][:nn]
    ab = a[:-1][nn - 1:][::-1]

    ba = b[::-1][1:][:nn]
    bb = b[::-1][1:][nn-1:][::-1]


    if a == b and aa == ab and ba == bb:
        print('Yes')

    else:
        print('No')


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

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
	else:
		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]

	c = check(s1) * check(s2)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()

S = input()
mid = len(S)//2
fst = S[:mid]
lat = S[mid+1:]
if fst == lat[::-1]:
    mid = len(fst)//2
    fst_2 = fst[:mid]
    lat_2 = fst[mid+1:]
    if fst_2 == lat_2[::-1]:
        fst_3 = lat[:mid]
        lat_3 = lat[mid+1:]
        if fst_3 == lat_3[::-1]:
            print('Yes')
        else:
            print('No')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s=input()
def kai(s):
    if len(s)//2 == 0:
        if s[:int(len(s)/2-1)] == s[int(len(s)/2):]:
            return True
        else:
            return False

    else:
        if s[:int((len(s)-1)/2)] == s[int((len(s)+1)/2):]:
            return True
        else:
            return False

if kai(s) and kai(s[:int((len(s)-1)/2)]) and kai(s[int((len(s)+1)/2):]):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def c1(S):
    N=len(S)
    if S[:N//2] == S[N:N//2:-1]:
        return True
    else:
        return False
S=input()
N=len(S)
SS=S[:(N-1)//2]
SSS=S[(N+3)//2-1:]
SSS=SSS[::-1]

if SS==SSS and c1(SS):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def main():
    s = input()
    sl = len(s)
    

    if s[:(sl//2)] != s[(sl//2)+1:]:
        print('No')
        exit()
    s1 = s[:(sl//2)]
    s1l = len(s1)
    if s1[:(s1l//2)] != s1[(s1l//2)+1:]:
        print('No')
        exit()
    s2 = s[(sl//2)+1:]
    if s2[:(s1l//2)] != s2[(s1l//2)+1:]:
        print('No')
        exit()
    print('Yes')

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
s = list(str(input()))
s1 = s[len(s)//2+1:]
s1r = s1[::-1]
s2 = s[:len(s)//2]
s2r = s2[::-1]

if s1 == s1r and s2 == s2r:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()

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

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

Submission status: Wrong Answer

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

s2 = s[:int((n-1)/2)]
n2 = len(s2)

s3 = s[int((n+3)/2) - 1:]
n3 = len(s3)


# 回文の判定
if s[:int((n-1)/2)] == s[int(int((n-1)/2) + 1):] and s2[:int((n2-1)/2)] == s2[int(int((n2-1)/2) + 1):] and s3[:int((n3-1)/2)] == s3[int(int((n3-1)/2) + 1):]:
  print ("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s=list(input())
N=len(s)
tmp=s[0:int((N-1)/2)+1]
tmp_rev=tmp[::-1]

tmp2=s[int((N+3)/2):N+1]
tmp2_rev=tmp2[::-1]

if tmp==tmp_rev and tmp2==tmp2_rev:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
# N: odd number. length of S.
# S: 文字列
S = input()


def examine_kaibun(S):
    add_val = len(S)%2
    center = (len(S)-add_val)//2
    return S[:center] == S[-center:][::-1]

N = len(S)
pre_judge = examine_kaibun(S[:(N-1)//2])
pos_judge = examine_kaibun(S[(N+3)//2-1:])
if pre_judge and pos_judge:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = list(input())
n = len(s)
flag = 1
c = int((n - 1) / 2)

for i in range(c):
    if s[i] != s[n - 1 - i]:
        flag = 0
        break

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

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

Submission status: Wrong Answer

Solution code:
S = input()
N = int(len(S))
A = "Yes"
n = N//2
m = n//2
 
for i in range(n):
  if S[i] != S[N-1-i]:
    A = "No"
    break
for i in range(m):
  if S[i] != S[m-1-i] or S[n+1+i] != S[N-1-i]:
    A = "No"
    break
if N ==3:
  A ="No"
print(A)

Submission status: Wrong Answer

Solution code:
S = input()

ind = (len(S) + 1) // 2

left = S[:ind-1]
right = S[ind:][::-1]

def check(x):
    if len(x) % 2 == 0:
        return False
    ind = (len(x) + 1) // 2
    if x[:ind-1] == x[ind:][::-1]:
        return True

if check(S) and check(left) and check(right):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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

if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

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

def evaluate(string):
  return string[:] == string[::-1]

print(S[:int((N-1)/2)])
print("Yes" if evaluate(S[:int((N-1)/2)]) and evaluate(S) else "No")

Submission status: Wrong Answer

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

out = "Yes"
for i in range(int((N-1)/4)):
    if S[i] == S[int((N-1)/2)-i-1]:
        pass
    elif S[i] != S[int((N-1)/2)-i-1]:
        out = "No"
        break
    elif S[int((N+3)/2)+i+1] == S[-i]:
        pass
    else:
        out = "No"
        break
print(out)

Submission status: Wrong Answer

Solution code:
from fractions import gcd
# from datetime import date, timedelta
# from heapq import *
import heapq
import math
from collections import defaultdict, Counter, deque
from bisect import *
import itertools
import fractions
import sys
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7
# input = sys.stdin.readline


def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

import random
def main():
    s = list(input())
    n = len(s)
    if n == 3:
        if s[0] == s[2]:
            print("Yes")
        else:
            print("No")
        exit()
    
    a = s[:(n - 1) // 2]
    b = s[(n + 3) // 2-1:]
    for i in range(len(a) // 2):
        if (a[i] != a[len(a) - 1 - i]):
            print("No")
            exit()


    for i in range(len(b) // 2):
        if (b[i] != b[len(b) - 1 - i]):
            print("No")
            exit()
    print("Yes")

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def isKaibun(s):
  for a, b in zip(s, reversed(s)):
    if a != b:
      return False
  return True

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

Submission status: Wrong Answer

Solution code:
import sys
from math import ceil, floor
from collections import deque, Counter, defaultdict
from fractions import gcd
input = lambda: sys.stdin.readline().rstrip()

def eprint(s):
    sys.stderr.write('DEBUG: {}'.format(s))
    return

def is_p(s):
    n = len(s)
    a, b = s, s[::-1]
    print(a,b)
    if a==b:
        return True
    return False

def main():
    s = input()
    n = len(s)


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

    return

if __name__ == '__main__':
    print(is_p(input()))

Submission status: Wrong Answer

Solution code:
S = list(input())
N = len(S)
print((N-1)/2)
if S[:int((N-1)/2)] == list(reversed(S[:int((N-1)/2)])) and S[int((N+1)/2):] == list(reversed(S[int((N+1)/2):])):
    print('Yes')
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()

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

if S2[:pivot2] != S2[pivot2+1:][::-1]:
    print('No')
    exit()

print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
ans = False
if S == S[::-1]:
    s1 = S[:(len(S) - 1) // 2]
    if s1 == s1[::-1]:
        s2 = S[(len(S) + 3) // 2 + 1:]
        if s2 == s2[::-1]:
            ans = True
print("Yes" if ans else "No")

Submission status: Wrong Answer

Solution code:
from fractions import gcd
# from datetime import date, timedelta
# from heapq import *
import heapq
import math
from collections import defaultdict, Counter, deque
from bisect import *
import itertools
import fractions
import sys
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7
# input = sys.stdin.readline


def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

import random
def main():
    s = list(input())
    n = len(s)
    if n == 3:
        if s[0] == s[2]:
            print("Yes")
        else:
            print("No")
        exit()
    
    a = s[:(n - 1) // 2]
    b = s[(n + 3) // 2-1:]
    print(a,b)
    for i in range(len(a) // 2):
        if (a[i] != a[len(a) - 1 - i]):
            print("No")
            exit()


    for i in range(len(b) // 2):
        if (b[i] != b[len(b) - 1 - i]):
            print("No")
            exit()
    print("Yes")

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
s = input()
n = len(s)
m = (n-1) // 2
k = (n+3) // 2
flag = 1
for i in range(0, n//2):
    if s[i] != s[n-i-1]:
        flag = 0
        break
for i in range(0, m//2):
    if s[i] != s[m-i-1]:
        flag = 0
        break
for i in range(1, (n-k)//2+1):
    if s[i+k] != s[n-i]:
        flag = 0
        break
if flag == 1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
n = len(S)
p = (n-1)//2
q = (n+3)//2 - 1
A = S[:p]
B = S[q:]
ans = 'Yes'
for i in range(len(A)):
    if A[i] != A[-i-1]:
        ans = 'No'
for i in range(len(B)):
    if B[i] != B[-i-1]:
        ans = 'No'
print(ans)

Submission status: Wrong Answer

Solution code:
def is_palindrome(s):
    if len(s) == 1:
        return False
    else:
        h = len(s) // 2
        if s[:h] == s[len(s):h:-1]:
            return True

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

Submission status: Wrong Answer

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


s = input()
N = len(s)
# print(s[0:(N - 1) // 2])
# print(s[(N + 3) // 2 - 1:N])
if palindrome(s[0:(N - 1) // 2]) and palindrome(s[(N + 3) - 1 // 2:N]):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()

s = [c for c in s]

left = s[:len(s)//2]
right = s[len(s)//2+1:]

def check(s):
    left = []
    right = []

    while len(s)>1:
        left.append(s.pop(0))
        right.append(s.pop())

    right.reverse()
    
    if left==right:
        return True
    else:
        return False

if check(left)==True and check(right)==True and check(s)==True:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = input()
m = len(s) // 2
l = s[:m]
r = s[m+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:
s = list(input())
n = len(s)
ans = 'No'
for i in range(int((n-1)/2)):
    if s[i] == s[n-1-i]:
        if (n-1)%2 == 0:
            for j in range(int((n-1)/4)):
                if s[j] == s[int((n-1)/2) - j -1]:
                    ans = 'Yes'
        else:
            for j in range(int(((n-1)/2 - 1)/2)):
                if s[j] == s[int((n-1)/2) - j -1]:
                    ans = 'Yes'
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()

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

n = len(s)

if palind(s) and palind(s[:(((n-1)//2))]) and palind(s[(((n+3)//2)-1):]):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
s = input()
n = s.__len__()
hn = ((n - 1) / 2).__int__()
qn = ((hn - 1) / 2).__int__()
ans = 'Yes'
for i in range(hn):
    if s[i] != s[n-1-i]:
        ans = 'No'
if hn % 2 == 0:
    ans = 'No'
for i in range(qn):
    if s[i] != s[hn-1-i]:
        ans = 'No'
print(ans)

Submission status: Wrong Answer

Solution code:

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def c1(S):
    N=len(S)
    if S[:N//2] == S[N:N//2:-1]:
        return True
    else:
        return False
S=input()
N=len(S)
SS=S[:(N-1)//2]
SSS=S[(N+3)//2-1:]
if SS==SSS and c1(SS):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
if n == 3:
    print("Yes")
elif (n//2)%2 == 0:
    l, r = s[:(n-1)//2], s[(n+1)//2:]
    m = len(l)
    ll, lr = l[:(m)//2], l[(m)//2:]
    rl, rr = l[:(m)//2], l[(m)//2:]
    if ll == lr and rl == rr:
        print("Yes")
    else:
        print("No")
else:
    l, r = s[:(n-1)//2], s[(n+1)//2:]
    m = len(l)
    ll, lr = l[:(m-1)//2], l[(m+1)//2:]
    rl, rr = l[:(m-1)//2], l[(m+1)//2:]
    if ll == lr and rl == rr:
        print("Yes")
    else:
        print("No")

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:]
	fn = len(front)
	ff = front[:(fn-1)//2]
	fe = front[(fn+3)//2-1:]
	en = len(end)
	ef = end[:(en-1)//2]
	ee = end[(en+3)//2-1:]
	if ff == fe and ef == ee:
		print("Yes")
	else:
		print("No")

main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

n = len(s)

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

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

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

Submission status: Wrong Answer

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

def evaluate(string):
  return string[:] == string[::-1]

print(S[:int((N-1)/2)])
print("Yes" if evaluate(S[:int((N-1)/2)]) else "No")

Submission status: Wrong Answer

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

point1 = int((n-1)/2)
point2 = int((n+3)/2)

judge = 0

for i in range(point1//2):
    if s[i] != s[point1-1-i]:
        judge = 1
        break

for i in range(point1//2):
    if s[point2-1+i] != s[n-1-i]:
        judge = 1
        break
    
if judge == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
#from scipy.special import comb
#from math import factorial
 
S = input()
S1 = S[:int((len(S)-1)/2)]
S2 = S[int((len(S)+1)/2):]

if S == S[::-1]:
  if S1 == S1[::-1]:
    if S2 == S2[::-1]:
      print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S = input()
n = len(S)
p = (n-1)//2
q = (n+3)//2 - 1
A = S[:p]
B = S[q:]
ans = 'Yes'
for i in range(len(A)):
    if A[i] != A[-i-1]:
        ans = 'No'
for i in range(len(B)):
    if B[i] != B[-i-1]:
        ans = 'No'

Submission status: Wrong Answer

Solution code:
s = list(input())
n = len(s)
s1 = s[0:(n-1)//2]
s2 = s[(n+3)//2-1:n]
print(s,s1,s2)
S = []
S1 = []
S2 = []
i = -1
j = -1
k = -1
while i >= n * -1:
    S.append(s[i])

    i -= 1
while j >= len(s1) * -1:
    S1.append(s1[j])
    j -= 1
while k >= len(s2) * -1:
    S2.append(s2[k])
    k -= 1
if s == S and s1 == S1 and s2 == S2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def ispalindrome(str): return 1 if str == str[::-1] else 0
a = input()
l = len(a)
left = a[0:(l-1)//2]
right = a[(l-1)//2+1:]
if ispalindrome(left) and ispalindrome(right):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

def kai(s):
  n = len(s)
  if s[:int((n-1)/2)] == s[int((n+1)/2):][::-1]:
    return True
  else:
    return False

s1 = s[:int((n-1)/2)]
s2 = s[int((n+1)/2):]
# print([kai(s),kai(s1),kai(s2)])
if sum([kai(s),kai(s1),kai(s2)]*1) == 3:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

def check_kai(arr):
    len_a = len(arr)
    check_len = int(math.ceil(len_a/2))
    lef = arr[0:check_len]
    arr.reverse()
    rig = arr[0:check_len]
    if lef == rig:
        return True
    else:
        return False


input = list(input())
N = len(input)

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

Submission status: Wrong Answer

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

def isKaibun(s, length):
    orta = int((length+1)/2)-1
    if s[:orta] == s[orta+1:]:
        return True
    else:
        return False


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

if isKaibun(s, n) and isKaibun(s[:orta], orta):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
from bisect import *
from collections import *
from itertools import *
import functools
import sys
import math
from decimal import *
from copy import *
from heapq import *
from fractions import *
getcontext().prec = 30
MAX = sys.maxsize
MAXN = 50010
MOD = 10**9+7
spf = [i for i in range(MAXN)]
spf[0]=spf[1] = -1
def sieve():
    for i in range(2,MAXN,2):
        spf[i] = 2
    for i in range(3,int(MAXN**0.5)+1):
        if spf[i]==i:
            for j in range(i*i,MAXN,i):
                if spf[j]==j:
                    spf[j]=i
def fib(n,m):
    if n == 0:
        return [0, 1]
    else:
        a, b = fib(n // 2)
        c = ((a%m) * ((b%m) * 2 - (a%m)))%m
        d = ((a%m) * (a%m))%m + ((b)%m * (b)%m)%m
        if n % 2 == 0:
            return [c, d]
        else:
            return [d, c + d]

def charIN(x= ' '):
    return(sys.stdin.readline().strip().split(x))

def arrIN(x = ' '):
    return list(map(int,sys.stdin.readline().strip().split(x)))

def ncr(n,r):
    num=den=1
    for i in range(r):
        num = (num*(n-i))%MOD
        den = (den*(i+1))%MOD

    return (num*(pow(den,MOD-2,MOD)))%MOD

def flush():
    return sys.stdout.flush()

'''*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*'''

def chk(s):
    return s==s[::-1]
s = input()
n = len(s)
x = s[:(n-1)//2]
y = s[(n+3)//2:]

if chk(s) and chk(y) and chk(x):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

s1rev = s1[::-1]
s2rev = s2[::-1]

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

Submission status: Wrong Answer

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

    kaibun_check(S)

    S1 = S[0:(N-1)//2]
    kaibun_check(S1)

    S2 = S[(N+3)//2 + 1:]
    kaibun_check(S2)

    print('Yes')


def kaibun_check(L):
    L_ = list(L.__reversed__())
    for s, s_ in zip(L, L_):
        if s != s_:
            print('No')
            exit()


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

a = (N-1) // 2
b = (N+3) // 2

#print(S[0:a])
#print(''.join(list(reversed(S[0:a]))))
#print(S[:-(b-1)])
#print(''.join(list(reversed(S[:-(b-1)]))))

if S[0:a] == ''.join(list(reversed(S[0:a]))):
  if S[:-(b-1)] == ''.join(list(reversed(S[:-(b-1)]))):
    print('Yes')
    exit()

print('No')

Submission status: Wrong Answer

Solution code:
s = list(input())
a = s[:(len(s)-1)//2]
b = s[(len(s)+2)//2:]

flagA = True
for i in range(len(a)//2):
  if a[i] != a[len(a)-i-1]:
    flagA = False
    break
    
flagB = True
for i in range(len(b)//2):
  if b[i] != b[len(b)-i-1]:
    flagB = False
    break
    
if flagA and flagB:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
X = (N-1)//2
flag = True

for i in range((N-1)//2):
  if S[i] != S[-1-i]:
    flag = False
for i in range((X-1)//2):
  if S[i] != S[X-i-1]:
    flag = False
for i in range((X-1)//2):
  if S[X+1] != S[-1-i]:
    flag = False
if N == 5:
  if S[0] != S[1]:
    flag = False
  elif S[-1] != S[-2]:
    flag = False
if flag == False:
  print("No")
else:
  print("Yes")

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

pivot2 = len(S1)//2
if S1[:pivot2] != S1[pivot2+1:]:
    print('No')
    exit()

if S2[:pivot2] != S2[pivot2+1:]:
    print('No')
    exit()

print('Yes')

Submission status: Wrong Answer

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

s3 = s[(n+3)//2-1:]
s4 = s3[::-1]

s0 = s[::-1]

print(s1, s2)
print(s3, s4)

if s1 == s2 and s3 == s4 and s == s0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = list(input())
len_s = len(S)
print(len_s)
right = S[0:(len_s-1)//2]
left = S[(len_s+3)//2-1:]
if S != list(reversed(S)):
    print("No")
elif right != list(reversed(right)):
    print("No")
elif left != list(reversed(left)):
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ss = [''] * N
for i, s in enumerate(S):
  ss[i] = s
i1 = int((N-1)/2)
i2 = int((N+3)/2)
strong = True
for i in range(int(i1/2)):
  if ss[i] != ss[i1-i-1]:
    strong = False
for i in range(int((N-i2)/2)):
  if ss[i2-1+i] != ss[N-1-i]:
    strong = False

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

Submission status: Wrong Answer

Solution code:
S=input()
ans=1

for i in range((len(S)-1)//2):
    
    if S[i]==S[len(S)-1-i]:
        ans*=1
    else:
        ans*=2

for j in range((len(S)-1)//2):
    
    if S[j]==S[(len(S)-1)//2-j-1]:
        ans*=1
    else:
        ans*=3

if ans==1:
    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')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()
half_l = len(S)//2
mae = S[0:half_l]
ato = S[half_l+1:len(S)]
if mae != ato:
    print('No')
    exit(0)
if len(mae)%2 == 0:
    if mae[0:len(mae)//2] != mae[len(mae)//2:len(mae)]:
        print('No')
        exit(0)
else:
    if mae[0:len(mae)//2] != mae[len(mae)//2+1:len(mae)]:
        print('No')
        exit(0)

start = (len(S) +3)//2
target_str = S[start-1:len(S)]
if len(target_str)%2 == 0:
    if target_str[0:len(target_str)//2] != target_str[len(target_str)//2:len(target_str)]:
        print('No')
        exit(0)
else:
    if target_str[0:len(target_str)//2] != target_str[len(target_str)//2+1:len(target_str)]:
        print('No')
        exit(0)
print('Yes')