結果
問題 | No.138 化石のバージョン |
ユーザー |
![]() |
提出日時 | 2017-08-08 18:37:09 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 151 ms / 5,000 ms |
コード長 | 465 bytes |
コンパイル時間 | 2,722 ms |
コンパイル使用メモリ | 78,924 KB |
実行使用メモリ | 41,576 KB |
最終ジャッジ日時 | 2024-12-29 14:30:05 |
合計ジャッジ時間 | 9,215 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
ソースコード
import java.util.*;class M{public static void main(String[]$){Scanner s=new Scanner(System.in);int[]a=Arrays.stream(s.next().split("\\.")).mapToInt(Integer::parseInt).toArray();int[]b=Arrays.stream(s.next().split("\\.")).mapToInt(Integer::parseInt).toArray();for(int i=0;i<3;++i) {if(a[i]<b[i]) {System.out.println("NO");return;}if(a[i]>b[i]) {System.out.println("YES");return;}}System.out.println("YES");}}