結果

問題 No.739 大事なことなので2度言います
ユーザー tonegawatonegawa
提出日時 2020-08-10 08:23:30
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 902 bytes
コンパイル時間 1,059 ms
コンパイル使用メモリ 94,580 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-16 01:57:38
合計ジャッジ時間 1,382 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <deque>
#include <algorithm>
#include <set>
#include <map>
#include <bitset>
#include <cmath>
#include <functional>
#include <iomanip>
#define vll vector<ll>
#define vvvl vector<vvl>
#define vvl vector<vector<ll>>
#define VV(a, b, c, d) vector<vector<d>>(a, vector<d>(b, c))
#define VVV(a, b, c, d) vector<vvl>(a, vvl(b, vll (c, d)));
#define re(c, b) for(ll c=0;c<b;c++)
#define all(obj) (obj).begin(), (obj).end()
typedef long long int ll;
typedef long double ld;
using namespace std;

bool solve(){
  string s;std::cin >> s;
  if(s.size()%2==1) return false;
  string l = s.substr(s.size()/2);
  string r = s.substr(s.size()/2, s.size()/2);
  //std::cout << l << " " << r << '\n';
  return l==r;
}
int main(int argc, char const *argv[]) {
  if(solve()) std::cout << "YES" << '\n';
  else std::cout << "NO" << '\n';
}
0