0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

隣接都道府県・隣接県を配列で(都道府県コード準拠)

Last updated at Posted at 2020-07-10

都道府県コード(PrefCode)に則り隣接県を示した配列。

地続き

$AdjacentPrefectures = [
    1 => [],
    2 => [3, 5,],
    3 => [2, 4, 5,],
    4 => [3, 5, 6, 7,],
    5 => [2, 3, 4, 6,],
    6 => [4, 5, 7, 15,],
    7 => [4, 6, 8, 9, 10, 15,],
    8 => [7, 9, 11, 12,],
    9 => [7, 8, 10, 11,],
    10 => [7, 9, 11, 15, 20,],
    11 => [8, 9, 10, 12, 13, 19, 20],
    12 => [8, 11, 13,],
    13 => [11, 12, 14, 19],
    14 => [13, 19, 22],
    15 => [6, 7, 10, 16, 20,],
    16 => [15, 17, 20, 21],
    17 => [16, 18, 21,],
    18 => [17, 21, 25, 26],
    19 => [11, 13, 14, 20, 22,],
    20 => [10, 11, 15, 16, 19, 21, 22, 23,],
    21 => [16, 17, 18, 20, 23, 24, 25,],
    22 => [14, 19, 20, 23,],
    23 => [20, 21, 22, 24,],
    24 => [21, 23, 25, 26, 29, 30,],
    25 => [18, 21, 24, 26,],
    26 => [18, 24, 25, 27, 28, 29,],
    27 => [26, 28, 29, 30,],
    28 => [26, 27, 31, 33,],
    29 => [24, 26, 27, 30,],
    30 => [24, 27, 29,],
    31 => [28, 32, 33, 34,],
    32 => [31, 34, 35,],
    33 => [28, 31, 34,],
    34 => [31, 32, 33, 35,],
    35 => [32, 34,],
    36 => [37, 38, 39,],
    37 => [36, 38,],
    38 => [36, 37, 39,],
    39 => [36, 38,],
    40 => [41, 43, 44,],
    41 => [40, 42],
    42 => [41,],
    43 => [40, 44, 45, 46,],
    44 => [40, 43, 45,],
    45 => [43, 44, 46, ],
    46 => [43, 45, ],
    47 => [],
];
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?