結果

問題 No.627 ランダムウォークの軌跡
ユーザー matsuyoshi30matsuyoshi30
提出日時 2018-05-28 23:56:35
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 534 bytes
コンパイル時間 2,644 ms
コンパイル使用メモリ 71,800 KB
実行使用メモリ 57,844 KB
最終ジャッジ日時 2023-09-12 20:17:04
合計ジャッジ時間 8,639 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
55,412 KB
testcase_01 AC 126 ms
55,600 KB
testcase_02 AC 126 ms
55,680 KB
testcase_03 AC 126 ms
55,732 KB
testcase_04 AC 127 ms
55,860 KB
testcase_05 AC 127 ms
55,784 KB
testcase_06 AC 126 ms
55,808 KB
testcase_07 AC 128 ms
55,860 KB
testcase_08 AC 128 ms
55,580 KB
testcase_09 AC 132 ms
55,672 KB
testcase_10 AC 130 ms
53,344 KB
testcase_11 AC 131 ms
55,672 KB
testcase_12 AC 131 ms
55,864 KB
testcase_13 AC 132 ms
55,760 KB
testcase_14 AC 132 ms
56,064 KB
testcase_15 AC 130 ms
55,436 KB
testcase_16 AC 129 ms
39,516 KB
testcase_17 AC 131 ms
39,696 KB
testcase_18 AC 131 ms
39,660 KB
testcase_19 AC 134 ms
39,352 KB
testcase_20 AC 134 ms
39,864 KB
testcase_21 AC 133 ms
39,256 KB
testcase_22 AC 132 ms
39,652 KB
testcase_23 AC 132 ms
39,476 KB
testcase_24 AC 131 ms
39,360 KB
testcase_25 AC 134 ms
40,040 KB
testcase_26 AC 138 ms
39,604 KB
testcase_27 AC 132 ms
40,000 KB
testcase_28 AC 133 ms
39,820 KB
testcase_29 AC 132 ms
39,656 KB
testcase_30 AC 124 ms
39,480 KB
testcase_31 AC 124 ms
39,764 KB
testcase_32 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();

        String ans = "T";
        int[] x = new int[t];

        for(int i=0; i<t; i++) {
            x[i] = in.nextInt();
        }

        if(x[0] == 0) ans = "F";
        for(int i=1; i<t; i++) {
            if(Math.abs(x[i-1] - x[i]) > 1 || x[i-1] == x[i]) {
                ans = "F";
                break;
            }
        }

        System.out.println(ans);
    }
}
0