結果

問題 No.512 魔法少女の追いかけっこ
ユーザー t8m8⛄️
提出日時 2017-08-19 16:37:04
言語 Nim
(2.2.0)
結果
WA  
実行時間 -
コード長 410 bytes
コンパイル時間 2,811 ms
コンパイル使用メモリ 66,176 KB
実行使用メモリ 6,940 KB
最終ジャッジ日時 2024-06-30 02:54:36
合計ジャッジ時間 4,291 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 47 WA * 6
権限があれば一括ダウンロードができます
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 39) Warning: Use the new 'sugar' module instead; future is deprecated [Deprecated]
/home/judge/data/code/Main.nim(1, 47) Warning: imported and not used: 'math' [UnusedImport]
/home/judge/data/code/Main.nim(1, 39) Warning: imported and not used: 'future' [UnusedImport]
/home/judge/data/code/Main.nim(1, 28) Warning: imported and not used: 'algorithm' [UnusedImport]

ソースコード

diff #

import strutils, sequtils, algorithm, future, math

{.warning[SmallLshouldNotBeUsed]: off.}

when isMainModule:
  var
    tmp = stdin.readline.split.map(parsefloat)
    (x, y) = (tmp[0] * 1000, tmp[1] * 1000)
    n = stdin.readline.parseint
    a = stdin.readline.split.map(parsefloat)

  for i in 0..<n-1:
    var
      t = a[i] / x
      d = t * y
    if d > a[i+1]:
      echo "NO"
      quit()
  echo "YES"
0