結果

問題 No.138 化石のバージョン
ユーザー spaciaspacia
提出日時 2015-12-19 09:10:08
言語 Java21
(openjdk 21)
結果
AC  
実行時間 43 ms / 5,000 ms
コード長 695 bytes
コンパイル時間 1,932 ms
コンパイル使用メモリ 71,748 KB
実行使用メモリ 49,952 KB
最終ジャッジ日時 2023-08-28 13:35:16
合計ジャッジ時間 4,755 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
49,480 KB
testcase_01 AC 42 ms
47,388 KB
testcase_02 AC 42 ms
49,260 KB
testcase_03 AC 42 ms
49,604 KB
testcase_04 AC 42 ms
49,336 KB
testcase_05 AC 43 ms
49,532 KB
testcase_06 AC 43 ms
49,952 KB
testcase_07 AC 42 ms
49,356 KB
testcase_08 AC 40 ms
49,392 KB
testcase_09 AC 40 ms
49,356 KB
testcase_10 AC 40 ms
49,176 KB
testcase_11 AC 41 ms
49,252 KB
testcase_12 AC 41 ms
49,340 KB
testcase_13 AC 41 ms
49,256 KB
testcase_14 AC 40 ms
49,472 KB
testcase_15 AC 40 ms
49,412 KB
testcase_16 AC 42 ms
49,252 KB
testcase_17 AC 41 ms
49,412 KB
testcase_18 AC 41 ms
49,348 KB
testcase_19 AC 41 ms
49,432 KB
testcase_20 AC 41 ms
49,396 KB
testcase_21 AC 42 ms
49,180 KB
testcase_22 AC 41 ms
49,256 KB
testcase_23 AC 43 ms
49,320 KB
testcase_24 AC 43 ms
49,432 KB
testcase_25 AC 43 ms
49,216 KB
testcase_26 AC 42 ms
49,464 KB
testcase_27 AC 42 ms
49,396 KB
testcase_28 AC 43 ms
49,568 KB
testcase_29 AC 43 ms
49,412 KB
testcase_30 AC 43 ms
49,196 KB
testcase_31 AC 42 ms
49,300 KB
testcase_32 AC 42 ms
49,404 KB
testcase_33 AC 41 ms
49,304 KB
testcase_34 AC 41 ms
49,584 KB
testcase_35 AC 42 ms
49,184 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

class Main138 {
	
	public static boolean check (String[] line1, String[] line2) {
		int[] ver1 = new int[3];
		int[] ver2 = new int[3];
		for (int i = 0; i < ver1.length; i++) {
			ver1[i] = Integer.parseInt(line1[i]);
			ver2[i] = Integer.parseInt(line2[i]);
			int sub = ver1[i] - ver2[i];
			if (sub != 0) return sub > 0;
		}
		return true;
	}
	
	public static void main (String[] args) throws IOException {
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		String[] line1 = br.readLine().split("\\.");
		String[] line2 = br.readLine().split("\\.");
		
		System.out.println(check(line1, line2) ? "YES" : "NO");
		
	}
}
0