結果
| 問題 | No.290 1010 |
| コンテスト | |
| ユーザー |
fjafjafja
|
| 提出日時 | 2017-09-19 18:18:58 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 93 ms / 5,000 ms |
| コード長 | 590 bytes |
| 記録 | |
| コンパイル時間 | 2,434 ms |
| コンパイル使用メモリ | 81,104 KB |
| 実行使用メモリ | 44,544 KB |
| 最終ジャッジ日時 | 2026-05-08 12:00:52 |
| 合計ジャッジ時間 | 4,431 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
ソースコード
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class N290
{
public static void main(String[] args) throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int l=Integer.parseInt(br.readLine());
String str=br.readLine();
int end=0;
for(int i=1;end==0&&i<=l;i++)
{
for(int j=i;end==0&&j+1<=l&&j+(j+1-i)<=l;j++)
{
if(str.substring(i-1, j).equals(str.substring(j,j+(j+1-i))))
{end++;}
}
}
if(end==1){System.out.println("YES");}
else{System.out.println("NO");}
}
}
fjafjafja