結果
| 問題 |
No.290 1010
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-04-27 04:46:04 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 283 bytes |
| コンパイル時間 | 2,047 ms |
| コンパイル使用メモリ | 193,076 KB |
| 最終ジャッジ日時 | 2025-01-10 02:26:05 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 TLE * 4 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
int main(){
int n;
string s; cin>>n>>s;
bool ok=false;
rep(i,n) for(int j=i;j+(j-i+1)<n;j++) if(s.substr(i,j-i+1)==s.substr(j+1,j-i+1)) ok=true;
cout<<(ok?"YES":"NO")<<'\n';
return 0;
}