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())
N = len(S)

small = round((N-1)/2)
big = round((N+3)/2)-1
smallS = S[:small]
bigS = S[big:]

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

Submission status: Wrong Answer

Solution code:
"""
"""


def int_as_array(num): return list(map(int, [y for y in str(num)]))


def array_as_int(arr): return int(''.join(map(str, arr)))


def read_int(): return int(input())


def read_array(): return list(map(int, input().split(' ')))


def array_to_string(arr, sep=' '): return sep.join(map(str, arr))


def matrix_to_string(arr, sep=' '): return '[\n' + '\n'.join(
    [sep.join(map(str, row)) for row in arr]) + '\n]'


def solve(string):
    if string != string[::-1]:
        return False
    first = string[0:(len(string) - 1) // 2]
    if first != first[::-1]:
        return False
    second = string[0:(len(string) + 3) // 2]
    if second != second[::-1]:
        return False
    return True


string = input()
if solve(string):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
s = list(input())
n = len(s)
ans = "Yes"
x = (n-1)//2-1
y = (n+3)//2-1
n-=1
for i in range(x+1):
    if s[i] != s[x-i]:
        ans = "No"
        break
    if s[y+i] != s[n-i]:
        ans = "No"
        break
print(ans)

Submission status: Wrong Answer

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

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(S: str):
    N = len(S)
    a = S[0:int((N-1)/2)]
    b = S[int((N+3)/2)-1:N]
    if a == b[::-1]:
        Na = len(a)
        aa = a[0:int((Na - 1) / 2)]
        ab = a[int((Na + 3) / 2)-1:Na]

        Nb = len(b)
        ba = b[0:int((Nb - 1) / 2)]
        bb = b[int((Nb + 3) / 2)-1: Nb]

        if aa == ab[::-1] and ba == bb[::-1]:
            print(YES)
        else:
            print(NO)
        return
    print(NO)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    solve(S)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
a = list(input().split())
a1 = "".join(a)
c = reversed(a)
c1 = "".join(c)
print(a1)
print(c1)


def b():
    if len(a1) <= 5:
        return 0
    if a1 == c1:
        return 1
    else:
        return 0


if b() == 0:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
S = input()
N = len(S)
s2 = S[:int((N-1)/2)]
s3 = S[int((N+3)/2 -1):]
if s2 == s2[::-1]:
    if s3 == s3[::-1]:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()
L = len(S)
a = int((L - 1) / 2)
b = int((L+3)/2)
S_first = S[:a]
S_second = S[(b-1):]
if S_first == S_second[::-1]:
    # print('S=kaibun')
    L_2 = len(S_first)
    a_2 = int((L_2 - 1) / 2)
    b_2 = int((L_2 + 3) / 2)
    S_first_f = S_first[:a_2]
    S_first_s = S_first[(b_2 - 1):]
    if S_first_f == S_first_s[::-1]:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:

def solve():
    S = input()
    s1 = S[:int((len(S)-1)/2)]
    s2 = S[int((len(S)+1)/2):]

    for i in range(len(s1)):
        if(s1[i] == s1[len(s1)-i-1]):
            if(i>len(s1)-i-1):
                break
        else:
            print("No")
            return
        if(s2[i] == s2[len(s2)-i-1]):
            pass
        else:
            print("No")
            return
    print("Yes")

solve()

Submission status: Wrong Answer

Solution code:
def palindrome(string): return 0 if string==string[::-1] else 1
stri = input()
s = list(stri)
a = len(s)//2
b = s[0:a]
c = s[a+1:]
d = palindrome(b)
e = palindrome(c)
if d==0 and e==0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
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]
    if (left_left == left_right[::-1]) and (right_left == right_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]
    if (left_left == left_right[::-1]) and (right_left == right_right[::-1]):
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
S=input()
N=int((len(S)-1)/2)
m=""
for i in range(N):
    m=m+S[i]

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

if kaibun(S) and kaibun(m):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
def parindrome(s):
    print(s)
    if s[::] == s[::-1]:
        return True
    return False

def string_parindrome(s):
    if parindrome(s):
        N = len(s)
        if parindrome(s[:((N-1)//2):]) and parindrome(s[((N+3)//2)-1::]):
            return "Yes"
    return "No"
    

S = input()
print(string_parindrome(S))

Submission status: Wrong Answer

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

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

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

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

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

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

Submission status: Wrong Answer

Solution code:
S = input()

N = len(S)

be = []
af = []

for i in range(N//2):
    be.append(S[i])
    af.append(S[i+N//2+1])
    
re_be = list(reversed(be))
re_af = list(reversed(af))

if be == re_be and af == re_af:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s=str(input())

cnt=0

num=len(s)//2

a=s[:num]
b=s[num+1:]
print(a)
print(b)

num2=len(a)//2
if len(a)%2 ==1:
    c=a[:num2]
    d=a[num2+1:]
else:
    c=a[:num2]
    d=a[num2:]

print(c)
print(d)

num3=int((len(s)+3)/2-1)
s1=s[num3:]
num4=len(s1)//2
if len(s1)%2==1:
    e=s1[:num4]
    f=s1[num4+1:]
else:
    e=s1[:num4]
    f=s1[num4:]


print(e)
print(f)

if a==b[::-1]:
    cnt +=1

if c==d[::-1]:
    cnt +=1

if e==f[::-1]:
    cnt +=1

if cnt==3:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def getInput():
    return list(input().rstrip())

def firstCheck(S):
    N = len(S)-1
    c = int((N)/2)

    ret = True
    for i in range(c):
        # Sの回文判定
        if not S[i] == S[N-i]:
            ret = False;break;
    if ret:
        a = [str(S[i]) for i in range(c)]
        b = [str(S[i]) for i in range(c+1, N+1)]
        ret = True if secondCheck(a) and secondCheck(b)  else False
            
    return ret

def secondCheck(S):
    N = len(S)-1
    c = int((N)/2)
    ret = True

    for i in range(c):
        if not S[i] == S[N-i]:
            ret = False;break;
    return ret

S = getInput()
if len(S) < 7:
    print('No')
else:
    print('No') if not firstCheck(S) else print('Yes')

Submission status: Wrong Answer

Solution code:
a = input()
c = len(a)//2
if c == 1:
  print('Yes')
  exit()
for i in range(c//2):
  if a[i] != a[(len(a)-1)//2-1-i]:
    print('No')
    exit()
  if a[-c] != a[-1-i]:
    print('No')
    exit()
print('Yes')

Submission status: Wrong Answer

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

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

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

if N>=7:
    if j1&j2&j3:
        ans = 'Yes'
    else :
        ans = 'No'
elif N==5:
    if S[0]==S[1]==S[3]==S[4]:
        ans='Yes'
    else :
        ans='No'
else :
    if S[0]==S[2]:
        ans = 'Yes'
    else :
        ans = 'No'
print(ans)

Submission status: Wrong Answer

Solution code:
s=input()
s=list(s)
n=len(s)
a=s[:(n-1)//2]
b=s[(n+2)//2:]
m=len(a)
yes=0
for i in range((n-1)//2):
    if s[i]==s[-(i+1)]:
        yes+=1
if n==3:
    if yes==1:
        print('Yes')
    else:
        print('No')
else:    
    if m%2==1:
        for i in range((m-1)//2):
            if a[i]==a[-(i+1)]:
                yes+=1
            if b[i]==b[-(i+1)]:
                yes+=1
    else:
       for i in range(m//2):
            if a[i]==a[-(i+1)]:
                yes+=1
            if b[i]==b[-(i+1)]:
                yes+=1
    if yes==(m-1)+(n-1)//2:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
import sys

S = list(input())
Sr = S[::-1]

if S != Sr:
    print("No")
    sys.exit()

N = len(S)
C1 = int(((N - 1) / 2))
C2 = int((N + 3) / 2) - 1

C1Str = S[0:C1]
C2Str = S[C2:N]

if len(C1Str) % 2 == 0:
    print("No")
    sys.exit()

if len(C2Str) % 2 == 0:
    print("No")
    sys.exit()


if C1Str != C1Str[::-1]:
    print("No")
    sys.exit()

if C2Str != C2Str[::-1]:
    print("No")
    sys.exit()

print("Yes")

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:

s = input()
s = list(s)
n = len(s)
a = 1

if (n+1)%4 is not 0:
	print("No")

else:
	for i in range((n-3)//4):
		if s[i]!=s[(n-3)//2-i] or s[(n+1)//2+i]!=s[n-1-i]:

			a=0
			break
	#for i in range((n-3)//4):
		#if s[(n+1)//2+i]!=s[n-1-i]:
			#print("No")
			#break

	if a ==1:
		print("Yes")
	else:
		print("No")

Submission status: Wrong Answer

Solution code:
s = str(input())

tmp_p = 0

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

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

    #print(tmp)
    if tmp != tmp_2[0:len(tmp_2)//2]:
        tmp_p += 1


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

if tmp_p != 0:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
import math
s = input()
s1=s[::-1]
flag=0
if s==s1:
    s=s[0:math.ceil((len(s)-1)/2)]
    s1 = s[::-1]
    if s == s1:
        s = s[0:math.ceil((len(s)+3)/2)]
        s1 = s[::-1]
        if s == s1:
            flag=1
if flag==0:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

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

n1 = int ( (n - 1 ) / 2 )
n2 = int ( (n + 1 ) / 2 )

s1 = s[0:n1]
s2 = s[n2:n]

def if_kai( st ):
  ret = False
  nn = len(st)
  nn1 = int ( (nn - 1 ) / 2 )
  for i in range(nn1):
    if st[i] == st[nn-i-1] :
       ret = True
  return ret      

if if_kai( s ) and if_kai( s1 ) and if_kai( s2 ) :
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

def kaibun(s):
  i = 0
  ans = True
  while i < n-1-i:
    if s[i] != s[len(s)-1-i]:
      ans = False
      return ans
      break
    i += 1
  return ans

ans_total = kaibun(s)

zenhan = s[:n//2]
kouhan = s[n//2:]

ans_zen = kaibun(zenhan)
ans_kou = kaibun(kouhan)

if ans_total == True and ans_zen == True and ans_kou == True:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
S = input()
flg = 0
if len(S) % 2 == 0:
  print('No')
else:
  for i in range(len(S)//2):
    if S[i] != S[-i-1]: flg = 1
  else:
    for j in range(len(S)//4):
      if S[j] != S[len(S)//2-j-1]: flg = 1
      else:
        for k in range(len(S)//4):
          if S[len(S)//2 + 1 + j] != S[-i-1]: flg = 1
    if flg == 1: print('No')
    else: print('Yes')

Submission status: Wrong Answer

Solution code:
a = list(input().split())
a1 = "".join(a)
c = reversed(a)
c1 = "".join(c)
print(a1)
print(c1)

def b():
    if len(a1) <= 5:
        return 0
    if a1 == c1:
        return 1
    else:
        return 0


if b() == 0:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
s = list(input())
x = len(s)
a = s[:x//2]
b = s[x//2+1:]
y = len(a)
if y%2 == 1:
    c = a[:y//2]
    d = a[y//2+1:]
    e = b[y//2+1:]
    f = b[:y//2]
else:
    c = a[:y // 2]
    d = a[y // 2:]
    e = b[y // 2:]
    f = b[:y // 2]


ans = "No"
if a == b:
    if c == d:
        if a == b:
            ans = "Yes"

print(ans)

Submission status: Wrong Answer

Solution code:
def judge(s):
    n = len(s)
    check = 0
    for i in range(n):
        check = int(s[i]!=s[-1-i])
        
    n2 = n//2
    for i in range(n2):
        check = int(s[i] != s[n2 - i])
       
    n3 = (n+1)//2
    for i in range(n3):
        check = int(s[n3] != s[-1-i])
        
    if check >0:
        print("No")
    else:
        print("Yes")

s = list(input())
judge(s)

Submission status: Wrong Answer

Solution code:
S = str(input())
def palindrome(string): 
    return True if string==string[::-1] else False
    
if len(S) % 2 != 0 and palindrome(S) and palindrome(S[:(len(S)-1)//2]) and palindrome(S[(len(S)+3)//2 + 1:]):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
# coding: utf-8

import sys
import math
import collections
import itertools
from inspect import currentframe
INF = 10 ** 10
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y) : return (x * y) // gcd(x, y)
def I() : return int(input())
def MI() : return map(int, input().split())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def chkprint(*args) : names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}; print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))

S = input()

N = len(S)

if N >= 7:
    if S[0 : int((N - 1)/2)] == S[int((N + 1)/2) : int(N)]:
        print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
S = str(input())
judge = True
S = list(S)
for i in range(int(len(S)/2)):
    if S[i] != S[len(S) - 1 - i]:
        judge = False
for i in range(int(len(S)/4)):
    if S[i] != S[int(len(S)/2) - 1 - i]:
        judge = False
for i in range(int(len(S)/4)):
    if S[i + int(len(S)/2) + 1] != S[int(len(S)) - 1 - i]:
        judge = False
print(judge)

Submission status: Wrong Answer

Solution code:
def isPalin(s):
    return s[::-1]==s
s=input()
n=len(s)
n1,n2=(n-1)//2,(n+3)//2
a,b=s[:n1],s[n2-1:]
#print(a,b)
if isPalin(a) and isPalin(b) and len(s)%2!=0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = str(input())
n = len(s)
pre = s[0:int((n-1)/2)]
rear = s[int((n+3)/2-1):int(n)]

for i in range(len(pre)):
    if pre[i-1:i] != pre[len(pre)-(i-1)-1:len(pre)-(i-1)]:
        print('No')
        exit()

for i in range(len(rear)):
    if rear[i-1:i] != rear[len(rear)-(i-1)-1:len(rear)-(i-1)]:
        print('No')
        exit()

print('Yes')

Submission status: Wrong Answer

Solution code:
X=input()
L=X[::-1]
if L==X:
    N=len(X)
    if N % 2== 1:
        a=int((N-1)/2)
        b=int((N+3)/2)
        Ya=X[0:a]
        LYa=Ya[::-1]
        Yb=X[b-1:N]
        LYb=Yb[::-1]
        if LYa ==Ya:
            if LYb == Yb:
                print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(S: str):
    N = len(S)
    a = S[0:int((N-1)/2)]
    b = S[int((N+3)/2)-1:N]
    if a == b[::-1]:
        Na = len(a)
        aa = a[0:int((Na - 1) / 2)]
        ab = a[int((Na + 3) / 2)-1:Na]

        Nb = len(b)
        ba = b[0:int((Nb - 1) / 2)]
        bb = b[int((Nb + 3) / 2)-1: Nb]

        if aa == ba and aa == ab[::-1] and ba == bb[::-1]:
            print(YES)
        else:
            print(NO)
        return
    print(NO)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    solve(S)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:

def check_str( ss ):
  sslen = len(ss)
  
  ccnt = 0
  for c in ss:
    if( ss[0] == c ):
      ccnt+=1
  
  if( sslen == ccnt ):
    return False
  
  return (ss[:sslen//2] == ss[sslen//2+1:][::-1])
  
s = input()

slen = len(s)

if( not check_str( s ) ):
  print( "No" )
else:
#print(s[:slen//2])
#print(s[slen//2+1:][::-1])

  s1 =  s[:slen//2]
  s2 = s[slen//2+1:]
  
  
  if( (not check_str( s1 )) or (not check_str( s2 )) ):
    print( "No" )
  else:
    print( "Yes" )

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

#s1

Submission status: Wrong Answer

Solution code:
# ABC159_B
s=input()
n=len(s)
# if n==1:
#     print('No')
#     exit()

n=n//2
f=''
e=''
f=s[:n]
e=s[-n:]
for i in range(int(n//2)):
    if f[i]==f[-1-i]:
        pass
    else:
        print('No')
        exit()
    if e[i]==e[-i-1]:
        pass
    else:
        print('No')
        exit()
print('Yes')

Submission status: Wrong Answer

Solution code:
S = list(input())

N = int(len(S))
num = 0

for i in range(int((N-1)/2)):
    if S[i] == S[int((N-1)/2-1-i)]:
        pass
    else:
        num += 1

for j in range(int((N-1)/2)):
    if S[int((N-1)/2+1+j)] == S[int(N-1-j)]:
        pass
    else:
        num += 1

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

Submission status: Wrong Answer

Solution code:
S = input()
S_first_len = (len(S) - 1) // 2
S_first_left = S_first_len

S_f_l_ = S[:S_first_len]
S_f_r_ = S[S_first_len + 1:]
S_f_r_ = S_f_r_[::-1]
#print(S_f_l_)
#print(S_f_r_)

if S_f_l_ == S_f_r_:
    S_s_len = (S_first_len +3) // 2
    S_sec = S[S_s_len + 1:]
    #print('|||' + S_sec)
    S_len = (len(S_sec) - 1) // 2
    S_sec_l = S_len

    S_s_l_ = S_sec[:S_sec_l]
    S_s_r_ = S_sec[S_sec_l + 1:]
    S_s_r_ = S_s_r_[::-1]
    #print(S_s_l_)
    #print(S_s_r_)
    if S_s_l_ == S_s_r_:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
def rv(s):
    if s == list(reversed(s)):
        return 1
    else:
        return 0
s = list(input())
n = len(s)
sl = int((n-1)/2)
sl2 = int((n+3)/2-1)
flag = 0
circle1 = s[:sl]
circle2 = s[sl2:]

if rv(circle1) == 0 or rv(circle2) == 0:
    print('No')
    exit()
print('Yes')

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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


import os
import sys


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



if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
# coding: utf-8

S = input()
# print(S)

N = len(S)
# print(N)

def judge(N, S):
    # print("S[:(N-1) // 2]", S[:(N-1) // 2])
    # print("rev", rev)
    
    rev2 = S[(N+3) // 2 - 1:]
    rev2 = rev2[::-1]
    
    if S[:(N-1) // 2] == rev2:
        flg = True
    else:
        flg = False

    return flg

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

if S[:(N-1) // 2] == rev:
    b_S = S[:(N-1) // 2]
    a_S = S[(N+3) // 2 - 1:]
    # print("b_S:", b_S)
    # print("a_S:", a_S)
    if judge(len(b_S), b_S) == True and judge(len(a_S), a_S) == True:
        print("Yes")
    else:
        print("No")
    exit()
else:
    print("No")

Submission status: Wrong Answer

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


s = input()



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

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

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


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



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

Submission status: Wrong Answer

Solution code:
def isPalin(s):
    return s[::-1]==s
s=input()
n=len(s)
n1,n2=(n-1)//2,(n+3)//2
a,b=s[:n1],s[n2-1:]
#print(a,b)
if isPalin(a) and isPalin(b):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

cnt = 0
S_1 = S[0:(N-1)//2]
S_2 = S[(N+3)//2-1:N]

for i in range(len(S_1)//2+1):
    if S_1[i] == S_1[-i-1]:
        cnt += 1
if cnt == len(S_1)//2+1:
    new_cnt = 0
    for x in range(len(S_2)//2+1):
      if S_2[x] == S_2[-x-1]:
        new_cnt += 1
    if new_cnt == len(S_2)//2+1:
      print('Yes')
    else:
      print('No')
else:
  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]

s1m = int((len(s1) + 1) / 2)
s2m = int((len(s2) + 1) / 2)
if 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:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-*-

from sys import stdin


def main():
    S = stdin.readline()
    # S = S[0:-1]
    N = len(S)

    if len(S) % 2 == 0:
        print('No')
        return

    # 回分チェック
    for i in range(len(S) // 2):
        if S[i] != S[-i - 1]:
            print('No')
            return

    # 中に回文が含まれるか？

    if S[0:N // 2 ] != S[N // 2 + 1:]:
        print('No')
        return
    # output
    print("Yes")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

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[0:small]
bigS = S[big:N]

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

Submission status: Wrong Answer

Solution code:
s = input().strip()
y, n = "Yes", "No"
if len(s) == 3:
    if s[0] == s[1]:
        print(y)
    else:
        print(n)
else:
    mid = len(s)//2
    if s[0:mid] == s[mid+1:len(s)]:
        print(y)
    else:
        print(n)

Submission status: Wrong Answer

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

a = ""
b = ""

if len(s2) %2 == 1:
  a = s2[:int((n2-1)/2)]
  b = s2[int(int((n2-1)/2) + 1):]
else:
  a = s2[:int((n2)/2)]
  b = s2[int(int((n2)/2)):]
  
s3 = s[int((n+3)/2 - 1):]
n3 = len(s3)
a2 = ""
b2 = ""

if len(s3) %2 == 1:
  a2 = s3[:int((n3-1)/2)]
  b2 = s3[int(int((n3-1)/2) + 1):]
else:
  a2 = s3[:int((n3)/2)]
  b2 = s3[int(int((n3)/2)):]


# 回文の判定
if s[:int((n-1)/2)] == s[int(int((n-1)/2) + 1):] and a == b and a2 == b2:
  print ("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
S = input()
S_first_len = (len(S) - 1) // 2
S_first_left = S_first_len

S_f_l_ = S[:S_first_len]
S_f_r_ = S[S_first_len + 1:]
S_f_r_ = S_f_r_[::-1]
#print(S_f_l_)
#print(S_f_r_)

if S_f_l_ == S_f_r_:
    S_s_len = (S_first_len +3) // 2
    S_sec = S[S_s_len + 1:]
    #print('|||' + S_sec)
    S_len = len(S_sec) // 2
    S_sec_l = S_len

    S_s_l_ = S_sec[:S_sec_l]
    S_s_r_ = S_sec[S_sec_l + 1:]
    S_s_r_ = S_s_r_[::-1]
    #print(S_s_l_)
    #print(S_s_r_)
    if S_s_l_ == S_s_r_:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S=str(input())

N=len(S)
i=0
r="No"

s=int((N-1)/2)
t=int((N+3)/2)

a=S[0:s]
b=S[t-1:N]

if(N==3 and S==S[::-1]):
  print("Yes")
elif(a==(a[::-1]) and b==(b[::-1])):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s=input()
n=len(s)
count=0
a=(n-1)//2
b=(n+3)//2
for i in range(n//2):
  if s[i]!=s[-abs(i+1)]:
    count+=1
for i in range(a//2):
  if s[i]!=s[a-1-i]:
    count+=1
    
for i in range((n-b+1)//2):
  if s[-(i+1)]!=s[b-1-i]:
    count+=1
    
if count!=0:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print("Yes" if flag==True else "No")

Submission status: Wrong Answer

Solution code:
#/usr/bin/env python
def ispalindrome(str): return 1 if str == str[::-1] else 0

def main():
    s = input()
    l = len(s)
    s1 = s[:(l-1) // 2]
    s2 = s[(l + 3) // 2 + 1:]

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
k1 = ''
k2 = ''
for i in range(0,(len(S) - 1) // 2):
  k1 += S[i]
for i in range(((len(S) + 3) // 2) - 1, len(S)):
  k2 += S[i]
if k1 == k1[::-1] and k2 == k2[::-1] and 3 <= len(S) <= 99 and len(S) % 2 == 1:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
S = input()
if len(S) % 2 == 0:
    print("No")
else:
    for i in range(len(S)+1):
        if i % 2 == 1:
            if S[i:i+2] == S[i+4:i+6]:
                print("Yes")
                break
            else:
                print("No")
                break

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
a = int((n-1)/2)
b = int((n+3)/2)
f=0
x=s[:a]
y = s[b-1:]
if x==x[::-1] and y==y[::-1]:
  print("Yes")
else:
  print("No")