結果

問題 No.456 Millions of Submits!
ユーザー t8m8⛄️t8m8⛄️
提出日時 2016-12-08 19:08:55
言語 Nim
(2.0.2)
結果
WA  
実行時間 -
コード長 817 bytes
コンパイル時間 2,560 ms
コンパイル使用メモリ 66,836 KB
実行使用メモリ 4,684 KB
最終ジャッジ日時 2023-09-12 08:48:23
合計ジャッジ時間 27,709 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,571 ms
4,456 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'strutils' [UnusedImport]
/home/judge/data/code/Main.nim(1, 34) Warning: imported and not used: 'strscans' [UnusedImport]

ソースコード

diff #

import strutils, sequtils, math, strscans

proc scanf(frmt: cstring) {.varargs, importc, header: "<stdio.h>".}
proc printf(formatstr: cstring) {.header: "<stdio.h>", importc: "printf", varargs.}

proc f(n, a, b : float64): float64 {.inline.} = pow(n, a) * pow(ln(n), b)

when isMainModule:
  var
    m: int
    a, b, t: float64
  scanf("%ld", addr m)

  var x = newSeqWith(11, newSeqWith(11, newSeq[float64](1001)))

  for i in 0..10:
    for j in 0..10:
      for k in 0..1000:
        var (l, r) = (0.0, 1000000000.0)

        for p in 1..100:
          var mid = (l + r) / 2
          if f(mid, i.float64, j.float64) <= k.float64 / 100: l = mid
          else: r = mid

        x[i][j][k] = r


  for i in 0..m-1:
    scanf("%lf %lf %lf", addr a, addr b, addr t)
    printf("%.11f\n", x[a.int][b.int][(t*100).int])
0