結果

問題 No.512 魔法少女の追いかけっこ
ユーザー takeya_okinotakeya_okino
提出日時 2017-07-08 23:42:52
言語 Java21
(openjdk 21)
結果
AC  
実行時間 141 ms / 2,000 ms
コード長 475 bytes
コンパイル時間 2,017 ms
コンパイル使用メモリ 71,444 KB
実行使用メモリ 56,204 KB
最終ジャッジ日時 2023-09-09 13:39:35
合計ジャッジ時間 11,200 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,712 KB
testcase_01 AC 125 ms
55,940 KB
testcase_02 AC 131 ms
55,480 KB
testcase_03 AC 125 ms
55,548 KB
testcase_04 AC 136 ms
56,004 KB
testcase_05 AC 128 ms
53,856 KB
testcase_06 AC 123 ms
55,716 KB
testcase_07 AC 129 ms
55,924 KB
testcase_08 AC 135 ms
55,656 KB
testcase_09 AC 127 ms
55,876 KB
testcase_10 AC 134 ms
55,716 KB
testcase_11 AC 129 ms
55,896 KB
testcase_12 AC 128 ms
56,032 KB
testcase_13 AC 130 ms
55,780 KB
testcase_14 AC 127 ms
55,804 KB
testcase_15 AC 132 ms
55,568 KB
testcase_16 AC 131 ms
55,924 KB
testcase_17 AC 130 ms
55,784 KB
testcase_18 AC 126 ms
55,980 KB
testcase_19 AC 131 ms
55,660 KB
testcase_20 AC 122 ms
55,676 KB
testcase_21 AC 132 ms
55,804 KB
testcase_22 AC 124 ms
55,604 KB
testcase_23 AC 125 ms
55,972 KB
testcase_24 AC 135 ms
55,816 KB
testcase_25 AC 126 ms
56,164 KB
testcase_26 AC 130 ms
55,964 KB
testcase_27 AC 126 ms
55,632 KB
testcase_28 AC 125 ms
55,680 KB
testcase_29 AC 130 ms
55,992 KB
testcase_30 AC 129 ms
55,628 KB
testcase_31 AC 131 ms
55,620 KB
testcase_32 AC 129 ms
55,696 KB
testcase_33 AC 128 ms
56,204 KB
testcase_34 AC 135 ms
55,656 KB
testcase_35 AC 131 ms
55,632 KB
testcase_36 AC 126 ms
55,716 KB
testcase_37 AC 126 ms
55,520 KB
testcase_38 AC 131 ms
55,876 KB
testcase_39 AC 125 ms
55,448 KB
testcase_40 AC 130 ms
55,668 KB
testcase_41 AC 123 ms
55,772 KB
testcase_42 AC 128 ms
55,816 KB
testcase_43 AC 130 ms
55,684 KB
testcase_44 AC 133 ms
55,976 KB
testcase_45 AC 136 ms
55,660 KB
testcase_46 AC 135 ms
56,032 KB
testcase_47 AC 141 ms
55,816 KB
testcase_48 AC 124 ms
55,824 KB
testcase_49 AC 122 ms
55,644 KB
testcase_50 AC 120 ms
55,872 KB
testcase_51 AC 123 ms
55,776 KB
testcase_52 AC 131 ms
55,904 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int x = sc.nextInt();
    int y = sc.nextInt();
    int N = sc.nextInt();
    int[] a = new int[N];
    for(int i = 0; i < N; i++) {
      a[i] = sc.nextInt();
    }
    String ans = "YES";
    for(int i = 0; i < N - 1; i++) {
      if(y * a[i] > x * a[i + 1]) {
        ans = "NO";
        break;
      }
    }
    System.out.println(ans);
  }
}
0