結果
| 問題 |
No.627 ランダムウォークの軌跡
|
| コンテスト | |
| ユーザー |
trkage_ted
|
| 提出日時 | 2018-01-13 20:41:49 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 60 ms / 2,000 ms |
| コード長 | 711 bytes |
| コンパイル時間 | 2,215 ms |
| コンパイル使用メモリ | 74,908 KB |
| 実行使用メモリ | 36,864 KB |
| 最終ジャッジ日時 | 2024-12-24 00:58:05 |
| 合計ジャッジ時間 | 5,337 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 33 |
ソースコード
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String args[]) throws IOException {
BufferedReader inReader = new BufferedReader(new InputStreamReader(System.in));
String input = inReader.readLine();
Integer length = Integer.valueOf(input);
int[] checkValue = new int[length + 1];
checkValue[0] = 0;
for (int i = 0; i < length; i++)
checkValue[i + 1] = Integer.valueOf(inReader.readLine());
for (int i = 0; i < checkValue.length - 1; i++)
{
if (Math.abs(checkValue[i] - checkValue[i + 1]) != 1)
{
System.out.println("F");
return;
}
}
System.out.println("T");
return;
}
}
trkage_ted