Problem:


Score : 200 points

Problem Statement

A string S of an odd length is said to be a strong palindrome if and only if all of the following conditions are satisfied:

S is a palindrome.

Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome.

The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome.

Determine whether S is a strong palindrome.

Constraints

S consists of lowercase English letters.

The length of S is an odd number between 3 and 99 (inclusive).

Input

Input is given from Standard Input in the following format:

S

Output

If S is a strong palindrome, print Yes;
otherwise, print No.

Sample Input 1

akasaka

Sample Output 1

Yes

S is akasaka.

The string formed by the 1-st through the 3-rd characters is aka.

The string formed by the 5-th through the 7-th characters is aka.
All of these are palindromes, so S is a strong palindrome.

Sample Input 2

level

Sample Output 2

No

Sample Input 3

atcoder

Sample Output 3

No



Sample input:
akasaka


Sample output:
Yes

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
a=[]
b=[]
c=[]
d=[]

for i in range((N-1)//2):
    if((N-1)//2%2==1):
        if((N-1)//4>i ):
            a.append(S[i])

        elif((N-1)//4!=i):
            b.append(S[i])
    else:

        if((N-1)//4>i ):
            a.append(S[i])

        elif((N-1)//4==i):
            b.append(S[i])

        elif((N-1)//4!=i):
            b.append(S[i])

if(a==b):
    if(S==S[::-1]):

        print('Yes')
    else:
        print('No')
    exit(0)

    for i in range((N+3)//2-1,N):
        if(((N+3)//2-1+N)//2>i ):
            c.append(S[i])
        elif(((N+3)//2-1+N)//2!=i):
            d.append(S[i])
    if(c==d):
        if(S==S[::-1]):

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

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
a=[]
b=[]
c=[]
d=[]

for i in range((N-1)//2):
    if((N-1)//2%2==1):
        if((N-1)//4>i ):
            a.append(S[i])

        elif((N-1)//4!=i):
            b.append(S[i])
    else:
        print('a')
        if((N-1)//4>i ):
            a.append(S[i])

        elif((N-1)//4==i):
            b.append(S[i])

        elif((N-1)//4!=i):
            b.append(S[i])
print(a)
print(b)
if(a==b):
    if(S==S[::-1]):

        print('Yes')
    else:
        print('No')
    exit(0)

    for i in range((N+3)//2-1,N):
        if(((N+3)//2-1+N)//2>i ):
            c.append(S[i])
        elif(((N+3)//2-1+N)//2!=i):
            d.append(S[i])
    if(c==d):
        if(S==S[::-1]):

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

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
a=[]
b=[]
c=[]
d=[]

for i in range((N-1)//2):
    if((N-1)//2%2==1):
        if((N-1)//4>i ):
            a.append(S[i])

        elif((N-1)//4!=i):
            b.append(S[i])
    else:
        
        if((N-1)//4>i ):
            a.append(S[i])

        elif((N-1)//4==i):
            a.append(S[i])

        elif((N-1)//4!=i):
            b.append(S[i])
if(a==b):
    if(S==S[::-1]):

        print('Yes')
    else:
        print('No')
    exit(0)

    for i in range((N+3)//2-1,N):
        if(((N+3)//2-1+N)//2>i ):
            c.append(S[i])
        elif(((N+3)//2-1+N)//2!=i):
            d.append(S[i])
    if(c==d):
        if(S==S[::-1]):

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
a=[]
b=[]
c=[]
d=[]

for i in range((N-1)//2):
    if((N-1)//2%2==1):
        if((N-1)//4>i ):
            a.append(S[i])

        elif((N-1)//4!=i):
            b.append(S[i])
    else:
        if((N-1)//4>i ):
            a.append(S[i])

        elif((N-1)//4==i):
            b.append(S[i])

        elif((N-1)//4!=i):
            b.append(S[i])
if(a==b):
    if(S==S[::-1]):

        print('Yes')
    else:
        print('No')
    exit(0)

    for i in range((N+3)//2-1,N):
        if(((N+3)//2-1+N)//2>i ):
            c.append(S[i])
        elif(((N+3)//2-1+N)//2!=i):
            d.append(S[i])
    if(c==d):
        if(S==S[::-1]):

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

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
a=[]
b=[]
c=[]
d=[]

for i in range((N-1)//2):
    if((N-1)//2%2==1):
        if((N-1)//4>i ):
            a.append(S[i])

        elif((N-1)//4!=i):
            b.append(S[i])
    else:
        if((N-1)//4>i ):
            a.append(S[i])

        elif((N-1)//4!=i):
            ka=0

        elif((N-1)//4!=i):
            b.append(S[i])
if(a==b):
    if(S==S[::-1]):

        print('Yes')
    else:
        print('No')
    exit(0)

    for i in range((N+3)//2-1,N):
        if(((N+3)//2-1+N)//2>i ):
            c.append(S[i])
        elif(((N+3)//2-1+N)//2!=i):
            d.append(S[i])
    if(c==d):
        if(S==S[::-1]):

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

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
a=[]
b=[]
c=[]
d=[]

for i in range((N-1)//2):
    if((N-1)//2%2==0):
        if((N-1)//4>i ):
            a.append(S[i])

        elif((N-1)//4!=i):
            b.append(S[i])
    else:
        if((N-1)//4>i ):
            a.append(S[i])

        elif((N-1)//4!=i):
            ka=0
            
        elif((N-1)//4!=i):
            b.append(S[i])
if(a==b):
    if(S==S[::-1]):

        print('Yes')
    else:
        print('No')
    exit(0)

    for i in range((N+3)//2-1,N):
        if(((N+3)//2-1+N)//2>i ):
            c.append(S[i])
        elif(((N+3)//2-1+N)//2!=i):
            d.append(S[i])
    if(c==d):
        if(S==S[::-1]):

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

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
a=[]
b=[]
c=[]
d=[]

for i in range((N-1)//2):
    if((N-1)//4>i ):
        a.append(S[i])
    elif((N-1)//4!=i):
        b.append(S[i])
if(a==b):
    if(S==S[::-1]):

        print('Yes')
    else:
        print('No')
    exit(0)

    for i in range((N+3)//2-1,N):
        if(((N+3)//2-1+N)//2>i ):
            c.append(S[i])
        elif(((N+3)//2-1+N)//2!=i):
            d.append(S[i])
    if(c==d):
        if(S==S[::-1]):

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

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
a=[]
b=[]
c=[]
d=[]

for i in range((N-1)//2):
    if((N-1)//4>i ):
        a.append(S[i])
    elif((N-1)//4!=i):
        b.append(S[i])
if(a==b):
    if(S==S[::-1]):
    
        print('Yes')
    else:
        print('No')

    for i in range((N+3)//2-1,N):
        if(((N+3)//2-1+N)//2>i ):
            c.append(S[i])
        elif(((N+3)//2-1+N)//2!=i):
            d.append(S[i])
    if(c==d):
        if(S==S[::-1]):

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

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
a=[]
b=[]
c=[]
d=[]

for i in range((N-1)//2):
    if((N-1)//4>i ):
        a.append(S[i])
    elif((N-1)//4!=i):
        b.append(S[i])
if(a==b):

    for i in range((N+3)//2-1,N):
        if(((N+3)//2-1+N)//2>i ):
            c.append(S[i])
        elif(((N+3)//2-1+N)//2!=i):
            d.append(S[i])
    if(c==d):
        if(S==S[::-1]):

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

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
a=[]
b=[]
c=[]
d=[]

for i in range((N-1)//2):
    if((N-1)//4>i ):
        a.append(S[i])
    elif((N-1)//4!=i):
        b.append(S[i])
if(a==b):
    for i in range((N+3)//2-1,N):
        if(((N+3)//2-1+N)//2>i ):
            c.append(S[i])
        elif(((N+3)//2-1+N)//2!=i):
            d.append(S[i])
    if(c==d):
        if(S==S[::-1]):

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

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
a=[]
b=[]
c=[]
d=[]

for i in range((N-1)//2):
    if((N-1)//4>i ):
        a.append(S[i])
    elif((N-1)//4!=i):
        b.append(S[i])
if(a==b):
    for i in range((N+3)//2-1,N):
        if(((N+3)//2-1+N)//2>i ):
            c.append(S[i])
        elif(((N+3)//2-1+N)//2!=i):
            d.append(S[i])
    if(c==d):
        print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import math
S = input()
N = len(S)
flag = True

leftS = S[0:math.floor((N - 1)/2)]
rightS = S[math.floor((N + 3)/2) - 1:N]

def isPalindrome(str):
    N =len(str)
    flag = True
    for i in range(0,math.floor(N/2)):
        if str[i] != str[(N-1) - i]:
            flag = False
            break
    return flag

flag = isPalindrome(S)
flag = isPalindrome(leftS)
flag = isPalindrome(rightS)

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

Submission status: Wrong Answer

Solution code:
S = list(input())
n = (len(S)-1)//2
for i in range(n):
  if S[i] == S[-(i+1)] and S[i] == S[i+n+1]:
    continue
  else:
    print('No') 
print('Yes')

Submission status: Wrong Answer

Solution code:
S = list(input())
n = (len(S)-1)//2
for i in range(n):
  if S[i] == S[-(i+1)]:
    continue
  else:
    print('No')
print('Yes')

Submission status: Wrong Answer

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

if S == S_rvs and S[:left] == S_rvs[right:] and S[right:] == S_rvs[:left]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

match = True
if not(S == S_rvs):
    match = False
elif not(S[:left] == S_rvs[right:]):
    match = False
elif not(S[right:] == S_rvs[:left]):
    match = False

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

Submission status: Wrong Answer

Solution code:
S=str(input())
N=len(S)
M=int((N-1)/2)
# print(M)
sum=0
for i in range(M):
    # print("debug",i,M-i-1)
    if S[i]==S[M-i-1]:
        sum += 1
for i in range(M+1,N):
    # print("debug",i,N+M-i)
    if S[i]==S[N+M-i]:
        sum += 1
if sum==(N-1):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S=str(input())
N=len(S)
M=int((N-1)/2)
sum=0
for i in range(M):
    if S[i]==S[M-i-1]:
        sum += 1
for i in range(M+1,N):
    if S[i]==S[M-i]:
        sum += 1
if sum==(N-1):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S=str(input())
N=len(S)
M=int((N-1)/2)
sum=0
for i in range(M):
    if S[i]==S[M-i-1]:
        sum += 1
for i in range(M+1,N):
    if S[i]==S[M-i]:
        sum += 1
if sum==N-1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
for i in range(n//4):
    if s[i] != s[n//2-1]:
        print('NO')
        break
else:
    if s[:n//2] == s[n//2+1:]:
        print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

Solution code:
s=list(input())
t=list(reversed(s))
p=s[:(len(s) - 1) // 2]
q=list(reversed(p))
r=s[(len(s) - 1) // 2:]
u=list(reversed(r))
if s == t:
    if p == q:
        if r == s:
            print("Yes")        
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s=list(input())
t=list(reversed(s))
p=s[:(len(s) - 1) // 2]
q=list(reversed(p))
if s == t:
    if p == q:
        print("Yes")        
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s=list(input())
t=list(reversed(s))
p=s[0:round(len(s)/2)-1]
q=list(reversed(p))
if s == t:
    if p == q:
        print("Yes")        
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s=input()
i=0
j=0
k=0
s1=s[0:len(s)//2]
s2=s[len(s)//2+1:]
while(i<len(s)//2):
    if s[i]!=s[-i-1]:
        break
    i+=1
while(j<len(s1)//2):
    if s[j]!=s[-j-1]:
        break
    j+=1
while(k<len(s2)//2):
    if s[k]!=s[-k-1]:
        break
    k+=1
if i==len(s)//2 and j==len(s1)//2 and k==len(s2)//2 and len(s1)%2==1 and len(s2)%2==1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s=input()
i=0
j=0
k=0
s1=s[0:len(s)//2]
s2=s[len(s)//2+1:]
while(i<len(s)//2):
    if s[i]!=s[-i-1]:
        break
    i+=1
while(j<len(s1)//2):
    if s[j]!=s[-j-1]:
        break
    j+=1
while(k<len(s2)//2):
    if s[k]!=s[-k-1]:
        break
    k+=1
if i==len(s)//2 and j==len(s1)//2 and k==len(s2)//2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s=input()
i=0
j=0
k=0
s1=s[0:len(s)//2]
s2=s[len(s)//2+1:]
if len(s)%2==1:
    while(i<len(s)//2):
        if s[i]!=s[-i-1]:
            break
        i+=1
    while(j<len(s1)//2):
        if s[j]!=s[-j-1]:
            break
        j+=1
    while(k<len(s2)//2):
        if s[k]!=s[-k-1]:
            break
        k+=1
    if i==len(s)//2 and j==len(s1)//2 and k==len(s2)//2:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s=input()
i=0
if len(s)%2==1:
    while(i<len(s)//2):
        if s[i]!=s[-i-1]:
            break
        i+=1
    if i==len(s)//2:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s=input()
i=0
while(i<len(s)//2):
    if s[i]!=s[-i-1]:
        break
    i+=1
if i==len(s)//2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s =input()
l = len(s)+1
s = list(s)
revs=s[::-1]



if s[:int((l-1)/2)] == revs[:int((l-1)/2)] and s[:int((l+3)/2)] == revs[:int((l+3)/2)] and s == revs:
    print('Yes')
else: 
    print('No')

Submission status: Wrong Answer

Solution code:
s =input()
l = len(s)
s = list(s)
revs=s[::-1]



if s[int((l-1)/2):] == s[:int((l-1)/2)] and s[:int((l+3)/2)] == revs[int((l+3)/2):] and s == revs:
    print('Yes')
else: 
    print('No')

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

Solution code:

s =input()
s = list(s)


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

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
mae = (n-1)//2
usiro = (n+3)//2

for i in range(mae):
  if s[i] != s[mae-1-i]:
    print("No")
    exit()
    
for i in range(usiro-1, n):
  if s[i] != s[n-1+usiro-1-i]:
    print("No")
    exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
moji = list(input())
length = len(moji)
count = 0
m = n = 0

for i in range(int(length/2-1)):
    if moji[i] != moji[length-i-1]:
        count += 1
k = (length-1)//2-1
for i in range(int((length-1)/2-1)):
    if moji[i] != moji[k-n]:
        count += 1
    n += 1
n = (length+3-1)/2 
for n in range(int(length-1)):
    if moji[n] != moji[length-1-m]:
        count += 1
    m += 1
if count == 0:
    print("Yes")

Submission status: Wrong Answer

Solution code:
moji = list(input())
length = len(moji)
count = 0
m = n = 0

for i in range(int(length/2-1)):
    if moji[i] != moji[length-i-1]:
        count += 1
k = (length-1)//2-1
for i in range(int((length-1)/2-1)):
    if moji[i] != moji[k-n]:
        count += 1
    n += 1
n = (length+3-1)/2 
for n in range(int(length-1)):
    if moji[n] != moji[length-1-m]:
        count += 1
    m += 1
if count == 0:
    print("Yes")
else:
    print(count)

Submission status: Wrong Answer

Solution code:
S=[i for i in input()]
if S[:int(len(S)/2)]==S[int(len(S)/2)+1:]:
    head_S=S[:int(len(S)/2)]
    tail_S=S[int(len(S)/2)+1:]
    if head_S[:int(len(head_S) / 2)] == head_S[int(len(head_S) / 2) + 1:] and tail_S[:int(len(tail_S) / 2)] == tail_S[int(len(tail_S) / 2) + 1:]:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if S[0:(N-1)//2] == ''.join(list(reversed(S[0:(N-1)//2]))):
    if S[(N+3)//2-1:N] == ''.join(list(reversed(S[(N+3)//2-1:N]))):
        print('Yes')
        exit()

print('No')

Submission status: Wrong Answer

Solution code:
# AtCoder
S = input()
N = len(S)
if S[0:int((N-1)/2)] == ''.join(list(reversed(S[0:int((N-1)/2)]))):
    if S[int((N+3)/2-1):N] == ''.join(list(reversed(S[int((N+3)/2-1):N]))):
        print('Yes')
        exit()

print('No')

Submission status: Wrong Answer

Solution code:
String=input()
A=list(String)
N=len(A)
A_1=A[:int((N-1)/2)]
A_2=A[int((N+3)/2)-1:]
if A==A[::-1] and A_1==A_1[::-1] and A_2==A_2[::-1]:
  print("Yes")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
String=input()
A=list(String)
N=len(A)
A_1=A[:int((N-1)/2)]
A_2=A[int((N+3)/2)-1:]
print(A)
print(A_1)
print(A_2)
if A==A[::-1] and A_1==A_1[::-1] and A_2==A_2[::-1]:
  print("Yes")
else:
  print("NO")

Submission status: Wrong Answer

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

def plindrome_checker(strings):
    result = True
    length = len(strings)
    for k in range(length):
        if (strings[k] == strings[length-1-k]):
            pass
        else:
            result = False
    return result

str1 = plindrome_checker(S[0:(N-1)//2])
str2 = plindrome_checker(S[(N-1)//2+1:])

if(str1 and str2):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

pre = S[0 : int((N-1)/2)]
print(pre)
bck = S[int((N+1)/2) : N]
print(bck)

if S == S[::-1] and pre == pre[::-1] and bck == bck[::-1]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S=input() #akasaka
N=len(S) #7 (0123456)
yesno='Yes'

if N == 3:
    if S[0] == S[2]:
        yesno='Yes'
else:
    if N//2 ==1:
        for i in range(int((N-1)/2)):
            if S[i] != S[N-1-i]:
                yesno='No'
    else:
        yesno='No' 

    S1=S[:int((N-1)/2)]
    print(S1)
    N1=len(S1)
    if N1//2 ==1:
        for i in range(int((N1-1)/2)):
            if S1[i] != S1[N1-1-i]:
                yesno='No'
    else:
        yesno='No'

    S2=S[int((N+1)/2):]
    print(S2)
    N2=len(S2)
    if N2//2 ==1:
        for i in range(int((N2-1)/2)):
            if S2[i] != S2[N2-1-i]:
                yesno='No'
    else:
        yesno='No'
    
print(yesno)

Submission status: Wrong Answer

Solution code:
S=input() #akasaka
N=len(S) #7 (0123456)
yesno='Yes'
if N//2 ==1:
    for i in range(int((N-1)/2)):
        if S[i] != S[N-1-i]:
            yesno='No'
else:
    yesno='No' 
        
S1=S[:int((N-1)/2)]
#print(S1)
N1=len(S1)
if N1//2 ==1:
    for i in range(int((N1-1)/2)):
        if S1[i] != S1[N1-1-i]:
            yesno='No'
else:
    yesno='No'
    
S2=S[int((N+1)/2):]
#print(S2)
N2=len(S2)
if N2//2 ==1:
    for i in range(int((N2-1)/2)):
        if S2[i] != S2[N2-1-i]:
            yesno='No'
else:
    yesno='No'
    
print(yesno)

Submission status: Wrong Answer

Solution code:
S=input() #akasaka
N=len(S) #7 (0123456)
yesno='Yes'
for i in range(int((N-1)/2)):
    if S[i] != S[N-1-i]:
        yesno='No'
S1=S[:int((N-1)/2)]
N1=len(S1)
for i in range(int((N1-1)/2)):
    if S1[i] != S1[N1-1-i]:
        yesno='No'
S2=S[int((N+3)/2):]
N2=len(S2)
for i in range(int((N2-1)/2)):
    if S2[i] != S2[N2-1-i]:
        yesno='No'
print(yesno)

Submission status: Wrong Answer

Solution code:
s = input()

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

m = len(s_1)
if s_1 == s_2 and s_1[:(m // 2)] == s_1[-(m // 2):]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = str(input())
n = len(s)
middle = (n-1)//2
quarter = (middle-1)//2

palindrome = True

if n < 7:
    for i in range(0,middle):
        if not s[i] == s[-i-1]:
            print('No')
            palindrome = False
    if palindrome:
        if n == 3:
            print('Yes')
        if n == 5:
            if s[0] == s[-1] and s[1] == s[-2]:
                print('Yes')
            else:
                print('No')



elif n >= 7:


    for i in range(0,quarter,1):
        if not s[i] == s[-i-1] and s[i] == s[middle-i-1] and s[i] == s[middle+i+1]:
            print('No')
            palindrome = False
            break

    if palindrome:
        if quarter != 0 and s[quarter] == s[-quarter-1]:
            print('Yes')
        else:
            print('No')

Submission status: Wrong Answer

Solution code:
s = str(input())
n = len(s)
middle = (n-1)//2
quarter = (middle-1)//2

palindrome = True

for i in range(0,quarter,1):
    if not s[i] == s[-i-1] and s[i] == s[middle-i-1] and s[i] == s[middle+i+1]:
        print('No')
        palindrome = False
        break

if palindrome:
    if quarter != 0 and s[quarter] == s[-quarter-1]:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
import sys
s = sys.stdin.readline()
i = 0
l = len(s)
flag = True
while flag and i <= l:
  if s[i] != s[l-1]:
    flag = False
  i += 1
  l -= 1
l = len(s)
a = s[0:-(-(l-1)//2)]
i = 0
l = len(a)
while flag and i <= l:
  if a[i] != a[l-1]:
    flag = False
  i += 1
  l -= 1
b = s[(len(s) + 3)//2 - 1:]
i = 0
l = len(b)
while flag and i <= l:
  if b[i] != b[l-1]:
    flag = False
  i += 1
  l -= 1
if flag:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
import sys
s = sys.stdin.readline()
i = 0
l = len(s)
flag = True
while flag and i <= l:
  if s[i] != s[l-1]:
    flag = False
  i += 1
  l -= 1
l = len(s)
a = s[0:(l-1)//2]
i = 0
l = len(a)
while flag and i <= l:
  if a[i] != a[l-1]:
    flag = False
  i += 1
  l -= 1
b = s[(len(s) + 3)//2 - 1:]
i = 0
l = len(b)
while flag and i <= l:
  if b[i] != b[l-1]:
    flag = False
  i += 1
  l -= 1
if flag:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

if N == 3:
    if S[0] == S[1] and S[0] == S[2]:
        print('Yes')
    else:
        print('No')
    exit()

def is_circular(string):
    reverse = string[::-1]
    if string == reverse:
        return True
    else:
        return False

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

Submission status: Wrong Answer

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

s1 = [s[i] for i in range((n-1)//2)]
s2 = [s[i] for i in range((n+3)//2-1, n)]

s1r = list(reversed(s1))
s2r = list(reversed(s2))

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

Submission status: Wrong Answer

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

s1 = [s[i] for i in range((n-1)//2)]
s2 = [s[i] for i in range((n+3)//2-1, n)]

s1r = list(reversed(s1))
s2r = list(reversed(s2))

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

Submission status: Wrong Answer

Solution code:
S = list(input())
M = len(S) // 2
if S == S[::-1] and S[:M] == S[:M:-1]:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
#coding:utf-8

s = str(input())

n = len(s)

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
s = input()

def is_palindrome(s):
    return s == s[::-1]

n = len(s)
#print(len(s))

if not is_palindrome(s):
    print("No")
    exit()

if not is_palindrome(s[:(n - 1) // 2]):
    print("No")
    exit
    
if not is_palindrome(s[(n + 3) // 2 - 1]):
    print("No")
    exit

print("Yes")

Submission status: Wrong Answer

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

s = input()
n = len(s)
# print(s[:int((n - 3) / 4)])
# print(s[int((n - 1) / 2 - 1):int((n + 5) / 4 - 2):-1])
# print(s[:int((n - 1) / 2)])
# print(s[:int((n + 3) / 2 - 2):-1])
if kaibun(s) and kaibun(s[:int((n - 1) / 2)]) and kaibun(s[int((n + 3) / 2 - 1):n]):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=list(input())
#s=['l','e','v','e','l']
L=int((len(s)-1)/2)
f1=0
for i in range(L-1):
    if s[0+i]==s[len(s)-i-1]:
        pass
        print('here1')
    else:
        f1+=1
        print('here2')
        
LL=L//2
f2=0
if f1==0:
    for j in range(LL):
        if s[0+j]==s[L-j-1]:
            pass
            print('here3')
        else:
            f2+=1
            print('here4')
else:
    f2=1
if f1==0 and f2==0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s=list(input())
#s=['l','e','v','e','l']
L=int((len(s)-1)/2)
f1=0
for i in range(L-1):
    if s[0+i]==s[len(s)-i-1]:
        pass
        print('here1')
    else:
        f1+=1
        print('here2')
        
LL=L//2
f2=0
if f1==0:
    for j in range(LL):
        if s[0+j]==s[L-i-1]:
            pass
            print('here3')
        else:
            f2+=1
            print('here4')
else:
    f2=1
if f1==0 and f2==0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:

s=['a','b','a','d','a','b','a']
L=int((len(s)-1)/2)
f1=0
for i in range(L-1):
    if s[0+i]==s[len(s)-i-1]:
        pass
    else:
        f1+=1
        
LL=L//2
f2=0
if f1==0:
    for j in range(LL):
        if s[0+j]==s[L-i]:
            pass
    else:
        f2+=1

if f1==0&f2==0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = list(input())
n = len(s)
n_dash = int(n*0.5)
for i in range(n):
    if s[i] == s[n-i-1]:
        pass
    else:
        break
for j in range(n_dash):
    if s[j] == s[n_dash-j-1]:
        result = 'Yes'
    else:
        result = 'No'
        break
print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
st = input()

n = len(st)
half = (n-1)//2

if st[0:half] == st[n-1:half:-1]:
  if half%2 == 0:
    qu = half//2
    if st[:qu] == st[half-1:qu-1:-1] and st[half+1:half+qu+1] == st[n-1:half+qu:-1]:
      print("Yes")
  else:
    qu = (half-1)//2
    if st[:qu] == st[half-1:qu:-1] and st[half+1:half+qu+1] == st[n-1:half+qu+1:-1]:
      print("Yes")
      
else:
  print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
print('Yes')

Submission status: Wrong Answer

Solution code:
S = list(input())
N = len(S)
cnt1 = 0
cnt2 = 0
for i in range(1,(int((N-1)/2)+1)):
    if S[i-1] == S[N-i] :
        cnt1 += 1
for i in range(1,int(((((N-1)/2)-1)/2)+1)):
    if S[i-1] == S[int(((N-1)/2)-i)]:
        cnt2 += 1
if cnt1 == (N-1)/2 and cnt2 == (((N-1)/2)-1)/2:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)#7
a = 0
f = (N-1)//2
for i in range(f):
    if S[i] !=S[f-i-1]:
        a = 1
b = 0
for j in range((N+3)//2-1,N):
    b += 1
    if S[j] != S[N-b]:
        a = 1
if a == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S=input()
K1=int((len(S)-1)/2)
K2=int((K1-1)/2)
K3=int((len(S)+3)/2)

#1
S_K1=S[:K1]
S_K1_r=S[:K1:-1]

#2
S_K2=S_K1[:K2]
S_K2_r=S_K1[:K2:-1]
#len(S_K2)>=3

#3
S_K3=S[K3-1:]
#len(S_K3)>=3
num3=int((len(S_K3)-1)/2)
S_K4=S_K3[:num3]
S_K4_r=S_K3[:num3:-1]

if S_K1==S_K1_r  and (S_K2==S_K2_r and len(S_K2)>2) and (S_K4 == S_K4_r and len(S_K3)>2):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
S=input()
K1=int((len(S)-1)/2)
K2=int((K1-1)/2)
K3=int((len(S)+3)/2)

#1
S_K1=S[:K1]
S_K1_r=S[:K1:-1]

#2
S_K2=S_K1[:K2]
S_K2_r=S_K1[:K2:-1]

#3
S_K3=S[K3-1:]
num3=int((len(S_K3)-1)/2)
S_K4=S_K3[:num3]
S_K4_r=S_K3[:num3:-1]

if S_K1==S_K1_r and S_K2==S_K2_r and S_K4 == S_K4_r:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
a = len(s)
b_s = s[::-1]

n_s = s[:3]
nn_s = n_s[::-1]

n_b = b_s[:3]
nn_b = n_b[::-1]
if n_b == nn_b and n_s == nn_s:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
a = len(s)
b_s = s[::-1]
if s[:(a-1)//2] == b_s[:(a-1)//2]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
cnt = 0
N = len(S)
for i in range(int((N-3)/2)):
    if S[i] == S[N-i-1]:
        cnt += 1
    else:
        pass
if cnt == (N-3)/2 and N % 4 != 1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input().split()
n = len(s)
hn = n//2
flag = True

for i in range(hn):
    if (not s[i] == s[n-i]) or (not s[i] == s[hn-i]):
        flag = False
        print("No")
        break

if flag:
    print("Yes")

Submission status: Wrong Answer

Solution code:
s = input().split()
n = len(s)
hn = n//2
flag = True

for i in range(hn):
    if (not s[i] == s[n-i]) or (not s[i] == s[hn-i]):
        flag = False
        print("No")
        break

print("Yes")

Submission status: Wrong Answer

Solution code:
S = input()


def iskai(x):
  cnt=0
  for i in range(len(x)//2):
    if x[i] == x[len(x)-1-i]:
      cnt += 1
 
  if cnt == len(x)//2:
    return(True)
  else:
    return(False)
  
print(iskai(S))

Submission status: Wrong Answer

Solution code:
S = input()
L = len(S)
cnt=0

if L < 7:
  print("No")
  exit()
  
for i in range(len(S)//2):
  if S[i] == S[L-1-i]:
    cnt += 1

if cnt == L//2:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S = input()

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

flag = True

flag = isKaibun(S)
flag = isKaibun(S[0 : len(S) // 2])
flag = isKaibun(S[(len(S) + 1) // 2 : len(S)])

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