提出 #42912624


ソースコード 拡げる

#include <bits/stdc++.h>
using namespace std;

int main(){
  int n;cin>>n;
  string s[n];
  for(int i=0;i<n;i++){
    cin>>s[i];
  }
  for(int i=0;i<n;i++){
    for(int j=0;j<n;j++){
      if(i==j) continue;
      string t;
      t=s[i]+s[j];
      string k=t;
      reverse(t.begin(),t.end());
      if(t==k){
        cout<<"Yes"<<endl;
        return 0;
      }
    }
  }
  cout<<"No"<<endl;
}

    

提出情報

提出日時
問題 B - racecar
ユーザ chacoder
言語 C++ (GCC 9.2.1)
得点 200
コード長 426 Byte
結果 AC
実行時間 8 ms
メモリ 3624 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 3
AC × 30
セット名 テストケース
Sample example_00.txt, example_01.txt, example_02.txt
All example_00.txt, example_01.txt, example_02.txt, hand_00.txt, hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, hand_06.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt
ケース名 結果 実行時間 メモリ
example_00.txt AC 6 ms 3576 KiB
example_01.txt AC 3 ms 3576 KiB
example_02.txt AC 2 ms 3484 KiB
hand_00.txt AC 2 ms 3604 KiB
hand_01.txt AC 4 ms 3592 KiB
hand_02.txt AC 4 ms 3532 KiB
hand_03.txt AC 2 ms 3564 KiB
hand_04.txt AC 3 ms 3496 KiB
hand_05.txt AC 3 ms 3536 KiB
hand_06.txt AC 4 ms 3500 KiB
random_00.txt AC 7 ms 3572 KiB
random_01.txt AC 6 ms 3564 KiB
random_02.txt AC 7 ms 3516 KiB
random_03.txt AC 4 ms 3560 KiB
random_04.txt AC 5 ms 3492 KiB
random_05.txt AC 8 ms 3548 KiB
random_06.txt AC 4 ms 3588 KiB
random_07.txt AC 7 ms 3624 KiB
random_08.txt AC 6 ms 3428 KiB
random_09.txt AC 6 ms 3516 KiB
random_10.txt AC 5 ms 3564 KiB
random_11.txt AC 6 ms 3516 KiB
random_12.txt AC 5 ms 3496 KiB
random_13.txt AC 7 ms 3460 KiB
random_14.txt AC 5 ms 3464 KiB
random_15.txt AC 7 ms 3624 KiB
random_16.txt AC 6 ms 3596 KiB
random_17.txt AC 7 ms 3568 KiB
random_18.txt AC 6 ms 3624 KiB
random_19.txt AC 6 ms 3592 KiB