Submission #1004966


Source Code Expand

a,b,c,d,e,f=`dd`.split.map &:to_f;x,y,z,w=c-a,d-b,e-a,f-b;s=(x*w-y*z).abs/2;o,q,r=[[x,y],[z,w],[x-z,y-w]].map{|x,y|(x*x+y*y)**0.5}.sort;p 2*s/(o+q+r+4*s/r)

Submission Info

Submission Time
Task B - Inscribed Bicycle
User leafmoon
Language Ruby (2.3.3)
Score 500
Code Size 155 Byte
Status AC
Exec Time 15 ms
Memory 2044 KB

Compile Error

./Main.rb:1: warning: `&' interpreted as argument prefix
./Main.rb:1: warning: shadowing outer local variable - x
./Main.rb:1: warning: shadowing outer local variable - y

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 500 / 500
Status
AC × 2
AC × 18
Set Name Test Cases
Sample example0.txt, example1.txt
All 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, example0.txt, example1.txt
Case Name Status Exec Time Memory
000.txt AC 15 ms 2040 KB
001.txt AC 13 ms 2044 KB
002.txt AC 13 ms 2044 KB
003.txt AC 13 ms 2044 KB
004.txt AC 13 ms 2044 KB
005.txt AC 13 ms 2044 KB
006.txt AC 14 ms 2044 KB
007.txt AC 13 ms 2044 KB
008.txt AC 13 ms 2044 KB
009.txt AC 13 ms 2044 KB
010.txt AC 13 ms 2044 KB
011.txt AC 13 ms 2044 KB
012.txt AC 13 ms 2044 KB
013.txt AC 13 ms 2044 KB
014.txt AC 13 ms 2040 KB
015.txt AC 13 ms 2044 KB
example0.txt AC 13 ms 2044 KB
example1.txt AC 13 ms 2044 KB