結果

問題 No.627 ランダムウォークの軌跡
ユーザー jimanojimano
提出日時 2018-01-23 23:06:00
言語 Java21
(openjdk 21)
結果
AC  
実行時間 47 ms / 2,000 ms
コード長 685 bytes
コンパイル時間 3,801 ms
コンパイル使用メモリ 72,244 KB
実行使用メモリ 49,624 KB
最終ジャッジ日時 2023-08-26 23:57:01
合計ジャッジ時間 6,229 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
49,276 KB
testcase_01 AC 44 ms
48,980 KB
testcase_02 AC 44 ms
49,612 KB
testcase_03 AC 44 ms
49,336 KB
testcase_04 AC 45 ms
49,140 KB
testcase_05 AC 45 ms
49,196 KB
testcase_06 AC 44 ms
49,216 KB
testcase_07 AC 44 ms
49,140 KB
testcase_08 AC 45 ms
49,460 KB
testcase_09 AC 45 ms
49,244 KB
testcase_10 AC 45 ms
49,028 KB
testcase_11 AC 45 ms
48,980 KB
testcase_12 AC 45 ms
49,372 KB
testcase_13 AC 45 ms
49,492 KB
testcase_14 AC 45 ms
49,196 KB
testcase_15 AC 46 ms
49,208 KB
testcase_16 AC 45 ms
49,208 KB
testcase_17 AC 45 ms
49,576 KB
testcase_18 AC 45 ms
49,280 KB
testcase_19 AC 45 ms
49,444 KB
testcase_20 AC 45 ms
49,404 KB
testcase_21 AC 46 ms
49,072 KB
testcase_22 AC 46 ms
49,092 KB
testcase_23 AC 45 ms
49,072 KB
testcase_24 AC 46 ms
49,624 KB
testcase_25 AC 47 ms
49,208 KB
testcase_26 AC 46 ms
49,204 KB
testcase_27 AC 45 ms
49,156 KB
testcase_28 AC 45 ms
49,292 KB
testcase_29 AC 46 ms
49,160 KB
testcase_30 AC 45 ms
48,980 KB
testcase_31 AC 46 ms
49,332 KB
testcase_32 AC 45 ms
49,356 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package me.yukicoder.lv1;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class No0627 {
	public static void main(String[] args) {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			int T = Integer.parseInt(br.readLine());
			int[] x = new int[T + 1];
			x[0] = 0;

			for (int i = 1; i < T + 1; i++) {
				x[i] = Integer.parseInt(br.readLine());
			}
			for (int i = 0; i < T ; i++) {
				if (Math.abs(x[i] - x[i + 1]) != 1) {
					System.out.println("F");
					return;
				}
			}
			System.out.println("T");
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}
0