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:
def main():
    import sys
    #input = sys.stdin.readline
    s = input()
    n = len(s)
    s_l = s[:int((n-1)/2)]
    s_r = s[int((n+1)/2):]
    print(s_l,s_r)
    if s == s[::-1] and s_l == s_l[::-1] and s_r == s_r[::-1]:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
S = list(input())
if len(S) > 3:
    if len(S)%4 == 1:
        c = 0
        for i in range(0,int((len(S)-1)/4)):
            if S[i] == S[int((len(S)-1)/2)-i-1]:
                c += 1
        d = 0
        for i in range(0,int((len(S)-1)/4)):
            if S[int((len(S)+3)/2)+i-1] == S[len(S)-i-1]:
                d += 1
        if c == int((len(S)-1)/4) and d == int((len(S)-1)/4):
            print('Yes')
        else:
            print('No')
    elif len(S)%4 == 3:
        c = 0
        for i in range(0,int((len(S)-3)/4)):
            if S[i] == S[int((len(S)-1)/2)-i-1]:
                c += 1
        d = 0
        for i in range(0,int((len(S)-3)/4)):
            if S[int((len(S)+3)/2)+i-1] == S[len(S)-i-1]:
                d += 1
        if c == int((len(S)-3)/4) and d == int((len(S)-3)/4):
            print('Yes')
        else:
            print('No')
else:
    if S[0] == S[2]:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
S = list(input())

if len(S)%4 == 1:
    c = 0
    for i in range(0,int((len(S)-1)/4)):
        if S[i] == S[int((len(S)-1)/2)-i-1]:
            c += 1
    d = 0
    for i in range(0,int((len(S)-1)/4)):
        if S[int((len(S)+3)/2)+i-1] == S[len(S)-i-1]:
            d += 1
    if c == int((len(S)-1)/4) and d == int((len(S)-1)/4):
        print('Yes')
    else:
        print('No')
elif len(S)%4 == 3:
    c = 0
    for i in range(0,int((len(S)-3)/4)):
        if S[i] == S[int((len(S)-1)/2)-i-1]:
            c += 1
    d = 0
    for i in range(0,int((len(S)-3)/4)):
        if S[int((len(S)+3)/2)+i-1] == S[len(S)-i-1]:
            d += 1
    if c == int((len(S)-3)/4) and d == int((len(S)-3)/4):
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
s = list(str(input()))

ans = 0
n = len(s)
s1 = list(reversed(s))
if s != s1:
    ans = 1

s2 = s[0:(n-1)//2]
s3 = list(reversed(s2))
if s2 != s3:
    ans = 1

s4 = s[(n+2)//2:n]
s5 = list(reversed(s4))
if s4 != s5:
    ans = 1

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

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

Submission status: Wrong Answer

Solution code:
s = input()
flag = False

top_s = s[:int((len(s)-1)/2)]
btm_s = s[int((len(s)+3)/2)-1:]
btm_s = btm_s[::-1]
if (top_s == btm_s):
    flag = True

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

Submission status: Wrong Answer

Solution code:
s = input()
flag = False
if( (3<=len(s))):
    if(len(s) <= 99) :
        if(len(s) % 2 == 1):
            if(s.islower()):
                if(~s.isdecimal()):
                    top_s = s[:int((len(s)-1)/2)]
                    btm_s = s[int((len(s)+3)/2):]
                    btm_s = btm_s[::-1]
                    if (top_s == btm_s):
                        flag = True

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

Submission status: Wrong Answer

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

def check(c):
    if len(c) == 0:
        return False
    if list(c) == list(reversed(c)):
        return True
    return False

result = "No"
if check(S[:int((N-1)/2)]):
    if check(S[int((N+3)/2)-1:]):
        result = "Yes"
print(result)

Submission status: Wrong Answer

Solution code:
s = input()
flag = False
#if( (3<=len(s)) & (len(s) <= 99) & (len(s) % 2 == 1) &(s.islower()) ):
top_s = s[:int((len(s)-1)/2)]
btm_s = s[int((len(s)+3)/2):]
btm_s = btm_s[::-1]
if (top_s == btm_s):
    flag = True

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

Submission status: Wrong Answer

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

def check(c):
    if list(c) == list(reversed(c)):
        return True
    return False

result = "No"
if check(S[:int((N-1)/2)]):
    if check(S[int((N+3)/2)-1:]):
        result = "Yes"
print(result)

Submission status: Wrong Answer

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

def check(c):
    c = list(c)
    l = len(c)-1
    pre = c[:int(l/2)]
    aft = c[int(l/2)+1:]
    aft.reverse()
    if pre == aft:
        return True
    return False

result = "No"
if check(S[:int((N-1)/2)]):
    if check(S[int((N+3)/2)-1:]):
        result = "Yes"
print(result)

Submission status: Wrong Answer

Solution code:

s=input()
flag=True
n=len(s)
if s!=s[::-1]:
    print(reversed(s))
    flag=False
if s[:(n-1)//2]!=s[-1:(n-1)//2:-1]:
    print(reversed(s[:(n-1)//2]))
    flag=False
if s[(n+3)//2-1:]!=s[-1:(n+3)//2-1:-1]:
    print(reversed(s[(n+3)//2-1:]))
    flag=False
print("Yes" if flag else "No")

Submission status: Wrong Answer

Solution code:
s = input()
flag = False
if( (3<=len(s)) & (len(s) <= 99) & (len(s) % 2 == 1) &(s.islower()) ):
    top_s = s[:int((len(s)-1)/2)]
    btm_s = s[int((len(s)+1)/2):]
    btm_s = btm_s[::-1]
    if (top_s == btm_s):
        flag = True
if flag :
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

def check(c):
    c = list(c)
    l = len(c)-1
    pre = c[:int(l/2)]
    aft = c[int(l/2)+1:]
    aft.reverse()
    if pre == aft:
        return True
    return False

result = "No"
if check(S[:int((N-1)/2)]) and (N+3)/2  < N:
    if check(S[int((N+3)/2)-1:]):
        result = "Yes"
print(result)

Submission status: Wrong Answer

Solution code:
s=input()
flag=True
n=len(s)
if s!=reversed(s):
    flag=False
if s[:(n-1)//2]!=reversed(s[:(n-1)//2]):
    flag=False
if s[(n+3)//2-1:]!=reversed(s[(n+3)//2-1:]):
    flag=False
print("Yes" if flag else "No")

Submission status: Wrong Answer

Solution code:
s=input()
flag=True
n=len(s)
if s!=reversed(s):
    flag=False
if s[:(n-1)//2]!=reversed(s[:(n-1)//2]):
    flag=False
if s[(n+3)//2-1:]!=reversed(s[(n+3)//2-1::-1]):
    flag=False
print("Yes" if flag else "No")

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
S1 = S[:N//2]
S2 = S[N//2 + 1:]
N1 = len(S1)
if N1 % 2 == 1 and N1 > 2:
    if S1[N1//2] != S2[N1//2]:
        print('No')
        exit()

for i in range(N//4):
    if S1[i] != S2[-i - 1] or S1[i] != S2[i] or S1[i] != S2[-i - 1]:
        print('No')
        exit()
print('Yes')

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
T=S[:N//2]
U=S[N//2+1:]

flg=0

for i in range(int((N-1)/2)):
  if(S[i]!=S[-i-1]):
    print(S[i],S[-i])
    flg=1
    break
  
for j in range(len(T)//2):
  if(T[j]!=T[-j-1]):
    flg=1
    break
  
for k in range(len(U)//2):
  if(U[k]!=U[-k-1]):
    flg=1
    break

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = str( input() )

n = len( s )
s_l = s[:(n-1)//2]
s_r = s[(n+1)//2:]
print( s, s_l, s_r )

if s == s[::-1] and s_l == s_l[::-1] and s_r == s_r[::-1]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


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

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

Submission status: Wrong Answer

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


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

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

Submission status: Wrong Answer

Solution code:
import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
def palin(a):
    if(a==a[::-1]):
        return True
    return False
s=input()
n=len(s)
if(palin(s[:(n-1)//2]) and palin(s[(n+1)//2:])):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
S = list(s)
cnt = 0
l = int(len(s))
l = l // 2
for i in range(l + 1):
    if S[i] == S[-(1 + i)]:
        for j in range(l):
            if S[j] == S[-(l + 2 + j)]:
                cnt += 1


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    s = input()
    ans = True

    for i in range((len(s) - 1) // 2):
        if s[0 + i] != s[(len(s) - 1) // 2 - i - 1] or s[(len(s) + 3) // 2 + i - 1] != s[len(s) - i - 1]:
            ans = False
    if ans:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
"keep it simple keep it real"
s = list(input())
n = len(s); flag= 0
start, end = 0, ((n-1)//2)-1
while(end > start):
    if not(s[start] == s[end]):
        break
    start += 1 ; end -= 1
else:    flag += 1
start, end = (n+3)//2 -1, (n-1)
while(end > start):
    if not(s[start] == s[end]):
        break
    start += 1 ; end -= 1
else:    flag += 1  
print('Yes' if flag == 2 else 'No')

Submission status: Wrong Answer

Solution code:
S = input()
left = S[0:(len(S)-1)//2]
right = S[(len(S)+3)//2 - 1: len(S)]

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

if kaibun(left) and kaibun(right):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def strongPalindrome(S):
    S2 = S[0:(len(S)-1)//2]
    S3 = S[(len(S)+3)//2:]
    return "Yes" if S == S[::-1] and S2 == S2[::-1] and S3 == S3[::-1] else "No"

S = input()
print(strongPalindrome(S))

Submission status: Wrong Answer

Solution code:
def strongPalindrome(S):
    S2 = S[0:(len(S)-1)//2]
    S3 = S[0:(len(S)+3)//2]
    return "Yes" if S == S[::-1] and S2 == S2[::-1] and S3 == S3[::-1] else "No"

S = input()
print(strongPalindrome(S))

Submission status: Wrong Answer

Solution code:
def strongPalindrome(S):
    S2 = S[0:(len(S)-1)//2]
    S3 = S[0:(len(S)+3)//2]
    return True if S == S[::-1] and S2 == S2[::-1] and S3 == S3[::-1] else False

S = input()
print(strongPalindrome(S))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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


i = 1
while i < len(s):
    if not s[i-1] == s[-i]:
        print("No")
        exit()
    i += 1
while i < len(s1):
    if not s1[i-1] == s1[-i]:
        print("No")
        exit()
    i += 1
while i < len(s2):
    if not s2[i+2] == s2[-i]:
        print("No")
        exit()
    i += 1
print("Yes")

Submission status: Wrong Answer

Solution code:

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


i = 1
while i < len(s1):
    if not s1[i-1] == s1[-i]:
        print("No")
        exit()
    i += 1
while i < len(s2):
    if not s2[i+2] == s2[-i]:
        print("No")
        exit()
    i += 1
print("Yes")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
sf = s[0:(n-1)//2]
sr = s[::-1][0:(n-1)//2]
print('YNeos'[not[s == s[::-1] and sf == sf[::-1] and sr == sr[::-1]]::2])

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
sf = s[0:(n-1)//2]
sr = s[::-1][0:(n-1)//2]
print('YNeos'[not[sf == sf[::-1] and sr == sr[::-1]]::2])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

mae = S[:int((N-1)/2)]
ushiro = S[int((N+1)/2):]

for i in range(N):
    if S[i] == S[-(i+1)]:
        for j in range(len(mae)):
            if mae[j] != mae[-(j + 1)] or ushiro[j] != ushiro[-(j + 1)]:
                print("No")
                break


            else:
                print("Yes")
                break
        break




    else:
        print("No")
        break

Submission status: Wrong Answer

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

mae = S[:(N-1)//2]
ushiro = S[(N+1)//2:]


for i in range(N):
    if S[i] == S[-(i+1)]:
        for j in range(len(mae)):
            if mae[j] != mae[-(j + 1)] or ushiro[j] != ushiro[-(j + 1)]:
                print("No")
                break


            else:
                print("Yes")
                break
        break




    else:
        print("No")
        break

Submission status: Wrong Answer

Solution code:
s = input()
length = len(s)
ans = ''

def solver(string):
  if string==string[::-1]:
    return 'Yes'
  else:
    return 'No'

ans = solver(s)
ans = solver(s[:int((length - 1) / 2 - 1)])
ans = solver(s[int((length - 3) / 2 - 1) :])

print(ans)

Submission status: Wrong Answer

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

S_1_num = int((N-1)/2)
S_2_num = int((N+3)/2)

S_1 = S[0:S_1_num]
S_2 = S[S_2_num-1:N]

S_list = list(reversed(S))
S_1_list = list(reversed(S_1))
S_2_list = list(reversed(S_2))

new_S = ''.join(list(reversed(S)))
new_S_1 = ''.join(list(reversed(S_1_list)))
new_S_2 = ''.join(list(reversed(S_2_list)))


if S == new_S and S_1 == new_S_1 and S_2 == new_S_2:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

anal = a==reversed(a)
manco = b==reversed(b)
portio = c==reversed(c)
 
if anal and manco and portio:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

def palindrome(i):
    i_l = len(i)
    if i[:int(i_l/2)] == i[:int(i_l/2):(-1)]:
        return True

s_1 = s[:int((n-1)/2)]
s_2 = s[int((n+2)/2):]

if palindrome(s) and palindrome(s_1) and palindrome(s_2):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

def palindrome(i):
    i_l = len(i)
    if i[:int(i_l/2)] == i[:int(i_l/2):(-1)]:
        return True

s_1 = s[:int((n-2)/2+1)]
s_2 = s[int((n+2)/2):]

if palindrome(s) and palindrome(s_1) and palindrome(s_2):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def palindrome_check(sentence):
    answer = True

    sprit_num1 = int((len(sentence) - 1) /2)
    sprit_num2 = int((len(sentence) + 3) /2)

    sprit_sentence1 = sentence[:sprit_num1]
    sprit_sentence2 = sentence[sprit_num2 -1 :]

    check1 = []
    check2 = []
    
    for i in range(int(len(sprit_sentence1))):
        check1.append(sprit_sentence1[i] == sprit_sentence1[-(i+1)])
    for i in range(int(len(sprit_sentence2))):
        check2.append(sprit_sentence2[i] == sprit_sentence2[-(i+1)])
    
    if False in check1 or False in check2:
        answer = False
        
    return answer



if __name__ == "__main__":
    sentence = input()

    if palindrome_check(sentence) is True:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
def palindrome_check(sentence):
    answer = True

    sprit_num1 = int((len(sentence) - 1) /2)
    sprit_num2 = int((len(sentence) + 3) /2)

    sprit_sentence1 = sentence[:sprit_num1]
    sprit_sentence2 = sentence[sprit_num2 -1 :]

    check1 = []
    check2 = []
    
    for i in range(int((len(sprit_sentence1) -1) / 2)):
        check1.append(sprit_sentence1[i] == sprit_sentence1[-(i+1)])
    for i in range(int((len(sprit_sentence2) -1) / 2)):
        check2.append(sprit_sentence2[i] == sprit_sentence2[-(i+1)])
    
    if False in check1 or False in check2:
        answer = False
        
    return answer



if __name__ == "__main__":
    sentence = input()

    if palindrome_check(sentence) is True:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
def palindrome_check(sentence):
    answer = True

    sprit_num1 = int((len(sentence) - 1) /2)
    sprit_num2 = int((len(sentence) + 3) /2)

    sprit_sentence1 = sentence[:sprit_num1]
    sprit_sentence2 = sentence[sprit_num2 -1 :]

    check1 = []
    check2 = []
    
    for i in range(int((sprit_num1 -1) / 2)):
        check1.append(sprit_sentence1[i] == sprit_sentence1[-(i+1)])
    for i in range(int((sprit_num2 -1) / 2)):
        check2.append(sprit_sentence2[i] == sprit_sentence2[-(i+1)])
    
    if False in check1 or False in check2:
        answer = False
        
    return answer



if __name__ == "__main__":
    sentence = input()

    if palindrome_check(sentence) is True:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
S = input()
if S != ''.join(reversed(S)):
    print('No')
elif S[:((len(S)-1)//2)] != ''.join(reversed(S[:((len(S)-1)//2)])):
    print('No')
elif S[((len(S)+3)//2+1):] != ''.join(reversed(S[((len(S)+3)//2+1):])):
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
s=input()
c=list(reversed(s))
n=len(s)
t=list(s[:int((n-1)/2)])
a=list(reversed(t))
u=list(s[int((n+3)/2)-1:])
b=list(reversed(u))
#print(b)
if t==a and u==b and s==c:
    print("Yes")   
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s=input()
n=len(s)
t=list(s[:int((n-1)/2)])
a=list(reversed(t))
u=list(s[int((n+3)/2)-1:])
b=list(reversed(u))
#print(b)
if t==a and u==b:
    print("Yes")
    
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

S = str(sys.stdin.read().rstrip())
N = len(S)

flag1, flag2 = True, True
for i in range((N-1)//2):
    j = (N-1)//2 - i - 1
    if S[i] != S[j]: flag1 = False

for i in range((N+3)//2 - 1, N):
    j = N + (N+3)//2 - i - 2
    if S[i] != S[j]: flag2 = False

print('Yes') if flag1 and flag2 else print('No')

Submission status: Wrong Answer

Solution code:
s = input()
l = len(s)
if list(s) != list(reversed(s)):
    print('No')
    exit()
if list(s[:l - 1 // 2]) != list(reversed(s[:l - 1 // 2])):
    print('No')
    exit()
if list(s[l + 3 // 2 -1:l]) != list(reversed(s[l + 3 // 2 -1:l])):
    print('No')
    exit()
print('Yes')

Submission status: Wrong Answer

Solution code:
s = input()
l = len(s)
if list(s) != list(reversed(s)):
    print('No')
    exit()
if list(s[:l - 1 // 2]) != list(reversed(s[:l - 1 // 2])):
    print('No')
    exit()
if list(s[l + 3 // 2:l]) != list(reversed(s[l + 3 // 2:l])):
    print('No')
    exit()
print('Yes')

Submission status: Wrong Answer

Solution code:
s = input()
l = len(s)
if list(s) != list(reversed(s)):
    print('No')
    exit()
if list(s[:l - 1 // 2]) != list(reversed(s[:l - 1 // 2])):
    print('No')
    exit()
if list(s[:l + 3 // 2]) != list(reversed(s[:l + 3 // 2])):
    print('No')
    exit()
print('Yes')

Submission status: Wrong Answer

Solution code:
s=input()
A=list(s)
N=len(A)
M=N-1
R=M//2
k=0
while k<M/2:
  if A[k]!=A[M-k]:
    print("No")
  if A[k]!=A[R-1-k]:
    print("No")
  if A[k+R+1]!=A[M-k]:
    print("No")
  else:
    print("Yes")
  k=k+1

Submission status: Wrong Answer

Solution code:
s = input()

if s != s[::-1]:
  print("No")
  exit()
  
x = s[:((len(s)-1)//2)]
if x != x[::-1]:
  print("No")
  exit()
  
y = s[((len(s)+3)//2-1):]
print(y)
if y != y[::-1]:
  print("No")
  exit()

print("Yes")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
nn = int((n-1)/2)

for i in range(nn):
	if(s[i] != s[-i-1]):
		print("No")
		break
else:
	print("Yes")

Submission status: Wrong Answer

Solution code:
#! env/bin/local python3
# -*- coding:utf-8 -*-

s = input()
ls = len(s)


def is_kaibun(s):
    rs = s[::-1]
    print(s, rs)
    if s == rs:
        return True
    else:
        return False


flag = False
if is_kaibun(s):
    if is_kaibun(s[:(ls-1)//2]):
        if is_kaibun(s[(ls+3)//2-1: ls]):
            flag = True

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

Submission status: Wrong Answer

Solution code:
#! env/bin/local python3
# -*- coding:utf-8 -*-

s = input()
ls = len(s)

def is_kaibun(s):
    rs = s[::-1]

    if s == rs:
        return True
    else:
        return False


flag = False
if is_kaibun(s):
    if is_kaibun(s[:(ls-1)//2]):
        if is_kaibun(s[(ls+3)//2: ls]):
            flag = True

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

Submission status: Wrong Answer

Solution code:
#! env/bin/local python3
# -*- coding:utf-8 -*-

s = input()
ls = len(s)


def is_kaibun(s):
    rs = s[::-1]
    n = len(s)
    if s[:(n - 1) // 2] == rs[:(n - 1) // 2]:
        return True
    else:
        return False


flag = False
if is_kaibun(s):
    if is_kaibun(s[:(ls-1)//2]):
        if is_kaibun(s[(ls+3)//2: ls]):
            flag = True

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

Submission status: Wrong Answer

Solution code:
import math
s = input()
n = len(s)
zen_c = 0
z = math.floor((n-1)/2)
k = math.floor((n+2)/2)
zenhan = s[0:z]
kouhan = s[k:n]
zen_l = len(zenhan)-1
count = 0
for i in range(0, n):
  if s[i] == s[n-i-1]:
    count += 1
for i in range(0, math.floor((zen_l+1)/2)):
  if zenhan[i] == zenhan[zen_l-i] and i != (zen_l-i):
    print(zenhan[i])
    zen_c += 1
zen_l = math.floor(zen_l/2)
n = math.floor((n-1)/2)
print('Yes' if zen_c == zen_l and zenhan == kouhan else 'No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:

S = input()
N = len(S)

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

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

Submission status: Wrong Answer

Solution code:

S = input()
N = len(S)

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

Submission status: Wrong Answer

Solution code:

S = input()
N = len(S)

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

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
n=int((N-1)/2)
counter=0
counter1=0
for i in range(int((N-1)/2)):
    if S[i]==S[N-i-1]:
        counter+=1
for i in range(int((n-1)/2)):
    if S[i]==S[n-i-1] and S[i+n+2-1]==S[N-i-1]:
        counter1+=1
if n%2==1 and n>=3 and counter==n and counter1==int((n-1)/2):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
n=int((N-1)/2)
counter=0
counter1=0
for i in range(int((N-1)/2)):
    if S[i]==S[N-i-1]:
        counter+=1
for i in range(int((n-1)/2)):
    if S[i]==S[n-i-1] and S[i+n+2-1]==S[N-i-1]:
        counter1+=1
if n%2==1 and counter==n and counter1==int((n-1)/2):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
n=int((N-1)/2)
counter=0
counter1=0
for i in range(int((N-1)/2)):
    if S[i]==S[N-i-1]:
        counter+=1
for i in range(int((n-1)/2)):
    if S[i]==S[n-i-1] and S[i+n+2-1]==S[N-i-1]:
        counter1+=1
if n>=3 and counter==n and counter1==int((n-1)/2):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
sentence = input()

def check_kaibun(char_list):
    result = 0
    compare_list = list(reversed(char_list))
    for i in range(len(char_list)):
        if char_list[i] != compare_list[i]:
            result = result - 1

    if result == 0:
        return True
    else:
        return False


first_half = int((len(sentence) - 1) / 2)
second_half = int((len(sentence) + 1) / 2)
last_char = len(sentence)


if len(sentence) % 2 != 0 and 3 <= len(sentence) <= 99:
    if check_kaibun(list(sentence[0:first_half])) == True and check_kaibun(list(sentence[second_half:last_char])) == True:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
sentence = input()

def check_kaibun(char_list):
    result = 0
    compare_list = list(reversed(char_list))
    for i in range(len(char_list)):
        if char_list[i] != compare_list[i]:
            result = result - 1

    if result == 0:
        return True
    else:
        return False

first_half = int((len(sentence) - 1) / 2)
second_half = int((len(sentence) + 1) / 2)
last_char = len(sentence)

if check_kaibun(list(sentence[0:first_half])) == True and check_kaibun(list(sentence[second_half:last_char])) == True and len(sentence) % 2 != 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
sentence = input()

def check_kaibun(char_list):
    result = 0
    compare_list = list(reversed(char_list))
    for i in range(len(char_list)):
        if char_list[i] != compare_list[i]:
            result = result - 1

    if result == 0:
        return True
    else:
        return False

first_half = int((len(sentence) - 1) / 2)
second_half = int((len(sentence) + 1) / 2)
last_char = (len(sentence) + 1) - 1

if check_kaibun(list(sentence[0:first_half])) == True and check_kaibun(list(sentence[second_half:last_char])) == True and len(sentence) % 2 != 0 and sentence.islower() == True and 3 <= len(sentence) <= 99:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()

ans = 'Yes'

if s != s[::-1]:
  ans = 'No'
  
if s[:(len(s) - 1)//2] != s[(len(s) - 1)//2::-1]:
  ans = 'No'
  
if s[:(len(s) + 3)//2] != s[(len(s) + 3)//2::-1]:
  ans = 'No'
  
  
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()

ans = 'Yes'

if s != s[::-1]:
  ans = 'No'
  
if s[:(len(s) - 1)//2] != s[(len(s) - 1)//2:]:
  ans = 'No'
  
if s[:(len(s) + 3)//2] != s[(len(s) + 3)//2:]:
  ans = 'No'
  
  
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()

ans = 'Yes'

if s != s[::-1]:
  ans = 'No'
  
if s[:(len(s) - 1)//2] != s[(len(s) - 1)//2:]:
  ans = 'No'
  
if s[:(len(s) + 3)//2] != s[(len(s) + 1)//2:]:
  ans = 'No'
  
  
print(ans)

Submission status: Wrong Answer

Solution code:
sentence = input()

def check_kaibun(char_list):
    result = 0
    compare_list = list(reversed(char_list))
    for i in range(len(char_list)):
        if char_list[i] != compare_list[i]:
            result = result - 1

    if result == 0:
        return True
    else:
        return False

first_half = int((len(sentence) - 1) / 2)
second_half = int((len(sentence) + 1) / 2)
last_char = (len(sentence) + 1) - 1

if check_kaibun(list(sentence[0:first_half])) == True and check_kaibun(list(sentence[second_half:last_char])) == True and len(sentence) % 2 != 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
sentence = list(input())
sentence_length = len(sentence)
flag = 0

if sentence_length % 2 != 0:
    flag = flag + 1

first_half = int((sentence_length - 1) / 2)
first_flag = 0

for i in range(first_half):
    first_half = first_half - 1 
    if i >= first_half:
        break    
    first_flag = 1
    if sentence[i] != sentence[first_half]:
        first_flag = 0
        break

if first_flag == 1:
    flag = flag + 1

second_half = int((sentence_length + 3) / 2)
second_flag = 0

for i in range(second_half,sentence_length):
    sentence_length = sentence_length - 1 
    num = i - 1
    if i >= sentence_length:
        break    
    second_flag = 1
    if sentence[num] != sentence[sentence_length]:
        second_flag = 0
        break

if second_flag == 1:
    flag = flag + 1

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