結果

問題 No.105 arcの六角ボルト
コンテスト
ユーザー むらため
提出日時 2019-01-29 02:50:38
言語 Nim
(2.2.8)
コンパイル:
nim --nimcache=~ --hints:off -o:a.out -d:release cpp _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 726 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,375 ms
コンパイル使用メモリ 70,220 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2026-03-22 10:30:31
合計ジャッジ時間 2,801 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'sequtils' [UnusedImport]
/home/judge/data/code/Main.nim(1, 32) Warning: imported and not used: 'strutils' [UnusedImport]

ソースコード

diff #
raw source code

import sequtils,algorithm,math,strutils
template times*(n:int,body) = (for _ in 0..<n: body)
proc scanf(formatstr: cstring){.header: "<stdio.h>", varargs.}
proc getchar_unlocked():char {. importc:"getchar_unlocked",header: "<stdio.h>" .}
proc scan(): int =
  while true:
    let k = getchar_unlocked()
    if k < '0': break
    result = 10 * result + k.ord - '0'.ord
proc printFloat(f:float) =
  if f < 1e-8: echo 0.0
  else: echo f

var T : array[6,float32]

scan().times:
  discard getchar_unlocked()
  for i in 0..<6:
    var x,y:float32
    scanf("%f %f\n",addr x,addr y)
    T[i] = arctan2(x,y) / PI * 180.0
  T.sort(cmp)
  if T[0] < -150.0:  printFloat( -T[0] - 150.0)
  else: printFloat((210.0-T[^1]) mod 59.9999999999)
0