Submission #3572129
Source Code Expand
import Control.Monad import Data.List main=do [r,n,m]<-map read.words<$>getLine::IO[Double] print $ sum $ map (sol n r m) [1..(n+m-1)] sol n r m i = (*2) $ sqrt $ max (c x1) (c x2) where x1 = if i-m<=0 then 0 else 2.0 * r * (i-m) / n x2 = if i>=n then 0 else 2.0 * r * i / n c x = 2*r*x - x*x
Submission Info
Submission Time | |
---|---|
Task | B - ステップカット |
User | mick0321 |
Language | Haskell (GHC 7.10.3) |
Score | 200 |
Code Size | 341 Byte |
Status | AC |
Exec Time | 13 ms |
Memory | 1020 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_example_01.txt, 00_example_02.txt, 00_example_03.txt |
All | 00_example_01.txt, 00_example_02.txt, 00_example_03.txt, 10_rand_01.txt, 10_rand_02.txt, 10_rand_03.txt, 10_rand_04.txt, 10_rand_05.txt, 10_rand_06.txt, 10_rand_07.txt, 10_rand_08.txt, 20_hand_01.txt, 20_hand_02.txt, 20_hand_03.txt, 20_hand_04.txt, 20_hand_05.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_example_01.txt | AC | 1 ms | 508 KB |
00_example_02.txt | AC | 1 ms | 508 KB |
00_example_03.txt | AC | 8 ms | 1020 KB |
10_rand_01.txt | AC | 1 ms | 508 KB |
10_rand_02.txt | AC | 1 ms | 508 KB |
10_rand_03.txt | AC | 5 ms | 1020 KB |
10_rand_04.txt | AC | 2 ms | 636 KB |
10_rand_05.txt | AC | 2 ms | 1020 KB |
10_rand_06.txt | AC | 2 ms | 1020 KB |
10_rand_07.txt | AC | 3 ms | 1020 KB |
10_rand_08.txt | AC | 3 ms | 1020 KB |
20_hand_01.txt | AC | 8 ms | 1020 KB |
20_hand_02.txt | AC | 13 ms | 1020 KB |
20_hand_03.txt | AC | 8 ms | 1020 KB |
20_hand_04.txt | AC | 1 ms | 508 KB |
20_hand_05.txt | AC | 1 ms | 508 KB |