Submission #17575125


Source Code Expand

(N,),*Z=$<.map{_1.split.map &:to_i};V,=C=Z.map{|a,b,c|Z.map{(_1-a).abs+(_2-b).abs+[0,_3-c].max}};V+=[9e9]*N*M=1<<N-1;M.times{|v|N.times{|f|g=N.*v|1<<f-1;w=V[v*N+f];N.times{|t|V[g+t]=[V[g+t],w+C[f][t]].min}}};p V[-N-N]

Submission Info

Submission Time
Task E - Traveling Salesman among Aerial Cities
User ds14050
Language Ruby (2.7.1)
Score 500
Code Size 217 Byte
Status AC
Exec Time 1731 ms
Memory 31752 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 500 / 500
Status
AC × 3
AC × 23
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt, random_20.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
random_01.txt AC 1710 ms 31728 KiB
random_02.txt AC 58 ms 14180 KiB
random_03.txt AC 1731 ms 31536 KiB
random_04.txt AC 1709 ms 31628 KiB
random_05.txt AC 1709 ms 31508 KiB
random_06.txt AC 61 ms 14104 KiB
random_07.txt AC 1721 ms 31752 KiB
random_08.txt AC 204 ms 16016 KiB
random_09.txt AC 1724 ms 31496 KiB
random_10.txt AC 54 ms 14252 KiB
random_11.txt AC 1711 ms 31548 KiB
random_12.txt AC 64 ms 14116 KiB
random_13.txt AC 1706 ms 31444 KiB
random_14.txt AC 59 ms 14104 KiB
random_15.txt AC 1712 ms 31588 KiB
random_16.txt AC 123 ms 14968 KiB
random_17.txt AC 1706 ms 31752 KiB
random_18.txt AC 123 ms 15136 KiB
random_19.txt AC 1716 ms 31596 KiB
random_20.txt AC 200 ms 15772 KiB
sample_01.txt AC 57 ms 14212 KiB
sample_02.txt AC 60 ms 14104 KiB
sample_03.txt AC 1706 ms 31576 KiB