Submission #51703397


Source Code Expand

K,X1,Y1,X2,Y2 = $<.read.split.map(&:to_i)
dx,dy = [(X2-X1).abs,(Y2-Y1).abs].sort
dy -= dx
p (dx+K-1)/K+((dy+K-1)/K+1)/2*2

Submission Info

Submission Time
Task D - Bishop
User ds14050
Language Ruby (ruby 3.2.2)
Score 0
Code Size 126 Byte
Status WA
Exec Time 127 ms
Memory 17308 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 200
Status
AC × 2
AC × 13
WA × 13
Set Name Test Cases
Sample example0.txt, example1.txt
All example0.txt, example1.txt, maximum0.txt, maximum1.txt, maximum2.txt, maximum3.txt, random0.txt, random1.txt, random2.txt, random3.txt, random4.txt, random5.txt, random6.txt, random7.txt, random8.txt, random9.txt, random_k_small0.txt, random_k_small1.txt, random_k_small2.txt, random_k_small3.txt, random_k_small4.txt, random_k_small5.txt, random_k_small6.txt, random_k_small7.txt, random_k_small8.txt, random_k_small9.txt
Case Name Status Exec Time Memory
example0.txt AC 127 ms 17220 KiB
example1.txt AC 43 ms 17112 KiB
maximum0.txt AC 44 ms 17140 KiB
maximum1.txt AC 42 ms 17224 KiB
maximum2.txt AC 42 ms 17204 KiB
maximum3.txt AC 43 ms 17100 KiB
random0.txt WA 42 ms 17084 KiB
random1.txt WA 42 ms 17152 KiB
random2.txt WA 42 ms 16784 KiB
random3.txt AC 42 ms 17140 KiB
random4.txt WA 42 ms 17168 KiB
random5.txt WA 42 ms 17152 KiB
random6.txt WA 42 ms 17008 KiB
random7.txt WA 42 ms 17068 KiB
random8.txt AC 42 ms 17240 KiB
random9.txt AC 43 ms 17172 KiB
random_k_small0.txt AC 42 ms 17308 KiB
random_k_small1.txt AC 42 ms 17172 KiB
random_k_small2.txt AC 42 ms 17204 KiB
random_k_small3.txt WA 42 ms 17168 KiB
random_k_small4.txt AC 42 ms 17136 KiB
random_k_small5.txt WA 42 ms 17044 KiB
random_k_small6.txt WA 42 ms 17040 KiB
random_k_small7.txt WA 42 ms 17212 KiB
random_k_small8.txt WA 43 ms 17068 KiB
random_k_small9.txt WA 42 ms 17152 KiB