Submission #869817


Source Code Expand

Copy
a=`dd`.split.map(&.to_i);n,x=a.shift 2;b=a.dup;p (0...n).map{|i|t=0;n.times{|j|t+=b[j]=[b[j],a[(j-i)%n]].min};t+x*i}.min

Submission Info

Submission Time
Task B - Colorful Slimes
User leafmoon
Language Crystal (0.20.5)
Score 0
Code Size 120 Byte
Status
Exec Time 2105 ms
Memory 860 KB

Judge Result

Set Name Score / Max Score Test Cases
Sample 0 / 0 0_00.txt, 0_01.txt, 0_02.txt
All 0 / 400 0_00.txt, 0_01.txt, 0_02.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt, 1_04.txt, 1_05.txt, 1_06.txt, 1_07.txt, 1_08.txt, 1_09.txt, 1_10.txt, 1_11.txt, 1_12.txt, 1_13.txt, 1_14.txt, 1_15.txt, 1_16.txt, 1_17.txt
Case Name Status Exec Time Memory
0_00.txt 2101 ms 852 KB
0_01.txt 2101 ms 856 KB
0_02.txt 2101 ms 856 KB
1_00.txt 2105 ms 856 KB
1_01.txt 2101 ms 860 KB
1_02.txt 2101 ms 860 KB
1_03.txt 2101 ms 856 KB
1_04.txt 2101 ms 852 KB
1_05.txt 2101 ms 852 KB
1_06.txt 2101 ms 856 KB
1_07.txt 2101 ms 860 KB
1_08.txt 2105 ms 856 KB
1_09.txt 2101 ms 856 KB
1_10.txt 2101 ms 856 KB
1_11.txt 2101 ms 856 KB
1_12.txt 2101 ms 856 KB
1_13.txt 2101 ms 852 KB
1_14.txt 2101 ms 856 KB
1_15.txt 2105 ms 860 KB
1_16.txt 2101 ms 852 KB
1_17.txt 2101 ms 856 KB