Submission #8466189


Source Code Expand

Copy
#include <bits/stdc++.h>

#define ff first
#define ss second
#define mp make_pair

using namespace std;

typedef long long ll;

int main() {
	int n;
	char s[100005];

	scanf("%d %s", &n, s);

	if(n&1) {
		printf("No\n");
		return 0;
	}

	int j = n/2;
	int i = 0;

	while(j < n) {
		if(s[i] != s[j]) {
			printf("No\n");
			return 0;
		}
		i++; j++;
	}

	printf("Yes\n");

    return 0;
}

Submission Info

Submission Time
Task B - Echo
User pedrohlf
Language C++14 (GCC 5.4.1)
Score 200
Code Size 422 Byte
Status AC
Exec Time 1 ms
Memory 256 KB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:15:23: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d %s", &n, s);
                       ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 11
Set Name Test Cases
Sample 00-sample-00, 00-sample-01, 00-sample-02
All 00-sample-00, 00-sample-01, 00-sample-02, 01-handmade-00, 01-handmade-01, 01-handmade-02, 01-handmade-03, 01-handmade-04, 01-handmade-05, 01-handmade-06, 01-handmade-07
Case Name Status Exec Time Memory
00-sample-00 AC 1 ms 256 KB
00-sample-01 AC 1 ms 256 KB
00-sample-02 AC 1 ms 256 KB
01-handmade-00 AC 1 ms 256 KB
01-handmade-01 AC 1 ms 256 KB
01-handmade-02 AC 1 ms 256 KB
01-handmade-03 AC 1 ms 256 KB
01-handmade-04 AC 1 ms 256 KB
01-handmade-05 AC 1 ms 256 KB
01-handmade-06 AC 1 ms 256 KB
01-handmade-07 AC 1 ms 256 KB