結果
問題 | No.290 1010 |
ユーザー |
![]() |
提出日時 | 2016-06-17 15:54:26 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 22 ms / 5,000 ms |
コード長 | 291 bytes |
コンパイル時間 | 527 ms |
コンパイル使用メモリ | 56,484 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-09 16:50:29 |
合計ジャッジ時間 | 1,794 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
ソースコード
#include<iostream> #include<string> using namespace std; int main(){ int N; string S; cin>>N; cin>>S; for(int i=1;i<=N;i++){ for(int j=i;j<=N;j++){ if(S.substr(i-1,j-1-(i-1)+1)==S.substr(j,j+(j+1-i)-j)){ cout<<"YES"<<endl; return 0; } } } cout<<"NO"<<endl; }