結果
問題 |
No.290 1010
|
ユーザー |
![]() |
提出日時 | 2017-05-04 11:08:20 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 334 bytes |
コンパイル時間 | 1,540 ms |
コンパイル使用メモリ | 168,584 KB |
実行使用メモリ | 12,240 KB |
最終ジャッジ日時 | 2024-09-14 06:53:04 |
合計ジャッジ時間 | 8,431 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 TLE * 1 -- * 3 |
ソースコード
#include <bits/stdc++.h> #define REP(i,n,N) for(int i=(n);i<(int)N;i++) #define p(s) cout<<(s)<<endl using namespace std; int main(){ int N; string S; cin>>N>>S; string ans="NO"; REP(i,1,N+1){ REP(j,i,N+1){ if(2*j-i>N) break; if(S.substr(i-1,j-i+1)==S.substr(j,j-i+1)){ ans="YES"; } } } p(ans); return 0; }