結果
問題 | No.105 arcの六角ボルト |
ユーザー |
|
提出日時 | 2018-09-06 21:24:31 |
言語 | Scheme (Gauche-0.9.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 660 bytes |
コンパイル時間 | 324 ms |
コンパイル使用メモリ | 5,376 KB |
実行使用メモリ | 16,896 KB |
最終ジャッジ日時 | 2024-11-24 04:23:05 |
合計ジャッジ時間 | 1,203 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | RE * 1 |
ソースコード
(use math.const) (define (main args) (let [(n (read))] (let loop [(x n)] (cond [(zero? x) #t] [else (print (solve)) (loop (- x 1))]))) 0) (define (solve) (let [(pl (read-points)) (xmn (cos (* pi/180 171))) (xmx (cos (* pi/180 119)))] ($ apply min $ filter (^a (> a 0)) $ map ang $ filter (^p (and (< (car p) xmx) (< xmn (car p)) (> (cadr p) 0))) pl))) (define (read-points) (let loop [(n 6) (ls ())] (cond [(zero? n) ls] [else (loop (- n 1) (cons (list (read) (read)) ls))]))) (define (ang x) (- (* 180/pi (acos (car x))) 120.0))