結果

問題 No.627 ランダムウォークの軌跡
ユーザー GrenacheGrenache
提出日時 2018-01-06 12:28:09
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 878 bytes
コンパイル時間 4,919 ms
コンパイル使用メモリ 72,056 KB
実行使用メモリ 56,124 KB
最終ジャッジ日時 2023-08-24 22:15:25
合計ジャッジ時間 9,257 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
56,004 KB
testcase_01 AC 127 ms
55,404 KB
testcase_02 AC 126 ms
55,572 KB
testcase_03 AC 128 ms
55,732 KB
testcase_04 AC 126 ms
55,740 KB
testcase_05 AC 126 ms
55,972 KB
testcase_06 AC 126 ms
55,872 KB
testcase_07 AC 127 ms
55,828 KB
testcase_08 AC 126 ms
55,612 KB
testcase_09 AC 128 ms
55,972 KB
testcase_10 AC 128 ms
56,020 KB
testcase_11 AC 129 ms
56,092 KB
testcase_12 AC 131 ms
55,956 KB
testcase_13 AC 125 ms
55,400 KB
testcase_14 AC 129 ms
56,052 KB
testcase_15 AC 130 ms
55,352 KB
testcase_16 AC 132 ms
55,796 KB
testcase_17 AC 132 ms
55,664 KB
testcase_18 AC 135 ms
55,724 KB
testcase_19 AC 135 ms
55,668 KB
testcase_20 AC 134 ms
55,580 KB
testcase_21 AC 134 ms
56,072 KB
testcase_22 AC 134 ms
55,668 KB
testcase_23 AC 134 ms
55,720 KB
testcase_24 AC 134 ms
55,980 KB
testcase_25 AC 136 ms
55,404 KB
testcase_26 AC 135 ms
55,656 KB
testcase_27 AC 134 ms
54,004 KB
testcase_28 AC 134 ms
55,812 KB
testcase_29 WA -
testcase_30 AC 126 ms
54,228 KB
testcase_31 AC 123 ms
55,932 KB
testcase_32 AC 122 ms
55,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;


public class Main_yukicoder627 {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		int t = sc.nextInt();

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

		boolean flag = true;
		for (int i = 0; i < t; i++) {
			int tmp = i + 1 - Math.abs(x[i]);
			if (tmp < 0) {
				flag = false;
				break;
			} else {
				if (tmp % 2 != 0) {
					flag = false;
					break;
				}
			}
		}

		if (flag) {
			pr.println("T");
		} else {
			pr.println("F");
		}
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);

		solve();

		pr.close();
		sc.close();
	}

	private static class Printer extends PrintWriter {
		Printer(PrintStream out) {
			super(out);
		}
	}
}
0