結果

問題 No.138 化石のバージョン
コンテスト
ユーザー Tsukasa_Type
提出日時 2018-02-09 18:31:58
言語 Java
(openjdk 27 + 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_
結果
WA  
実行時間 -
コード長 581 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,507 ms
コンパイル使用メモリ 86,064 KB
実行使用メモリ 42,572 KB
最終ジャッジ日時 2026-09-11 17:23:54
合計ジャッジ時間 5,414 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		String[] a = sc.nextLine().split("\\.");
		String[] b = sc.nextLine().split("\\.");
		int[] x = new int[3];
		int[] y = new int[3];
		for (int i=0; i<3; i++) {
			x[i] = Integer.parseInt(a[i]);
			y[i] = Integer.parseInt(b[i]);
		}
		
		boolean isOld = true;
		if (y[0] > x[0]) {isOld = false;}
		else {
			if (y[1] > x[1]) {isOld = false;}
			else {
				if (y[2] > x[2]) {isOld = false;}
			}
		}
		
		System.out.println(isOld==true?"YES":"NO");
	}
}
0