TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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.

Submission attempts (in order):
s = input()
t = s[::-1]
n = len(S)
a = s[:(N - 1) // 2]
b = t[:(n + 3) // 2]

if s == t and a == a[::-1] and b == b[::-1]:
    print('Yes')
else:
    print('No')

s = input()
t = s[::-1]
n = len(s)
a = s[:(N - 1) // 2]
b = t[:(n + 3) // 2]

if s == t and a == a[::-1] and b == b[::-1]:
    print('Yes')
else:
    print('No')

s = input()
t = s[::-1]
n = len(s)

if n <=5 or s == t:
  print('No')
  exit()

for i in range(0, (n - 1)//2, 2):
    if s[i] != t[i]:
        print('No')
        exit()
print('Yes')

s = input()
t = s[::-1]
n = len(s)
a = s[:(n - 1) // 2]
b = t[:(n - 1) // 2]

if s == t and a == a[::-1] and b == b[::-1]:
    print('Yes')
else:
    print('No')

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: 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.

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



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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
from scipy.special import comb

gusu, kisu = input().split()
gusu = int(gusu) 
kisu = int(kisu) 
gusu_num = comb(gusu, 2, exact=True)
kisu_num = comb(kisu, 2, exact=True)
print(gusu_num + kisu_num)

seq = input()
if seq[:int((len(seq) - 1) / 2)] == seq[:int((len(seq) - 1) / 2)][::-1]:
    print()
    if seq[int((len(seq) + 3) / 2) - 1:] == seq[int((len(seq) + 3) / 2) - 1:][::-1]:
        print("Yes")
else:
    print("No")

seq = input()
if seq == seq[::-1]:
    if seq[:int((len(seq) - 1) / 2)] == seq[:int((len(seq) - 1) / 2)][::-1]:
        if seq[int((len(seq) + 3) / 2) - 1:] == seq[int((len(seq) + 3) / 2) - 1:][::-1]:
            # print(seq[int((len(seq) + 3) / 2) - 1:])
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
l = len(S)
import sys
a = S[:((l-1)//2)]


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

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

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

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

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

print('Yes')

S = input()
l = len(S)
import sys
a = S[:(l-1)//2]
b = S[((l+3)//2)-1:l]

for i in range(len(a)//2):
    if str(a[i])==str(a[-i-1]):
        pass
    else:
        print('No')
        sys.exit(0)


for j in range(len(b)//2):

    if b[j]==b[-j-1]:
        pass
    else:
        print('No')
        sys.exit(0)


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

print('Yes')

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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))

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import sys
input = sys.stdin.readline
S = input()
Sr=''.join(list(reversed(S)))
N=len(S)
S1=S[:int((N-1)/2)]
S1r=''.join(list(reversed(S1)))
S2=S[int((N+3)/2)-1:]
S2r=''.join(list(reversed(S2)))
if S==Sr and S1 ==S1r and S2==S2r:
    print('Yes')
else:
    print('No')

import sys
input = sys.stdin.readline
S = input().strip()
Sr=''.join(list(reversed(S)))
N=len(S)
S1=S[:int((N-1)/2)]
S1r=''.join(list(reversed(S1)))
S2=S[int((N+3)/2)-1:]
S2r=''.join(list(reversed(S2)))
if S==Sr and S1 ==S1r and S2==S2r:
    print('Yes')
else:
    print('No')

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()

n = len(s)
a = (n - 1) // 2
b = (n + 3) // 2

s_reverse = s[::-1]

s_first = s[:a]
s_first_reverse = s_first[::-1]

s_second = s[b-1:]
s_second_reverse = s_second[::-1]

if s == s_reverse and s_first = s_first_reverse and s_second = s_second_reverse:
  print('Yes')
else:
  print('No')

s = input()

n = len(s)
a = (n - 1) // 2
b = (n + 3) // 2

s_reverse = s[::-1]

s_first = s[:a]
s_first_reverse = s_first[::-1]

s_second = s[b-1:]
s_second_reverse = s_second[::-1]

if s == s_reverse and s_first == s_first_reverse and s_second == s_second_reverse:
  print('Yes')
else:
  print('No')


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
S=str(input())
import sys
t=0
lista=[]
for i in range(99):
  try:
    lista.append(S[i])
    t=t+1
  except IndexError:
    break
u=t//2
v=u//2+1
p=1
for i in range(v):
  if S[i]==S[u-i-1] and S[u-i+1]==S[u+i+1] and S[u+i+1]==S[t-1-i]:
    p=p*1
  else:
    print ('No')
    sys.exit()
print ('Yes')

S=str(input())
import sys
t=0
lista=[]
for i in range(99):
  try:
    lista.append(S[i])
    t=t+1
  except IndexError:
    break
print (t)
u=t//2
v=u//2+1
p=1
for i in range(v):
  if S[i]==S[u-i-1]:
    p=p*1
  else:
    print ('No')
    sys.exit()
for j in range(v):
  if S[u+j+1]==S[t-1-j]:
    p=p*1
  else:
    print ('No')
    sys.exit()
if t>3:
  print ('Yes')
else:
  if S[0]=S[2]:
    print ('Yes')
  else:
    print ('No')

S=str(input())
import sys
t=0
lista=[]
for i in range(99):
  try:
    lista.append(S[i])
    t=t+1
  except IndexError:
    break
u=t//2
v=u//2+1
p=1
for i in range(v):
  if S[i]==S[u-i-1] and S[u-i+1]==S[u+i+1] and S[u+i+1]==S[t-1-i]:
    p=p*1
  else:
    print ('No')
    sys.exit()
print ('Yes')

S=str(input())
import sys
t=0
lista=[]
for i in range(99):
  try:
    lista.append(S[i])
    t=t+1
  except IndexError:
    break
u=t//2
v=u//2+1
p=1
for i in range(v):
  if S[i]==S[u-i-1]:
    p=p*1
  else:
    print ('No')
    sys.exit()
for j in range(v):
  if S[u+j+1]==S[t-1-j]:
    p=p*1
  else:
    print ('No')
    sys.exit()
if t>3:
  print ('Yes')
else:
  if S[0]=S[2]:
    print ('Yes')
  else:
    print ('No')

S=str(input())
import sys
t=0
lista=[]
for i in range(99):
    try:
        lista.append(S[i])
        t=t+1
    except IndexError:
        break
u=t//2
v=u//2+1
p=1
for i in range(v):
    if S[i]==S[u-i-1] and S[u-i-1]==S[u+i+1] and S[u+i+1]==S[t-1-i]:
        p=p*1
    else:
        print ('No')
        sys.exit()
print ('Yes')

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
def partpall(s,n):
	if s!=s[::-1]:
		return False
	else:
		return True

def pall(s,n):
	if s!=s[::-1]:
		return False
	return partpall(s[n//2 +1 :],n) and partpall(s[:n//2 ],n)


# s=input("enter:")
s="akakaka"
# print("sucess",s,s[::-1])
# revStr=s[::-1]
n=len(s)
print(n)
if pall(s,n):
	print("Yes")
else:
	print("No")

def partpall(s,n):
	if s!=s[::-1]:
		return False
	else:
		return True

def pall(s,n):
	if s!=s[::-1]:
		return False
	return partpall(s[n//2 +1 :],n) and partpall(s[:n//2 ],n)


# s=input("enter:")
s="akakaka"
# print("sucess",s,s[::-1])
# revStr=s[::-1]
n=len(s)
print(n)
if pall(s,n):
	print("True")
else:
	print("False")

def partpall(s,n):
	if s!=s[::-1]:
		return False
	else:
		return True

def pall(s,n):
	if s!=s[::-1]:
		return False
	return partpall(s[n//2 +1 :],n) and partpall(s[:n//2 ],n)


# s=input("enter:")
s="akakaka"
# print("sucess",s,s[::-1])
# revStr=s[::-1]
#n=len(s)
# print(n)
if pall(s,n):
	print("Yes")
else:
	print("No")

def partpall(s,n):
	if s!=s[::-1]:
		return False
	else:
		return True

def pall(s,n):
	if s!=s[::-1]:
		return False
	return partpall(s[n//2 +1 :],n) and partpall(s[:n//2 ],n)


# s=input("enter:")
s="akakaka"
# print("sucess",s,s[::-1])
# revStr=s[::-1]
n=len(s)
print(n)
if pall(s,n):
	print("Yes")
else:
	print("No")

def partpall(s,n):
	if s!=s[::-1]:
		return False
	else:
		return True

def pall(s,n):
	if s!=s[::-1]:
		return False
	return partpall(s[n//2 +1 :],n) and partpall(s[:n//2 ],n)


# s=input("enter:")
s=input()
# print("sucess",s,s[::-1])
# revStr=s[::-1]
n=len(s)
# print(n)
if pall(s,n):
	print("Yes")
else:
	print("No")

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
N = len(S)
left = S[:(N - 1) // 2 + 1]
right = S[((N + 3) // 2) - 1:]

if left == left[::-1] and right == right[::-1]:
    print('Yes')
else:
    print('No')


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

if left == left[::-1] and right == right[::-1] and S == S[::-1]:
    print('Yes')
else:
    print('No')


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

if left == left[::-1] and right == right[::-1] and S == S[::-1]:
    print('Yes')
else:
    print('No')


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s=input()
n=len(s)
x=(n-1)//2
while i in range(x):
  if s[i]!=s[n-1-i] or s[i]!=s[x-1-i]:
    print('No')
    break 
else:
  print('Yes')

s=input()
n=len(s)
x=(n-1)//2
while i<x:
  if s[i]!=s[n-1-i] or s[i]!=s[x-1-i]:
    print('No')
    break 
  i=i+1
else:
  print('Yes')

s=input()
n=len(s)
x=(n-1)//2
i=0
while i<x:
  if s[i]!=s[n-1-i] or s[i]!=s[x-1-i]:
    print('No')
    break 
  i=i+1
else:
  print('Yes')

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
N = len(S)
kai = []
kai2 = []
kai3 = []

for i in range(N):
  kai.append(S[i])

for i in range(1, ((N - 1) / 2 + 1)):
  kai2.append(S[i])

for i in range(((N + 3) / 2), N + 1):
  kai3.append(S[i])

rev = kai.reverse
rev2 = kai2.reverse
rev3 = kai3.reverse

if kai == rev:
  if kai2 = rev2:
    if kai3 = rev3:
      print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
  print('No')

S = input()
N = len(S)
kai = []
kai2 = []
kai3 = []

for i in range(N):
  kai.append(S[i])

for i in range(1, ((N - 1) / 2 + 1)):
  kai2.append(S[i])

for i in range(((N + 3) / 2), N + 1):
  kai3.append(S[i])

rev = kai.reverse
rev2 = kai2.reverse
rev3 = kai3.reverse

if kai == rev:
  if kai2 == rev2:
    if kai3 == rev3:
      print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
  print('No')


S = input()
N = len(S)
kai = []
kai2 = []
kai3 = []
rev = []
rev2 = []
rev3 = []

for i in range(N):
  kai.append(S[i])

for i in range(0, int((N - 1) / 2)):
  kai2.append(S[i])

for i in range(int((N + 3) / 2) - 1, N):
  kai3.append(S[i])

kai.reverse()
kai2.reverse()
kai3.reverse()

for i in range(N):
  rev.append(S[i])

for i in range(0, int((N - 1) / 2)):
  rev2.append(S[i])

for i in range(int((N + 3) / 2) - 1, N):
  rev3.append(S[i])

if kai == rev:
  if kai2 == rev2:
    if kai3 == rev3:
      print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
  print('No')


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
S=input()
l=len(S)
S1=S[1:(l+1)/2]
S2=S[(l+3)/2::]
if S==S[::] and S1==S1[::-1] and S2==S2[::-1]:
  print("Yes")
else:
  print("No")

S=input()
l=len(S)
S1=S[1:int((l+1)/2)]
S2=S[int((l+3)/2)::]
if S==S[::] and S1==S1[::-1] and S2==S2[::-1]:
  print("Yes")
else:
  print("No")

S=input()
l=len(S)
S1=S[:int((l-1)/2)]
S2=S[int((l+1)/2)::]
if S==S[::-1] and S1==S1[::-1] and S2==S2[::-1]:
  print("Yes")
else:
  print("No")
  

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = list(input())
N = len(S)
flag = True
if N == 3: flag = False
for i in range((N-1)//4):
    if S[i] == S[(N-1)//2-1] and S[(N+3)//2-1] == S[N-1-i]:
        print(S[i],S[(N-1)//2-1] ,S[(N+3)//2-1],S[N-1-i])
        continue
    else:
        flag = False
        break

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

S = list(input())
N = len(S)
flag = True

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
N = len(S)
flag = 0
a = (N-1)/2
b = (N+3)/2
sl = list(S)
slr = reversed(sl)
asl = sl[0:a]
aslr = reversed(asl)
bsl = sl[b:N]
bslr = reversed(bsl)
for i in range(N):
  if sl[i] != slr[i]:
    flag += 1
for i in range(0,a-1):
  if asl[i] != aslr[i]:
    flag += 1
for i in range(b-1,N):
  if bsl[i] != bslr[i]:
    flag += 1
if flag == 0:
  print('Yes')
else:
  print('No')

S = input()
N = len(S)
judg = 0
n = N - 1 
for i in range(0,n):
  if S[i] == S[n - i]:
    judg += 0
  else:
    judg += 1

for i in range(0,n/2-1):
  if S[i] == S[n/2 - i]:
    judg += 0
  else:
    judg += 1

for i in range(n/2+1,n):
  if S[i] == S[n - i]:
    judg += 0
  else:
    judg += 1
    
if judg == 0:
  print('Yes')
else:
  print('No')

S = input()
N = len(S)
judg = 0
n = N - 1 
for i in range(0,int(n)):
  if S[i] == S[int(n - i)]:
    judg += 0
  else:
    judg += 1
 
for i in range(0,int(n/2-1)):
  if S[i] == S[int(n/2 - i)]:
    judg += 0
  else:
    judg += 1
 
for i in range(int(n/2+1),int(n)):
  if S[i] == S[int(n - i)]:
    judg += 0
  else:
    judg += 1
    
if judg == 0:
  print('Yes')
else:
  print('No')

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

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = str(input())
n = len(s)
print(n)
ng_list = [4*i+1 for i in range(1,25)]
print(ng_list)
i = 0

if n in ng_list:
    print("No")
else:
    county = 0
    if n == 3:
        if s[0] == s[2]:
            print("Yes")
        else:
            print("No")
    else:
        for i in range(int((n-1)/4)):
            if s[i] != s[int((n-1)/2)-1-i] or s[i] != s[int((n+3)/2-1+i)] or s[i] != s[n-1-i]:
                print("No")
                break
            else:
                county += 1
        if county == int((n-1)/4):
            print("Yes")

s = str(input())
n = len(s)
import math
i = 0

county = 0
if n == 3:
    if s[0] == s[2]:
        print("Yes")
    else:
        print("No")
else:
    for i in range(math.ceil((n-1)/4)):
        if s[i] != s[int((n-1)/2)-1-i] or s[i] != s[int((n+3)/2-1+i)] or s[i] != s[n-1-i] or s[int((n-1)/2)-1-i] == s[int((n+3)/2-1+i)]:
            print("No")
            break
        else:
            county += 1
    if county == math.ceil((n-1)/4):
        print("Yes")

a = input()
an = len(a)
dan = an//2

if a[:dan] == a[dan+1:]:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = list(input())
S_len = len(S)
S_reverse = list(S[::-1])

ans = 'Yes'


if S == S_reverse:
    pass
else:
    ans = 'No'


S_2 = S[0:(S_len - 1) // 2]
S_2_reverse = S_2[::-1]
if S_2 == S_2_reverse:
    pass
else:
    ans = 'No'


S_3 = S[0:(S_len + 3) // 2]
S_3_reverse = S_3[::-1]
if S_3 == S_3_reverse:
    pass
else:
    ans = 'No'
 
print(ans)

S = list(input())
S_len = len(S)
S_reverse = list(S[::-1])

ans = 'Yes'


if S == S_reverse:
    pass
else:
    ans = 'No'


S_2 = S[0:(S_len - 1) // 2]
S_2_reverse = S_2[::-1]
if S_2 == S_2_reverse:
    pass
else:
    ans = 'No'


S_3 = S[(S_len + 3) // 2 - 1:]
S_3_reverse = S_3[::-1]
if S_3 == S_3_reverse:
    pass
else:
    ans = 'No'
 
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: 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.

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

S=input()
N=len(S)
S1=S[:(N-1)//2]
S2=S[(N+1)//2:]
print(S1,S2)
if S1==S2 and S1==S1[::-1]:
    print("Yes")
else:
    print("No")



def palind(LIST, N):
    for i in range(N):
        if LIST[i] != LIST[-1-i]:
            return False
    return True
​
S = list(input())

front = S[:((len(S)-1)//2)]

if palind(S, len(S)) and palind(front, len(front)):
    print('Yes')
else:
    print('No')

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

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
def palind(LIST, N):
    for i in range(N):
        if LIST[i] != LIST[-1-i]:
            return False
    return True

S = list(input())
n = len(S)
print(S)
flag = palind(S, n)

front = S[:((n+1)//2-1)]
rear = S[((n+3)//2-1):]
n = len(front)
flag = palind(front, n)
flag = palind(rear, n)

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

def palind(LIST, N):
    for i in range(N):
        if LIST[i] != LIST[-1-i]:
            return False
    return True

S = list(input())
n = len(S)
front = S[:((len(S)+1)//2-1)]
flag = palind(S, len(S)) and palind(front, len(front))

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input("")
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")
    

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

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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
N = len(S)
if (N+1)%4 == 0:
  if S == S[::-1]:
      if S[:int((N-1)/2)+1] == S[:int((N-1)/2)+1:-1]:
          print('Yes')
      else:
          print('No')
  else:
      print('No')
else:
  print('No')

S = input()
N = len(S)
if (N-1)%4 == 0:
  if S == S[::-1]:
      if S[:int((N-1)/2)] == S[:int((N-1)/2):-1]:
          print('Yes')
      else:
          print('No')
  else:
      print('No')
else:
  print('No')

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):

def f(x):
	return x == x[::-1]
S = input()


l1 = (len(S)-1)//2
l2 = (len(S)+3)//2

S1 = S[:l1]
S2 = S[l2-1:]


print(S1,S2)
if f(S) and f(S1) and f(S2):
	print("Yes")
else:
	print("No")

S = input()
l = len(S)

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

def Kaibun(Str):
	return Str == Str[::-1]:

if Kaibun(S) and Kaibun(S1) and Kaibun(S2):
		print("Yes")
	else:
		print("No")


def f(x):
	return x == x[::-1]
S = input()
l1 = (len(S)-1)//2
l2 = (len(S)+3)//2

S1 = S[:l1]
S2 = S[l2:]
if f(S) and f(S1) and f(S2):
	print("Yes")
else:
	print("No")

S = input()
l = len(S)

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

def Kaibun(Str):
	return Str == Str[::-1]:

if Kaibun(S) and Kaibun(S1) and Kaibun(S2):
	print("Yes")
else:
	print("No")

S = input()
l = len(S)

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

def Kaibun(Str):
	return Str == Str[::-1]

if Kaibun(S) and Kaibun(S1) and Kaibun(S2):
	print("Yes")
else:
	print("No")


def f(x):
	return x == x[::-1]
S = input()


l1 = (len(S)-1)//2
l2 = (len(S)+3)//2

S1 = S[:l1+1]
S2 = S[l2:]


if f(S) and f(S1) and f(S2):
	print("Yes")
else:
	print("No")



def f(x):
	return x == x[::-1]
S = input()


l1 = (len(S)-1)//2
l2 = (len(S)+3)//2

S1 = S[:l1]
S2 = S[l2-1:]


print(S1,S2)
if f(S) and f(S1) and f(S2):
	print("Yes")
else:
	print("No")

def Kaibun(x):
	return x == x[::-1]
S = input()
l = len(S)
S1 = S[:(l-1)//2]
S2 = S[(l+3)//2:]
if Kaibun(S) and Kaibun(S1) and Kaibun(S2):
	print("Yes")
else:
	print("No")


def f(x):
	return x == x[::-1]
S = input()
l = len(S)
S1 = S[:((l-1)//2)]
S2 = S[((l+3)//2):]
if f(S) and f(S1) and f(S2):
	print("Yes")
else:
	print("No")

def Kaibun(Str):
	return Str == Str[::-1]
S = input()
l = len(S)
S1 = S[:(l-1)//2]
S2 = S[(l+3)//2:]
if Kaibun(S) and Kaibun(S1) and Kaibun(S2):
	print("Yes")
else:
	print("No")


def f(x):
	return x == x[::-1]
S = input()

l1 = (len(S)-1)//2
l2 = (len(S)+3)//2

S1 = S[:l1]
S2 = S[l2-1:]

if f(S) and f(S1) and f(S2):
	print("Yes")
else:
	print("No")

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import sys
def is_pal(s):
    print(s,'s')
    i,j=0,len(s)-1
    while i<=j:
        if s[i]==s[j]:
            i+=1
            j-=1
        else:
            return False
    return True
s=sys.stdin.readline()[:-1]
n=len(s)
if n%2!=0:
    if is_pal(s[:n//2]) and is_pal(s[n//2+1:]) and is_pal(s):
        print('Yes')
    else:
        print('No')
else:
    print('No')


import sys
def is_pal(s):
    #print(s,'s')
    i,j=0,len(s)-1
    while i<=j:
        if s[i]==s[j]:
            i+=1
            j-=1
        else:
            return False
    return True
s=sys.stdin.readline()[:-1]
n=len(s)
if n%2!=0:
    if is_pal(s[:n//2]) and is_pal(s[n//2+1:]) and is_pal(s):
        print('Yes')
    else:
        print('No')
else:
    print('No')


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S=input()
N=len(S)
S1=S[:(N-1)//2]
S2=S[(N+1)//2:]
if S==S[::-1] and S1=S1[::-1] and S2==S2[::-1]:
  print("Yes")
else:
  print("No")

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

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

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

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

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
# 1. S is Palindrome
# 2. S[1, (N-1)//2]
# 3. S[(N+3)//2, N]

def is_palindrome(str):
  i, j = 0, len(str)-1
  while i != j:
    if str[i] != str[j]:
      return False
    i += 1
    j -= 1

  return True

s = input()
n = len(s)
print(is_palindrome(s) and is_palindrome(s[0:((n-1)//2)]) and is_palindrome(s[(n+3)//2-1:n]))

def is_palindrome(str):
  i, j = 0, len(str)-1
  while i != j:
    if str[i] != str[j]:
      return False
    i += 1
    j -= 1

  return True

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

def is_palindrome(str):
  i, j = 0, len(str)-1
  while i <= j:
    if str[i] != str[j]:
      return False
    i += 1
    j -= 1

  return True

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
S=input()
N=len(S)
c=int((N-1)/2)
a=S[:c]
b=S[::c]
print(a)
print(a[::-1])
print(b)
print(b[::-1])
if a==a[::-1] and b==b[::-1]:
    print('Yes')
else:
    print('No')

S=input()
N=len(S)
c=int((N-1)/2)
a=S[:c]
b=S[::c]
if a==a[::-1] and b==b[::-1] and S==S[::-1]:
    print('Yes')
else:
    print('No')

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = str(input())
N = len(S)
B = S[:((N-1)/2)]
C = S[((N+3)/2):]
if S == S[-1]:
    if S[:((N-1)/2)] == B[-1]:
        if C[-1] == S[((N+3)/2):]:
            print("Yes")
        else:
            print("No")
    else:
            print("No")
else:
            print("No")

S = str(input())
N = int(len(S))
B = S[:(N-1)//2]
C = S[(((N+3)//2)-1):]

if S == S[::-1]:
    if B == B[::-1]:
        if C[::-1] == C:
            print("Yes")
        else:
            print("No")
    else:
            print("No")
else:
            print("No")

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
S = list(input())
N = len(S)
forw = S[:int((N-1)/2)]


back = S[int((N+3)/2)-1:]
print(forw, back)

if forw == forw[::-1] and back == back[::-1]:
    print("Yes")
else:
    print("No")

# -*- coding: utf-8 -*-
"""
Created on Sun Mar 22 21:21:55 2020

@author: azikausy
"""


S = input()
N = len(S)
forw = S[:int((N-1)/2)]
back = S[int((N+3)/2)-1:]

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S=input()
T=S[:(len(S)-1)//2-1]
U=S[(len(S)+3)//2-1:]
if S==S[::-1]:
    if T==T[::-1]:
        if U==U[::-1]:
            print('Yes')
        else:print('No')
    else:print('No')
else:print('No')

N,M=map(int,input().split())
print(N*(N-1)//2+M*(M-1)//2)

S=input()
T=S[:(len(S)-1)//2-1]
U=S[(len(S)+3)//2-1:]
if S==S[::-1]:
    if T==T[::-1]:
        if U==U[::-1]:
            print('Yes')
        else:print('No')
    else:print('No')
else:print('No')


S=input()
T=S[:(len(S)-1)//2]
U=S[(len(S)+3)//2-1:]
if S==S[::-1]:
    if T==T[::-1]:
        if U==U[::-1]:
            print('Yes')
        else:print('No')
    else:print('No')
else:print('No')

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
s=input();print('YNeos'[s[:2]!=s[-2:]::2])

s=input();print(' YNeos'[s[:5]in s[2:]::2])

s=input();print('YNeos'[s[:4]!=s[-4:]::2])

def main():
  h,*s=open(0)
  h,w,k=map(int,h.split())
  s=[list(map(int,t[:w]))for t in s]
  m=9e9
  for i in range(1<<h-1):
    t,v,l=[],0,1
    for j in range(h):
      if i>>j&1:
        t+=j+1,
        l+=1
    t+=h,
    c=[0]*l
    for i in range(w):
      b=f=g=0
      u=[]
      for j,x in enumerate(t):
        d,b=sum(s[j][i]for j in range(b,x)),x
        u+=d,
        if d>k:
          g=1
          break
        c[j]+=d
        f|=c[j]>k
      else:
        if f:
          c=u
          v+=1
      if g:break
    else:
      if v+l-1<m:m=v+l-1
  print(m)
main()

s=input();n=len(s)//2;print('YNeos'[s[:n]!=s[-n:]::2])

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
# -*- coding: <encoding name> -*-

s = input()
s_former = s[:(n - 1) / 2 + 1]
s_latter = s[(n + 3) / 2 + 1:]
print('Yes' if s == s[::-1] and s_former == s_former[::-1] and s_latter == s_latter[::-1])


# -*- coding: <encoding name> -*-

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


# -*- coding: <encoding name> -*-

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


# -*- coding: <encoding name> -*-

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


# -*- coding: <encoding name> -*-

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


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
s = input()

rs = s[::-1]
q1 = 0
if s == rs:
  q1 = 1


n = len(s)
h = int((n-1)/2)
s1 = s[:h:]
rs1 = s[::-1]
q2 = 0
if (s1 == rs1):
  q2 = 1


n = len(s)
h = int((n+2)/2)
s2 = s[h::]
rs2 = s2[::-1]
q3 = 0
if (s2 == rs2):
  q3 = 1
if q1 == 1 and q2 == 1 and q3 ==1:
  print("Yes")
else:
  print("No")

s = input()

rs = s[::-1]
q1 = 0
if s == rs:
  q1 = 1
print("q1=",q1)


n = len(s)
h = int((n-1)/2)
print("n,h=",n,h)
s1 = s[:h:]
print("s1=",s1)
rs1 = s[::-1]
q2 = 0
if (s1 == rs1):
  q2 = 1
print("q2=",q2)


n = len(s)
h = int((n+2)/2)
print("n,h=",n,h)
s2 = s[h::]
print("s2=",s2)
rs2 = s2[::-1]
q3 = 0
if (s2 == rs2):
  q3 = 1
print("q3=",q3)
if q1 == 1 and q2 == 1 and q3 ==1:
  print("Yes")
else:
  print("No")

s = input()

rs = s[::-1]
q1 = 0
if s == rs:
  q1 = 1
# print("q1=",q1)


n = len(s)
h = int((n-1)/2)
# print("n,h=",n,h)
s1 = s[:h:]
# print("s1=",s1)
rs1 = s1[::-1]
q2 = 0
if (s1 == rs1):
  q2 = 1
# print("q2=",q2)


n = len(s)
h = int((n+2)/2)
# print("n,h=",n,h)
s2 = s[h::]
# print("s2=",s2)
rs2 = s2[::-1]
q3 = 0
if (s2 == rs2):
  q3 = 1
# print("q3=",q3)
if q1 == 1 and q2 == 1 and q3 ==1:
  print("Yes")
else:
  print("No")


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
# -*- coding: utf-8 -*-
str = input()
s = list(str)
n = len(s)


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


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


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


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


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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):

S = input()
N = len(S)



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

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

e = S[:N-1]
f = S[:N-1:-1]

if a == b and c ==d and e == f:
  print('Yes')
  
else:
  print('No')

S = input()
N = len(S)



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

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

e = S
f = S[::-1]

if a == b and c ==d and e == f:
  print('Yes')
  
else:
  print('No')
  

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
def isPalindrome(s):
  return s == s[::-1]
 
s = input()
n = len(s)
res =  isPalindrome(s) and isPalindrome(s[:n//2+1]) and isPalindrome(s[n//2+2:])
print(res)

def isPalindrome(s):
  return s == s[::-1]
 
s = input()
n = len(s)
res =  isPalindrome(s) and isPalindrome(s[:n//2+1]) and isPalindrome(s[n//2+2:])
print("Yes" if res else "No")

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

s = input()
n = len(s)
return isPalindrome(s) and isPalindrome(s[:n//2+1]) and isPalindrome(s[n//2+2:])

def isPalindrome(s):
  return s == s[::-1]
 
s = input()
n = len(s)
res =  isPalindrome(s) and isPalindrome(s[:n//2]) and isPalindrome(s[n//2+1:])
print("Yes" if res else "No")

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
print(s)
n = len(s)
print(n)
print(s[:int(n//2)])
print(s[int(n//2)+1:])
if s[:int(n//2)-1] == s[int(n//2)+1:]:
  print("Yes")
else:
  print("No")


s = input()
n = len(s)
if s[:int(n//2)] == s[int(n//2)+1:]:
  print("Yes")
else:
  print("No")


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
count=0
s=input()
len_s=len(s)
center=int((len_s-1)/2+1)
s_former=s[0:center-1]
s_leter=s[center:]
if(s==reversed(s)):
    pass
else:
    count=+1
if(s_former==reversed(s_former)):
    pass
else:
    count=+1
if(s_leter==reversed(s_leter)):
    pass
else:
    count=+1    
if(count==0):
    print("Yes")
else:
    print("No")

count=0
s=input()
len_s=len(s)
center=int((len_s-1)/2+1)
s_former=s[0:center-1]
s_leter=s[center:]
for a in range(int((len(s)-1)/2-1)):
    if(s[a]==s[-1-a]):
        pass
    else:
        count+=1
for a in range(int((len(s_former)-1)/2-1)):
    if(s_former[a]==s_former[-1-a]):
        pass
    else:
        count+=1
for a in range(int((len(s_leter)-1)/2-1)):
    if(s_leter[a]==s_leter[-1-a]):
        pass
    else:
        count+=1
if(count==0):
    print("Yes")
else:
    print("No")
print(s_former,s_leter)
print(s[-1])

count=0
s=input()
len_s=len(s)
center=int((len_s-1)/2+1)
s_former=s[0:center-1]
s_leter=s[center:]
for a in range(int((len(s)-1)/2-1)):
    if(s[a]==s[-1-a]):
        pass
    else:
        count+=1
for a in range(int((len(s_former)+1)/2)):
    if(s_former[a]==s_former[-1-a]):
        pass
    else:
        count+=1
for a in range(int((len(s_leter)+1)/2)):
    if(s_leter[a]==s_leter[-1-a]):
        pass
    else:
        count+=1
if(count==0):
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

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

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

Verdicts: Runtime Error

Accepted