結果

問題 No.627 ランダムウォークの軌跡
コンテスト
ユーザー GodNegoto
提出日時 2019-11-28 15:01:55
言語 Java
(openjdk 27.0.1.0.3 + ACL)
コンパイル:
javac -J-Duser.language=en -encoding UTF8 -cp /opt/aclib/ac_library.jar _filename_
実行:
java -ea -Xmx700m -Xss256M -DONLINE_JUDGE=true -cp .:/opt/aclib/ac_library.jar _class_
結果
AC  
実行時間 146 ms / 2,000 ms
+ 438µs
コード長 442 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,787 ms
コンパイル使用メモリ 95,460 KB
実行使用メモリ 48,740 KB
最終ジャッジ日時 2026-10-15 01:30:11
合計ジャッジ時間 9,632 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 34
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

package algo;

import java.util.*;

public class sample7 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int T = sc.nextInt();
		List<Integer> list = new ArrayList<Integer>();
		list.add(0);
		for(int i = 1; i <= T; i++) {
			list.add(sc.nextInt());
			if(Math.abs(list.get(i-1) - list.get(i)) == 1) {
				
			}
			else {
				System.out.println("F");
				return;
			}
		}
		System.out.println("T");
	}
}
0