結果
問題 | No.290 1010 |
ユーザー |
|
提出日時 | 2018-05-18 07:56:26 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 42 ms / 5,000 ms |
コード長 | 322 bytes |
コンパイル時間 | 578 ms |
コンパイル使用メモリ | 67,912 KB |
実行使用メモリ | 5,424 KB |
最終ジャッジ日時 | 2024-06-28 13:41:55 |
合計ジャッジ時間 | 1,503 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
ソースコード
//スマホコーディング #include<iostream> using namespace std; int main(){ int n; string s,t,u; cin>>n>>s; int len = s.size(); for(int i = 1; i <= len/2; i++){ for(int j = 0; j <= len-i*2; j++){ t = s.substr(j, i); u = s.substr(j+i, i); if(t==u){ cout<<"YES"<<endl; return 0; } } } cout<<"NO"<<endl; return 0; }