結果

問題 No.512 魔法少女の追いかけっこ
コンテスト
ユーザー t8m8⛄️
提出日時 2017-08-19 16:38:48
言語 Nim
(2.2.8)
コンパイル:
nim --nimcache=~ --hints:off -o:a.out -d:release cpp _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 2,000 ms
+ 457µs
コード長 374 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,372 ms
コンパイル使用メモリ 70,088 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2026-08-02 03:53:32
合計ジャッジ時間 4,743 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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, 39) Warning: imported and not used: 'future' [UnusedImport]
/home/judge/data/code/Main.nim(1, 28) Warning: imported and not used: 'algorithm' [UnusedImport]

ソースコード

diff #
raw source code

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