結果

問題 No.739 大事なことなので2度言います
ユーザー 👑 obakyan
提出日時 2019-03-19 22:28:16
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 454 bytes
コンパイル時間 784 ms
コンパイル使用メモリ 61,248 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-14 09:48:08
合計ジャッジ時間 1,462 ms
ジャッジサーバーID
(参考情報)
judge6 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstdlib>
#include <vector>
#include <algorithm>
int main()
{
    std::string s;
    std::cin >> s;
    size_t sz = s.size();
    if(sz % 2 != 0){
        std::cout << "NO" << std::endl;
        return 0;
    }
    size_t h = sz / 2;
    for(size_t i = 0; i < h; i++){
        if(s[i] != s[i+h]){
        std::cout << "NO" << std::endl;
        return 0;
        }
    }
    std::cout << "YES" << std::endl;
    return 0;
}

0