結果

問題 No.739 大事なことなので2度言います
ユーザー chocopuuchocopuu
提出日時 2018-10-05 21:25:05
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 840 bytes
コンパイル時間 1,729 ms
コンパイル使用メモリ 164,820 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-13 00:07:06
合計ジャッジ時間 2,491 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,384 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,384 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 1 ms
4,384 KB
testcase_08 AC 1 ms
4,384 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 1 ms
4,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

#define int long long

using namespace std;
#define rep(i,s,n) for(int i = s;i<n;i++)
#define repe(i,s,n) for(int i = s;i<=n;i++)
#define rrep(i,s,n) for(int i = (n)-1;i>=(s);i--)
#define all(v) (v).begin(),(v).end()
#define pb push_back
#define fi first
#define se second
typedef long long ll;
typedef pair<int,int>pint;
typedef vector<int>vint;
typedef vector<pint>vpint;
typedef pair<pint,int> P1;
typedef pair<int,pint> P2;
static const ll maxLL = (ll)1 << 62;
const ll MOD=1000000007,INF=1e18;
int dy[]={-1,0,1,0};
int dx[]={0,1,0,-1};

string s;
 
signed main(){
	cin>>s;
	//cout<<s.size()%2<<endl;
	if(s.size()%2){
	    cout<<"NO"<<endl;
	    return 0;
	}
	bool can=true;
	rep(i,0,s.size()/2){
	    if(s[i]!=s[i+s.size()/2])can=false;
	}
	if(can)cout<<"YES"<<endl;
	else cout<<"NO"<<endl;
	
	
	
	return 0;
}
0