Problem:


Score : 200 points

Problem Statement

Given are a positive integer N and a string S of length N consisting of lowercase English letters.

Determine whether the string is a concatenation of two copies of some string.
That is, determine whether there is a string T such that S = T + T.

Constraints

1 \leq N \leq 100

S consists of lowercase English letters.

|S| = N

Input

Input is given from Standard Input in the following format:

N
S

Output

If S is a concatenation of two copies of some string, print Yes; otherwise, print No.

Sample Input 1

6
abcabc

Sample Output 1

Yes

Let T =  abc, and S = T + T.

Sample Input 2

6
abcadc

Sample Output 2

No

Sample Input 3

1
z

Sample Output 3

No



Sample input:
6
abcabc


Sample output:
Yes

Submission status: Wrong Answer

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

if n % 2 == 1:
  print("No")
else:
  t = n // 2
  if s[1:t] == s[t:n]:
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
S = input()
if len(S)//2 == 1:
  print("No")
else:
  if S[:len(S)//2] == S[len(S)//2:]:
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
S = input()
flag = 0
if len(S)%2 != 0:
    flag = 1
ans1 = ''
ans2 = ''
for i in range(N):
    if i < N//2:
        ans1+=S[i]
    else:
        ans2+=S[i]
if ans1==ans2 and flag==0:
    print('yes')
if ans1 != ans2 or flag ==1:
    print('No')
# print(ans1,ans2,flag)

Submission status: Wrong Answer

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

if n % 2 != 0:
    print('No')

mid = n // 2

t1 = s[0:mid]
t2 = s[mid:]

print(t1)
print(t2)

print('Yes') if t1 == t2 else print('No')

Submission status: Wrong Answer

Solution code:
s = list(input())
l = len(s)
if l%2==0:
  a = s[:len(s)//2]
  b = s[len(s)//2:]
  for i in range(len(s)//2):
    if a[i]==b[i]:
      pass
    else:
      print("No")
      break
  else:
    print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10**6)
# input = sys.stdin.readline
ii = lambda: int(input())
mis = lambda: map(int,input().split())
lmis = lambda: list(mis())
INF = float('inf')

def main():
    N=ii()
    S=list(input())
    s1=S[:N//2]
    s2=S[N//2:]
    for i in range(N//2):
        if s1[i]!=s2[i]:
            print('No')
            exit()
    print('Yes')


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(raw_input())
s = raw_input()

if n % 2 != 0:
    print "No"
    exit(0)

s_1 = s[0:(n/2)]
s_2 = s[(n/2):]


if s_1 == s_2:
    print 'yes'
else:
    print 'No'

Submission status: Wrong Answer

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

n=int(input())
s=input()
if n%2==1:
    print("No")
    sys.exit()
s1=s[:n//2]
s2=s[n//2:]
if s1==s2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N=int(input())
S=input()
if N%2==1:
  print('No')

n=int(N/2)
if S[:n]==S[n:]:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
N=int(input())
S=list(input())
for i in range(N//2):
  if S[i]!=S[N//2+i]:
    print("No")
    exit()
print("Yes")

Submission status: Wrong Answer

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

S1 = []
S2 = []

for i in range(int(N/2)):
    S1.append(S[i])
    S2.append(S[i+int(N/2)])
    
if S1 == S2:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
s = list(input())
a = set(s)
if len(a) == len(s)/2:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

for i in range(1, N - 1) :
    T = S[:i]
    if S == T * (N // len(T)) :
        print('Yes')
        break
else :
    print('No')

Submission status: Wrong Answer

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

if len(S) == 1:
  print('No')
else:
  l = int(len(S) / 2)
  a = S[:l]
  b = S[l:]
  if a == b:
    print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if N%2==0 and S[0:N//2-1]==S[N//2:N-1]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
S = str(input())

if N % 2 == 0:
    if S[0:N // 2 - 1] == S[N // 2:N - 1]:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
if n % 2 == 0:
    m = n // 2
    if s[0:m-1] == s[m:n-1]:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

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

if N == 1:
    print("No")
    exit()

for i in range(N//2):
    if S[i] != S[i + N // 2]:
        print('No')
        exit()

print('Yes')

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
flag=1
if n%2==1:
  print('No')
else:
  for i in range(1,n//2):
    if s[i]==s[i+n//2]:
      flag*=1
    else:
      flag*=0
if flag==1:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

if(S[:int(N / 2)] == S[int(N / 2):]):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
a=int(input())
b=input()
if a==1:
  print("No")
  exit()
for i in range(a//2):
  if b[i]!=b[i+a//2]:
    print("No")
    exit()
print("Yes")

Submission status: Wrong Answer

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

def main():
    N = int(input())
    S = input()
    for i in range(N//2):
        if S[i] != S[N//2+i]:
            print('No')
            exit()
    print('Yes')

if __name__ == '__main__': main()

Submission status: Wrong Answer

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

if n < 2:
  print('No')
else:
  left = s[0:n//2]
  right = s[n//2+1:]

  print('Yes' if left == right else 'No')

Submission status: Wrong Answer

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy,copy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

def main():
    n = INT()
    s = set(list(input()))
    if len(s) == n/2:
        print('Yes')
    else:
        print('No')


if  __name__=='__main__':
    main()

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
if n%2==1:
  print('No')
else:
  l1=list(s[:(n//2)])
  l2=list(s[(n//2):])
  if l1==l2:
    print('Yes')

Submission status: Wrong Answer

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

for i in range(1, N) :
    T = S[:i]
    if S == T * (N // len(T)) :
        print('Yes')
        break
else :
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
S = list(input())
if S[N//2:] == S[N//2:]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/
#
# lang: Python3 (3.4.3)

n = int(input())
s = input()

for i in range(n // 2):
  if not(s[i] == s[n // 2 + i]):
    print('No')
    exit(0)

print('Yes')

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    n = int(input())
    s = input()
    if len(s) > 2 and len(s) % 2 == 0 and s[:len(s)//2] == s[len(s)//2:]:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

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

if n < 2:
  print('No')
else:
  left = s[0:n]
  right = s[n+1:]

  print('Yes' if left == right else 'No')

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
if len(s)%2!=0:
    print("Yes")
else:
    j=len(s)//2
    if s[:j]==s[j:]:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
S = input()
if N % 2 == 0 and S == S[:N//2] + S[N//2:]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin

ns = lambda : stdin.readline().rstrip()
ni = lambda : int(ns())
na = lambda : list(map(int, stdin.readline().split()))
sys.setrecursionlimit(10 ** 7)


def main():
  n = ni()
  s = ns()

  if s[0:2] == s[3:5]:
    print("Yes")
  else:
    print("No")

if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
N = int(input())
S = input()
if(N % 2 == 1):
    print("No")
    exit()
m = N//2
for i in range(m):
    if(S[i] != S[i+m]):
        print("No")
        exit()
print("Yes")

Submission status: Accepted

Solution code:
n = int(input())
n1 = n//2
s = input()
s1 = s[n1:]
s2 = s[:n1]
if n % 2 != 0:
    print('No')
else:
    if s1 == s2:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
n=int(input())
s=list(input())
if n%2==0:
    bef=s[:n//2]
    aft=s[n//2:]
    if bef==aft:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Accepted

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

if n%2:
  print('No')
else:
  if s[:n//2]==s[n//2:]:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(500000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


def solve():
    N = int(input())
    S = input()
    if N % 2 == 0:
        h = N // 2
        if S[:h] == S[h:]:
            print("Yes")
            return
    print("No")


def main():
    solve()


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
s = input()
if s[0:n // 2] ==s[n//2:]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

if S[:N//2] == S[N//2:]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
S = input()
if N%2 == 0:
  T = S[0:int(N/2)]
  if T+T == S:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Submission status: Accepted

Solution code:
N = int(input())
S = input()
if N % 2 != 0:
    print('No')
else:
    for i in range(int(N/2)):
        if S[i] != S[i + int(N/2)]:
            print('No')
            break
    else:
        print('Yes')

Submission status: Accepted

Solution code:
n = int(input())
s = list(input())
m = n//2

if n%2 != 0:
  ans = "No"
else:
  for i in range(m):
    if s[i] != s[m+i]:
      ans = "No"
      break
    ans = "Yes"

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
s = list(input())
if s[:n//2]==s[n//2:]:print("Yes")
else:print("No")

Submission status: Accepted

Solution code:
N = int(input())
S = input()
if N%2!=0:
  print("No")
else:
  if S[:N//2]*2 == S:print("Yes")
  else : print("No")

Submission status: Accepted

Solution code:
#B
N=int(input())
S=input()
ans="No"
if N%2==0:
  if S[:N//2]==S[N//2:]:
    ans="Yes"
print(ans)

Submission status: Accepted

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

if len(s)%2==0 and s[:len(s)//2]==s[len(s)//2:]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

if N%2==1:
    print('No')
    exit()
if S[:N//2]==S[N//2:]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

if N % 2 == 0:
  print('Yes' if S[:N//2] == S[N//2:] else 'No')
else:
  print('No')

Submission status: Accepted

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

if len(S) % 2 == 0 :
    for i in range(len(S)//2) :
        if S[i] != S[i+len(S)//2] :
            print("No")
            exit()
    print("Yes")
    exit()
print("No")

Submission status: Accepted

Solution code:
N = int(input())
A = str(input())

if (N % 2 == 0):
  if (A[:N//2] == A[N//2:]):
    print("Yes")
  else:
    print("No")
else:
  print("No")

Submission status: Accepted

Solution code:
import sys
N = int(input())
S = input()

if N % 2 != 0:
    print('No')
    sys.exit(0)
else:
    idx = int(N/2)
    if S[:idx] == S[idx:]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
n = int(input())
s = input()
if n%2 != 0 or s[:n//2] != s[n//2:]:
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
n = int(input())
s = input()
if n%2==1:
    print('No')
    exit(0)

if s[:n//2] == s[-n//2:]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

if n%2!=0:
    print("No")
elif s[0:int(n/2)]==s[int(n/2):n]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
def resolve():
    n = int(input())
    s = input()
    if s == s[:n//2] + s[:n//2]:
        print('Yes')
    else:
        print('No')
resolve()

Submission status: Accepted

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

if N%2==0 and S[:N//2]==S[N//2:]:
	print("Yes")
else:
	print("No")

Submission status: Accepted

Solution code:
n=int(input())
s=input()
if n%2!=0:
    print("No")
else:
    if s[:n//2]==s[n//2:]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

ret = "No"
for i in range(N//2):
    s = S[:i+1]

    if s + s == S:
        ret = "Yes"
        break

print(ret)

Submission status: Accepted

Solution code:
N=int(input())
S=input()
x="Yes"
if N%2==1:
    print("No")
else:
    for i in range(0,N//2):
        if S[i]!=S[i+N//2]:
            x="No"
            break
    print(x)

Submission status: Accepted

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

if N % 2 != 0:
    print("No")
elif S[: int(N / 2)] == S[int(N / 2 ) :]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())
s = str(input())
if len(s) % 2 == 1:
    print('No')
else:
    t = len(s) // 2
    if s[t:] == s[:t]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
n = int(input())
s = input()
if n % 2 == 0 and s[:n//2] == s[n//2:]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n=int(input())
s=str(input())
d=True

if len(s)%2==0:
  for i in range(len(s)//2):
    if s[i]!=s[len(s)//2+i]:
      d=False
else:
  d=False
  
if d:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
n = int(input())
s = input()
if(n % 2 == 0 and s[n//2:] * 2 == s):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())
str = input()
if (n%2 == 0) and (str[:(n//2)] == str[n//2:]):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())
lst = list(input())
count = 0

if n % 2 == 0:
    for i in range(n // 2):
        if lst[i] == lst[i + n // 2]:
            count += 1

if count == n / 2:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n=int(input())//2
s=input()
print("YNeos"[s[:n]!=s[n:]::2])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

INF=10**20
def main():
    N=ii()
    S=list(input())

    if N%2==1:
        print("No")
        exit()
    
    if S[:N//2] == S[N//2:]:
        print("Yes")
    else:
        print("No")




if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())//2
s = input()
if s[:n] == s[n:]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())
s = input()
if n % 2 == 1:
  print('No')
  exit()
n2 = n // 2
for i in range(n2):
  if s[i] != s[i+n2]:
    print('No')
    exit()
print('Yes')

Submission status: Accepted

Solution code:
import sys
n= int(input())
s = input()

if (n % 2):
  print("No")
  sys.exit()

half = n//2
for i in range(half):
  if s[i] != s[i+half]:
    print("No")
    sys.exit()
print("Yes")

Submission status: Accepted

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

if n % 2 == 1:
    print('No')
else:
    head = s[:n // 2]
    tail = s[n // 2:]

    if head == tail:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
n = int(input())
s = list(input())
cnt = 0
if n % 2 != 0 :
    print('No')
    exit()
for i in range(n//2):
    if s[i] != s[i + n // 2]:
        print('No')
        exit()

print('Yes')

Submission status: Accepted

Solution code:
N = int(input())
S = input()
if N%2==1:
  print('No')
else:
  ans = 'Yes' if S[:N//2] == S[N//2:] else 'No'
  print(ans)

Submission status: Accepted

Solution code:
N = int(input())
S = input()
if N % 2 !=0:
    print('No')
else:
   n = int(N/2)  
   s1 = S[:n]
   s2 = S[n:]
   if s1 == s2:
       print('Yes')
   else:
       print('No')

Submission status: Accepted

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

flag = False
half = (N+1) // 2
if S[:half] == S[half:N]:
  flag = True
if flag:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

half = (N+1) // 2
if N%2 != 0:
  if S[:half] == S[half+1:N]:
    print("Yes")
  else:
    print("No")
else:
  if S[:half] == S[half:N]:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())
s = input()
if n % 2 == 1:
  print("No")
else:
	if s[0:n//2] == s[n//2:]:
  		print("Yes")
	else:
  		print("No")

Submission status: Accepted

Solution code:
N=int(input())
S=input()
if S[0:N//2]==S[N//2:N]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n=int(input())
s=input()
if(n%2==0):
  s1=s[:n//2]
  s2=s[n//2:n]
  if(s1==s2):
    print("Yes")
  else:
    print("No")
else:
  print("No")

Submission status: Accepted

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

print('Yes' if s[:n // 2] == s[n // 2:] else 'No')

Submission status: Accepted

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

if n % 2 == 1:
    print('No')
else:
    cnt = 0
    for i in range(0, n // 2):
        cnt += (s[i] == s[i + n // 2])
    if(cnt == n // 2):
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
N = int(input())
S = input()
if N%2==0:
    if S[:int(N/2)] == S[int(N/2):]:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())

if n % 2 == 0:
  work = int(n / 2)
  s = input()
  a = s[:work]
  b = s[work:]
  if a == b:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Submission status: Accepted

Solution code:
n=int(input())
s=input()
cnt = 0

if n%2 == 1:
    print('No')

else :
    for i in range(n//2):
        if s[i] == s[i+n//2]:
            cnt += 1

    if cnt == n//2:
        print('Yes')
    else :
        print('No')

Submission status: Accepted

Solution code:
n=int(input())
s=input()
s1=n//2
ans="No"
if n&1!=1:
    if s[:s1]==s[s1:]:
        ans="Yes"
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
s = input()
if n % 2 == 1:
  res = "No"
else:
  if s[:n//2] == s[n//2:]:
    res = "Yes"
  else:
    res = "No"
print(res)

Submission status: Accepted

Solution code:
#ABC145B
n = int(input())
s = input()
print("Yes" if s[:n//2]==s[n//2:] else "No")

Submission status: Accepted

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

if N%2 == 1:
    print('No')
else:
    if S[0:N//2] == S[N//2:N]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
n = int(input())
s = input()
if n % 2 == 1:
  print("No")
elif s[:n//2] == s[n//2:] :
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
N = int(input())
S = input()
if N % 2 == 0 and S[:N//2] == S[N//2:]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = int(input())
S = input()
if N % 2 > 0 or S != S[:int(N/2)] + S[:int(N/2)]:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
# 問題：https://atcoder.jp/contests/abc145/tasks/abc145_b

n = int(input())
s = input()

len_t = n//2
t = s[0:len_t] * 2

if t == s:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
import sys
n=int(input())
s=list(input())
if n%2==1:
    print("No")
    sys.exit()
else:
    for i in range(n//2):
        if s[i]==s[n//2+i]:
            continue
        print("No")
        sys.exit()
    print("Yes")

Submission status: Accepted

Solution code:
n=int(input())
s=input()
if s[0:n//2]==s[n//2:n]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
#a,b,c = map(int,input().split())
a = int(input())
b = input()
c = b[:a//2]
d = b[a//2:a]
print("Yes" if c == d else "No")

Submission status: Accepted

Solution code:
n=int(input())
s=input()
if s[0:n//2]==s[n//2:n]: print("Yes")
else: print("No")

Submission status: Accepted

Solution code:
import sys
n=int(input())
s=list(input())

if n%2!=0:
  print('No')
  sys.exit()

        
a=s[:n//2]
b=s[n//2:]

cnt=0
for i in range(n//2):
  if a[i]!=b[i]:
    cnt+=1

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

Submission status: Accepted

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

ans = 'No'
# Nが偶数のときを考えればよい
if N % 2 == 0:
  if S[:N // 2] == S[N // 2:]: ans = 'Yes'
    
print(ans)

Submission status: Accepted

Solution code:
import sys
N = int(input())
S = input()
if N % 2 == 1:
    print('No')
    sys.exit()

if S[:N//2] == S[N//2:]:
    print('Yes')
    sys.exit()

print('No')

Submission status: Accepted

Solution code:
n = int(input())
s = input()
if n % 2 != 0:
    print('No')
elif s[:n//2] == s[n//2:]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
def main():
    import sys
    readline = sys.stdin.buffer.readline

    n = int(readline())
    s = readline().rstrip().decode('utf-8')

    print('Yes' if s[:n//2] == s[n//2:] else 'No')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
a = input()
if a[:n//2]==a[n//2:]:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
N = int(input())
S = input()
if N % 2 != 0:
  print("No")
  exit()
x = int(len(S) / 2)
y = S[0:x]
z = S[x:len(S)]
if y == z:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n = int(input())
list_s = list(input())
if n % 2 != 0: print("No")
elif "".join(list_s[: (n // 2)]) == "".join(list_s[(n // 2):]): print("Yes")
else: print("No")

Submission status: Accepted

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

front = S[:N//2]
latter = S[N//2:]

if front == latter:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
b=int(input())
a=input()
c=[]
for i in range(b):
    c.append(a[i])
#a = list(map(int,input().split()))
#b = list(map(int,input().split()))

if b==1:
    print("No")
elif c[:int(b/2)]==c[int(b/2):]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
S = input()
print('Yes' if S[:N//2] == S[N//2:] else 'No')

Submission status: Accepted

Solution code:
n=int(input())
S=input()
if n % 2 == 1:
  print("No")
elif S[:n//2] == S[n//2:]:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n = int(input())
s = input()
a = s[:n//2]
b = s[n//2:]
if a == b:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = int(input())
S = input()
n = int(N/2)
print('Yes' if N > 1 and S[:n] == S[n:] else 'No')

Submission status: Accepted

Solution code:
N = int(input())
S = input()
if N % 2 == 1:
    print("No")
else:
    if S[:N // 2] == S[N // 2:]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

t1 = s[:n//2]
t2 = s[n//2:n]

if(t1 == t2):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
moji = str(input())

print(("No","Yes")[moji[:int(N/2)] == moji[int(N/2):]])

Submission status: Accepted

Solution code:
n = int(input())
s = input()
t = s[n//2:]


if s == t*2:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N, S = int(input()), input()
print("Yes" if N%2 == 0 and S[:(N//2)] == S[(N//2):] else "No")

Submission status: Accepted

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

if N%2 == 0:
  if S[:int(N/2)] == S[int(N/2):]:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Submission status: Accepted

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

if n % 2 == 0 and s[:n // 2] == s[n // 2:]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

if len(S) % 2 != 0:
    print("No")
    exit()

else:
    l = len(S)
    if S[0:l//2] == S[l//2:l]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
n=int(input())
s=input()
k=0
if n%2==1:
    print('No')
else:
    for i in range(len(s)//2):
        if s[i]==s[i+len(s)//2]:
            k=1
        else:
            print('No')
            exit()
if k== 1:
    print('Yes')

Submission status: Accepted

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

if N % 2 != 0:
    print('No')
    exit()

for i in range(N//2):
    if S[i] == S[i + (N//2)]:
        continue
    else:
        print('No')
        exit()
        
print('Yes')

Submission status: Accepted

Solution code:
input()
s = input()
if len(s) % 2 !=0:
  print('No')
else:
  s1 = s[:len(s)//2]
  s2 = s[len(s)//2:]
  print("Yes" if (s1 == s2) else "No")

Submission status: Accepted

Solution code:
n = int(input())
s = input()
print("Yes" if s == s[:n//2] * 2 and n % 2 == 0 else "No")

Submission status: Accepted

Solution code:
n=int(input())
s=input()
print('Yes' if s[:n//2]==s[n//2:] else 'No')

Submission status: Accepted

Solution code:
N = int(input())
S = list(input())
if len(S) % 2 == 1:
  print("No")
  exit()
center = len(S)//2
ans = "Yes"
for i in range(center):
  if S[i] != S[i+center]:
    ans = "No"
print(ans)

Submission status: Accepted

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

if(n%2==1):
    print('No')
    exit()

else:  
   
    if s[0:n//2]==s[(n//2):n]:
     	print('Yes')
    else:
        print("No")

Submission status: Accepted

Solution code:
# ABC 145 B
n = int(input())
s = input()

if n % 2 == 1:
    print('No')
    exit()

half = n // 2

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
half = n // 2

if n % 2 == 1: #%で余りを求める
  print("No")
elif s[:half] == s[half:]:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
N=int(input())
S=list(input())
if N%2!=0:
    print("No")
else:
    s_1=S[:int(N/2)]
    s_2=S[int(N/2):N]
    if s_1==s_2:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

if N % 2 == 0:
    if S[:N//2] == S[N//2:]:
        print("Yes")
        exit()

print("No")

Submission status: Accepted

Solution code:
c=input()
c=int(c)
a=input()
b=0
if c%2==1:
  print("No")
else:
  for i in range(int(c/2)):
    if a[i]!=a[i+int(c/2)]:
      b=b+1
  if b==0:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
N=input()
S=list(input())
n=int(N)
waru=int(n//2)
if n%2!=0:
    print('No')
elif S[:waru] ==S[waru:]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = int(input())
s = input()
if n % 2 == 1:
    print('No')
    exit()
else:
    if s[:n//2] == s[n//2:]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

if n % 2:
    print('No')
else:
    print('Yes' if s[:n//2] == s[n//2:] else 'No')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# Generated by https://github.com/kyuridenamida/atcoder-tools
from typing import *
import collections
import functools
import itertools
import math
import sys

INF = float('inf')
YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(N: int, S: str):
    return [NO, YES][S[:N//2] == S[N//2:]]


def main():

    sys.setrecursionlimit(10 ** 6)

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    S = next(tokens)  # type: str
    print(f'{solve(N, S)}')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N=int(input())
S=list(input())
if N%2!=0:
    print("No")
else:
    s_1=S[:int(N/2)]
    s_2=S[int(N/2):N]
    if s_1==s_2:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    N = int(readline())
    S = input()

    if N % 2 == 0:
        first = S[:N // 2]
        second = S[N // 2:]
        if first == second:
            print("Yes")
        else:
            print("No")
    else:
        print("No")


if __name__ == '__main__':
    main()

Submission status: Accepted

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

if N % 2 == 1:
    print('No')
else:
    print(['No','Yes'][S[:(N//2)] == S[(N//2):]])

Submission status: Accepted

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

if N%2:
    print("No")
    exit()

T=S[:N//2]
if S==T+T:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

if len(s) % 2 == 1:
    print('No')

else:
    mid = len(s)//2
    if s[:mid] == s[mid:]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
x=int(input())
s=str(input())
flag=0
if len(s)%2==0:
  n=len(s)//2
  for i in range(n):
    if s[i]!=s[n+i]:
      flag=1
else:
  flag=1
if flag==0:
  print('Yes')
else:
  print("No")