結果

問題 No.512 魔法少女の追いかけっこ
ユーザー t8m8⛄️
提出日時 2017-08-19 16:38:48
言語 Nim
(2.2.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 374 bytes
コンパイル時間 3,097 ms
コンパイル使用メモリ 66,848 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-30 02:54:41
合計ジャッジ時間 3,876 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 53
権限があれば一括ダウンロードができます
コンパイルメッセージ
/home/judge/data/code/Main.nim(13, 26) Warning: Number of spaces around '*' is not consistent [Spacing]
/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(parseint)
    (x, y) = (tmp[0] * 1000, tmp[1] * 1000)
    n = stdin.readline.parseint
    a = stdin.readline.split.map(parseint)

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