Submission #8468089


Source Code Expand

Copy
#include <cstdio>

using namespace std;

char s[109];

int main() {
  int n;
  scanf("%d%s", &n, s);
  if (n % 2 == 1) {
    puts("No");
    return 0;
  }
  for (int i = 0; i < n / 2; ++i) {
    if (s[i] != s[n / 2 + i]) {
      puts("No");
      return 0;
    }
  }
  puts("Yes");
}

Submission Info

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

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:9: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 128 KB
00-sample-01 AC 1 ms 128 KB
00-sample-02 AC 0 ms 128 KB
01-handmade-00 AC 1 ms 128 KB
01-handmade-01 AC 0 ms 128 KB
01-handmade-02 AC 0 ms 128 KB
01-handmade-03 AC 0 ms 128 KB
01-handmade-04 AC 1 ms 128 KB
01-handmade-05 AC 1 ms 128 KB
01-handmade-06 AC 1 ms 128 KB
01-handmade-07 AC 1 ms 128 KB