結果
問題 | No.105 arcの六角ボルト |
ユーザー | te-sh |
提出日時 | 2016-08-30 15:41:12 |
言語 | D (dmd 2.105.2) |
結果 |
AC
|
実行時間 | 46 ms / 5,000 ms |
コード長 | 594 bytes |
コンパイル時間 | 2,310 ms |
コンパイル使用メモリ | 171,320 KB |
実行使用メモリ | 4,368 KB |
最終ジャッジ日時 | 2023-09-02 21:36:25 |
合計ジャッジ時間 | 2,937 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
ソースコード
import std.algorithm, std.array, std.container, std.range; import std.string, std.conv; import std.math, std.bigint, std.bitmanip, std.random; import std.stdio, std.typecons; alias Tuple!(real, "x", real, "y") point; void main() { auto t = readln.chomp.to!int; foreach (_; 0..t) { readln; auto pi = iota(6).map!((_) { auto rd = readln.split.map!(to!real); return point(rd[0], rd[1]); }); auto ri = pi .map!(p => atan2(p.y, p.x) / PI * 180 + 1e-07) .map!(x => x < 0 ? x + 360 : x) .array; ri.sort(); writefln("%f", ri.front); } }