如何使用包含数字的键对 TreeMap<String, Boolean> 的 keySet() 进行排序?

How to sort the keySet() of a TreeMap<String, Boolean> with keys containing number?

我将简要描述我所做的,然后展示我得到的结果与我想要的结果有何不同。

提前感谢您的任何建议。

Java 代码是在 java 在线编译器中创建的,并且在任何情况下都可以在没有错误消息的情况下执行。

Java online compiler, which was used

简短描述:

我想为方矩阵的行索引和列索引之间的每个可能组合分配一个布尔值。
只有主对角线要排除在外。为此,我使用 TreeMap <String, Boolean>

我通过在for循环中链接{行索引+“-”+列索引}来形成TreeMap的键。
开始时,键的所有值都被赋值{假}。

在第二个循环中,所选索引 basicL 与其他索引 (=keys) 的每个可能组合都将与布尔值 true 相关联(同样没有主对角线的值)。因此,TreeMap.keySet() 将按排序顺序打印(按键排序)。例如 basicL = 4;

矩阵说明 (Boolean true=green, Boolean false=white, excluded=grey):

Java-代码:

import java.util.TreeMap;

public class Main {

  static TreeMap<String, Boolean> booleanMap = new TreeMap<>();

  public static void main(String[] args) {

    //all values of symmetric matrix without diagonal axis

    int max = 16;
    int basicL = 4;

    for (int i = 1; i <= max; i++) {

      for (int j = 1; j <= max; j++) {

        if (j != i) {
          booleanMap.put(i + "-" + j, Boolean.valueOf(false));
        }
      }
    }

    System.out.println("-----------------------------------------------------");
    System.out.println("TreeMap has size:  " + booleanMap.size());
    System.out.println("TreeMap values:    " + booleanMap.values());
    System.out.println("TreeMap keySet:   " + booleanMap.keySet());
    System.out.println("-----------------------------------------------------");

    // setting true-conditions

    for (int i = 1; i <= max; i++) {

      if (i != basicL) {

        for (int j = 1; j <= max; j++) {

          if (j == basicL) {

            booleanMap.replace(i + "-" + j, Boolean.valueOf(true));
          }
        }
      }

      if (i == basicL) {

        for (int j = 1; j <= max; j++) {

          if (j != i) {

            booleanMap.replace(i + "-" + j, Boolean.valueOf(true));

          }
        }
      }
    }

    System.out.println("TreeMap values after looping:    " + booleanMap.values());
    System.out.println("TreeMap keySet after looping:    " + booleanMap.keySet());
    System.out.println("-----------------------------------------------------");
  }
}

booleanMap.keySet();

取得的成绩
[1-10, 1-11, 1-12, 1-13, 1-14, 1-15, 1-16, 1-2, 1-3, 1-4, 1-5, 1-6, 1-7, 1-8, 1-9, 10-1, 10-11, 10-12, 10-13, 10-14, 10-15, 10-16, 10-2 .... ]

想要的结果:

[1-2, 1-3, 1-4, 1-5, 1-6, 1-7, 1-8, 1-9, 1-10, 1-11, 1-12, 1-13, 1-14, 1-15, 1-16, 2-1, 2-3, 2-4, 2-5, 2-6, 2-7, 2-8, 2-9, 2-10, 2-11, 2-12 .... ]

默认情况下,TreeMap 中的 String 按 lexicographical order. You need a custom comparatorTreeMap 中按数字排序,

TreeMap<String, Boolean> booleanMap = new TreeMap<>((s1, s2) -> {
    String[] arr1 = s1.split("-");
    String[] arr2 = s2.split("-");
    int i1 = Integer.valueOf(arr1[0]);
    int j1 = Integer.valueOf(arr1[1]);
    int i2 = Integer.valueOf(arr2[0]);
    int j2 = Integer.valueOf(arr2[1]);
    if (i1 != i2) {
        return Integer.compare(i1, i2);
    }
    return Integer.compare(j1, j2);
});

索引是按字典顺序排序的,不是按照数字的值排序的。一种解决方案是在前面加上零 (1-12 -> 001-012)。另一种方法是将自定义比较器传递给 TreeMap 的构造函数,如@samabcde 的答案所示。

我建议您为矩阵中的位置创建自定义 class。您可以实现 compareToTreeMap 自动为您处理排序。此外,您可以显着简化第二个循环并删除布尔值的装箱。

TreeMap<Position, Boolean> booleanMap = new TreeMap<>();

int max = 16;
int basicL = 4;

for (int i = 1; i <= max; i++) {
    for (int j = 1; j <= max; j++) {
        if (j != i) {
            booleanMap.put(new Position(i, j), Boolean.FALSE);
        }
    }
}
for (int i = 1; i <= max; i++) {
    for (int j = 1; j <= max; j++) {
        if ((i != basicL && j == basicL) || (i == basicL && j != i)) {
            booleanMap.replace(new Position(i, j), Boolean.TRUE);
        }
    }
}
static class Position implements Comparable<Position> {

    private final int x;
    private final int y;

    public Position(final int x, final int y) {
        this.x = x;
        this.y = y;
    }

    public int getX() {
        return x;
    }

    public int getY() {
        return y;
    }

    @Override
    public int compareTo(final Position o) {
        final int res = Integer.compare(getX(), o.getX());
        return (res != 0) ? res : Integer.compare(getY(), o.getY());
    }

    @Override
    public String toString() {
        return x + "-" + y;
    }
}

感谢您的帮助!

我现在尝试了以下方法:

  1. @clstrfsck (String.format())
  2. @samabcde(自定义比较器)
  3. @马特(创建自定义 class)

解决方法1和3我能够成功使用并生成所需的输出。
方法2我还不太明白,因为我仍然缺乏lamda表达式的背景知识,但也许我会做对的。

使用String.format

我还使用迭代器和子字符串生成键值对并将它们重新格式化。

import java.util.TreeMap;
import java.util.*;

public class Main {

  static TreeMap<String, Boolean> booleanMap = new TreeMap<>();
  
  static String subKey;
  static String subKey2;
  static Integer subKey3;
  static Integer subKey4;
  static String formattedKey;

  public static void main(String[] args) {

    //all values of symmetric matrix without diagonal axis

    int max = 16;
    int basicL = 4;

    for (int i = 1; i <= max; i++) {

      for (int j = 1; j <= max; j++) {

        if (j != i) {
          booleanMap.put(String.format("%03d-%03d", i, j), Boolean.FALSE);
        }
      }
    }

    for (int i = 1; i <= max; i++) {

      if (i != basicL) {

        for (int j = 1; j <= max; j++) {

          if (j == basicL) {

            booleanMap.replace(String.format("%03d-%03d", i, j), Boolean.TRUE);
          }
        }
      }

      if (i == basicL) {

        for (int j = 1; j <= max; j++) {

          if (j != i) {

            booleanMap.replace(String.format("%03d-%03d", i, j), Boolean.TRUE);

          }
        }
      }
    }
    
     Iterator<Map.Entry<String, Boolean>> itr = booleanMap.entrySet().iterator();
     
     System.out.println("------KEY-VALUE PAIRS------");
         
        while(itr.hasNext())
        {
             Map.Entry<String, Boolean> entry = itr.next();
             
             subKey = entry.getKey().substring(0, 3);
             subKey2 = entry.getKey().substring(4, 7);
             subKey3 = Integer.parseInt(subKey);
             subKey4 = Integer.parseInt(subKey2);
             
             formattedKey = subKey3 +"-"+ subKey4;
             
             System.out.println("Key:" + formattedKey + " ,Value:" + entry.getValue());                     
            
        }
  }
}

结果:

------KEY-VALUE PAIRS------

Key:1-2 ,Value:false
Key:1-3 ,Value:false
Key:1-4 ,Value:true
Key:1-5 ,Value:false
Key:1-6 ,Value:false
Key:1-7 ,Value:false
Key:1-8 ,Value:false
Key:1-9 ,Value:false
Key:1-10 ,Value:false
Key:1-11 ,Value:false
Key:1-12 ,Value:false
Key:1-13 ,Value:false
Key:1-14 ,Value:false
Key:1-15 ,Value:false
Key:1-16 ,Value:false
Key:2-1 ,Value:false
Key:2-3 ,Value:false
Key:2-4 ,Value:true
Key:2-5 ,Value:false
Key:2-6 ,Value:false
Key:2-7 ,Value:false
Key:2-8 ,Value:false
Key:2-9 ,Value:false
Key:2-10 ,Value:false
Key:2-11 ,Value:false
Key:2-12 ,Value:false
Key:2-13 ,Value:false
Key:2-14 ,Value:false
Key:2-15 ,Value:false
Key:2-16 ,Value:false
Key:3-1 ,Value:false
Key:3-2 ,Value:false
Key:3-4 ,Value:true
Key:3-5 ,Value:false
Key:3-6 ,Value:false
Key:3-7 ,Value:false
Key:3-8 ,Value:false
Key:3-9 ,Value:false
Key:3-10 ,Value:false
Key:3-11 ,Value:false
Key:3-12 ,Value:false
Key:3-13 ,Value:false
Key:3-14 ,Value:false
Key:3-15 ,Value:false
Key:3-16 ,Value:false
Key:4-1 ,Value:true
Key:4-2 ,Value:true
Key:4-3 ,Value:true
Key:4-5 ,Value:true
Key:4-6 ,Value:true
Key:4-7 ,Value:true
Key:4-8 ,Value:true
Key:4-9 ,Value:true
Key:4-10 ,Value:true
Key:4-11 ,Value:true
Key:4-12 ,Value:true
Key:4-13 ,Value:true
Key:4-14 ,Value:true
Key:4-15 ,Value:true
Key:4-16 ,Value:true
Key:5-1 ,Value:false
Key:5-2 ,Value:false
Key:5-3 ,Value:false
Key:5-4 ,Value:true
Key:5-6 ,Value:false
Key:5-7 ,Value:false
Key:5-8 ,Value:false
Key:5-9 ,Value:false
Key:5-10 ,Value:false
Key:5-11 ,Value:false
Key:5-12 ,Value:false
Key:5-13 ,Value:false
Key:5-14 ,Value:false
Key:5-15 ,Value:false
Key:5-16 ,Value:false
Key:6-1 ,Value:false
Key:6-2 ,Value:false
Key:6-3 ,Value:false
Key:6-4 ,Value:true
Key:6-5 ,Value:false
Key:6-7 ,Value:false
Key:6-8 ,Value:false
Key:6-9 ,Value:false
Key:6-10 ,Value:false
Key:6-11 ,Value:false
Key:6-12 ,Value:false
Key:6-13 ,Value:false
Key:6-14 ,Value:false
Key:6-15 ,Value:false
Key:6-16 ,Value:false
Key:7-1 ,Value:false
Key:7-2 ,Value:false
Key:7-3 ,Value:false
Key:7-4 ,Value:true
Key:7-5 ,Value:false
Key:7-6 ,Value:false
Key:7-8 ,Value:false
Key:7-9 ,Value:false
Key:7-10 ,Value:false
Key:7-11 ,Value:false
Key:7-12 ,Value:false
Key:7-13 ,Value:false
Key:7-14 ,Value:false
Key:7-15 ,Value:false
Key:7-16 ,Value:false
Key:8-1 ,Value:false
Key:8-2 ,Value:false
Key:8-3 ,Value:false
Key:8-4 ,Value:true
Key:8-5 ,Value:false
Key:8-6 ,Value:false
Key:8-7 ,Value:false
Key:8-9 ,Value:false
Key:8-10 ,Value:false
Key:8-11 ,Value:false
Key:8-12 ,Value:false
Key:8-13 ,Value:false
Key:8-14 ,Value:false
Key:8-15 ,Value:false
Key:8-16 ,Value:false
Key:9-1 ,Value:false
Key:9-2 ,Value:false
Key:9-3 ,Value:false
Key:9-4 ,Value:true
Key:9-5 ,Value:false
Key:9-6 ,Value:false
Key:9-7 ,Value:false
Key:9-8 ,Value:false
Key:9-10 ,Value:false
Key:9-11 ,Value:false
Key:9-12 ,Value:false
Key:9-13 ,Value:false
Key:9-14 ,Value:false
Key:9-15 ,Value:false
Key:9-16 ,Value:false
Key:10-1 ,Value:false
Key:10-2 ,Value:false
Key:10-3 ,Value:false
Key:10-4 ,Value:true
Key:10-5 ,Value:false
Key:10-6 ,Value:false
Key:10-7 ,Value:false
Key:10-8 ,Value:false
Key:10-9 ,Value:false
Key:10-11 ,Value:false
Key:10-12 ,Value:false
Key:10-13 ,Value:false
Key:10-14 ,Value:false
Key:10-15 ,Value:false
Key:10-16 ,Value:false
Key:11-1 ,Value:false
Key:11-2 ,Value:false
Key:11-3 ,Value:false
Key:11-4 ,Value:true
Key:11-5 ,Value:false
Key:11-6 ,Value:false
Key:11-7 ,Value:false
Key:11-8 ,Value:false
Key:11-9 ,Value:false
Key:11-10 ,Value:false
Key:11-12 ,Value:false
Key:11-13 ,Value:false
Key:11-14 ,Value:false
Key:11-15 ,Value:false
Key:11-16 ,Value:false
Key:12-1 ,Value:false
Key:12-2 ,Value:false
Key:12-3 ,Value:false
Key:12-4 ,Value:true
Key:12-5 ,Value:false
Key:12-6 ,Value:false
Key:12-7 ,Value:false
Key:12-8 ,Value:false
Key:12-9 ,Value:false
Key:12-10 ,Value:false
Key:12-11 ,Value:false
Key:12-13 ,Value:false
Key:12-14 ,Value:false
Key:12-15 ,Value:false
Key:12-16 ,Value:false
Key:13-1 ,Value:false
Key:13-2 ,Value:false
Key:13-3 ,Value:false
Key:13-4 ,Value:true
Key:13-5 ,Value:false
Key:13-6 ,Value:false
Key:13-7 ,Value:false
Key:13-8 ,Value:false
Key:13-9 ,Value:false
Key:13-10 ,Value:false
Key:13-11 ,Value:false
Key:13-12 ,Value:false
Key:13-14 ,Value:false
Key:13-15 ,Value:false
Key:13-16 ,Value:false
Key:14-1 ,Value:false
Key:14-2 ,Value:false
Key:14-3 ,Value:false
Key:14-4 ,Value:true
Key:14-5 ,Value:false
Key:14-6 ,Value:false
Key:14-7 ,Value:false
Key:14-8 ,Value:false
Key:14-9 ,Value:false
Key:14-10 ,Value:false
Key:14-11 ,Value:false
Key:14-12 ,Value:false
Key:14-13 ,Value:false
Key:14-15 ,Value:false
Key:14-16 ,Value:false
Key:15-1 ,Value:false
Key:15-2 ,Value:false
Key:15-3 ,Value:false
Key:15-4 ,Value:true
Key:15-5 ,Value:false
Key:15-6 ,Value:false
Key:15-7 ,Value:false
Key:15-8 ,Value:false
Key:15-9 ,Value:false
Key:15-10 ,Value:false
Key:15-11 ,Value:false
Key:15-12 ,Value:false
Key:15-13 ,Value:false
Key:15-14 ,Value:false
Key:15-16 ,Value:false
Key:16-1 ,Value:false
Key:16-2 ,Value:false
Key:16-3 ,Value:false
Key:16-4 ,Value:true
Key:16-5 ,Value:false
Key:16-6 ,Value:false
Key:16-7 ,Value:false
Key:16-8 ,Value:false
Key:16-9 ,Value:false
Key:16-10 ,Value:false
Key:16-11 ,Value:false
Key:16-12 ,Value:false
Key:16-13 ,Value:false
Key:16-14 ,Value:false
Key:16-15 ,Value:false

创建自定义 class(对我来说最有效的解决方案)

import java.util.TreeMap;
import java.lang.*;

public class Main {

  static TreeMap<Position, Boolean> booleanMap = new TreeMap<>();
   
  static public class Position implements Comparable<Position> {

    private final int x;
    private final int y;

    public Position(final int x, final int y) {
        this.x = x;
        this.y = y;
    }

    public int getX() {
        return x;
    }

    public int getY() {
        return y;
    }

    @Override
    public int compareTo(final Position o) {
        final int res = Integer.compare(getX(), o.getX());
        return (res != 0) ? res : Integer.compare(getY(), o.getY());
    }

    @Override
    public String toString() {
        return x + "-" + y;
    }
}

  public static void main(String[] args) {
  
    //all values of symmetric matrix without diagonal axis

    int max = 16;
    int basicL = 4;

   for (int i = 1; i <= max; i++) {
     for (int j = 1; j <= max; j++) {
        if (j != i) {
            booleanMap.put(new Position(i, j), Boolean.FALSE);
          }
         }
        }

    System.out.println("-----------------------------------------------------");
    System.out.println("TreeMap has size:  " + booleanMap.size());
    System.out.println("TreeMap values:    " + booleanMap.values());
    System.out.println("TreeMap keySet:    " + booleanMap.keySet());
    System.out.println("-----------------------------------------------------");

    // setting true-conditions

   for (int i = 1; i <= max; i++) {
    for (int j = 1; j <= max; j++) {
        if ((i != basicL && j == basicL) || (i == basicL && j != i)) {
            booleanMap.replace(new Position(i, j), Boolean.TRUE);
        }
    }
}  

    System.out.println("TreeMap values after looping:    " + booleanMap.values());
    System.out.println("TreeMap keySet after looping:    " + booleanMap.keySet());
    System.out.println("-----------------------------------------------------");
    
  }
}

结果:


TreeMap has size:  240
TreeMap values:    [false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false]
TreeMap keySet:    [1-2, 1-3, 1-4, 1-5, 1-6, 1-7, 1-8, 1-9, 1-10, 1-11, 1-12, 1-13, 1-14, 1-15, 1-16, 2-1, 2-3, 2-4, 2-5, 2-6, 2-7, 2-8, 2-9, 2-10, 2-11, 2-12, 2-13, 2-14, 2-15, 2-16, 3-1, 3-2, 3-4, 3-5, 3-6, 3-7, 3-8, 3-9, 3-10, 3-11, 3-12, 3-13, 3-14, 3-15, 3-16, 4-1, 4-2, 4-3, 4-5, 4-6, 4-7, 4-8, 4-9, 4-10, 4-11, 4-12, 4-13, 4-14, 4-15, 4-16, 5-1, 5-2, 5-3, 5-4, 5-6, 5-7, 5-8, 5-9, 5-10, 5-11, 5-12, 5-13, 5-14, 5-15, 5-16, 6-1, 6-2, 6-3, 6-4, 6-5, 6-7, 6-8, 6-9, 6-10, 6-11, 6-12, 6-13, 6-14, 6-15, 6-16, 7-1, 7-2, 7-3, 7-4, 7-5, 7-6, 7-8, 7-9, 7-10, 7-11, 7-12, 7-13, 7-14, 7-15, 7-16, 8-1, 8-2, 8-3, 8-4, 8-5, 8-6, 8-7, 8-9, 8-10, 8-11, 8-12, 8-13, 8-14, 8-15, 8-16, 9-1, 9-2, 9-3, 9-4, 9-5, 9-6, 9-7, 9-8, 9-10, 9-11, 9-12, 9-13, 9-14, 9-15, 9-16, 10-1, 10-2, 10-3, 10-4, 10-5, 10-6, 10-7, 10-8, 10-9, 10-11, 10-12, 10-13, 10-14, 10-15, 10-16, 11-1, 11-2, 11-3, 11-4, 11-5, 11-6, 11-7, 11-8, 11-9, 11-10, 11-12, 11-13, 11-14, 11-15, 11-16, 12-1, 12-2, 12-3, 12-4, 12-5, 12-6, 12-7, 12-8, 12-9, 12-10, 12-11, 12-13, 12-14, 12-15, 12-16, 13-1, 13-2, 13-3, 13-4, 13-5, 13-6, 13-7, 13-8, 13-9, 13-10, 13-11, 13-12, 13-14, 13-15, 13-16, 14-1, 14-2, 14-3, 14-4, 14-5, 14-6, 14-7, 14-8, 14-9, 14-10, 14-11, 14-12, 14-13, 14-15, 14-16, 15-1, 15-2, 15-3, 15-4, 15-5, 15-6, 15-7, 15-8, 15-9, 15-10, 15-11, 15-12, 15-13, 15-14, 15-16, 16-1, 16-2, 16-3, 16-4, 16-5, 16-6, 16-7, 16-8, 16-9, 16-10, 16-11, 16-12, 16-13, 16-14, 16-15]
-----------------------------------------------------
TreeMap values after looping:    [false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false]
TreeMap keySet after looping:    [1-2, 1-3, 1-4, 1-5, 1-6, 1-7, 1-8, 1-9, 1-10, 1-11, 1-12, 1-13, 1-14, 1-15, 1-16, 2-1, 2-3, 2-4, 2-5, 2-6, 2-7, 2-8, 2-9, 2-10, 2-11, 2-12, 2-13, 2-14, 2-15, 2-16, 3-1, 3-2, 3-4, 3-5, 3-6, 3-7, 3-8, 3-9, 3-10, 3-11, 3-12, 3-13, 3-14, 3-15, 3-16, 4-1, 4-2, 4-3, 4-5, 4-6, 4-7, 4-8, 4-9, 4-10, 4-11, 4-12, 4-13, 4-14, 4-15, 4-16, 5-1, 5-2, 5-3, 5-4, 5-6, 5-7, 5-8, 5-9, 5-10, 5-11, 5-12, 5-13, 5-14, 5-15, 5-16, 6-1, 6-2, 6-3, 6-4, 6-5, 6-7, 6-8, 6-9, 6-10, 6-11, 6-12, 6-13, 6-14, 6-15, 6-16, 7-1, 7-2, 7-3, 7-4, 7-5, 7-6, 7-8, 7-9, 7-10, 7-11, 7-12, 7-13, 7-14, 7-15, 7-16, 8-1, 8-2, 8-3, 8-4, 8-5, 8-6, 8-7, 8-9, 8-10, 8-11, 8-12, 8-13, 8-14, 8-15, 8-16, 9-1, 9-2, 9-3, 9-4, 9-5, 9-6, 9-7, 9-8, 9-10, 9-11, 9-12, 9-13, 9-14, 9-15, 9-16, 10-1, 10-2, 10-3, 10-4, 10-5, 10-6, 10-7, 10-8, 10-9, 10-11, 10-12, 10-13, 10-14, 10-15, 10-16, 11-1, 11-2, 11-3, 11-4, 11-5, 11-6, 11-7, 11-8, 11-9, 11-10, 11-12, 11-13, 11-14, 11-15, 11-16, 12-1, 12-2, 12-3, 12-4, 12-5, 12-6, 12-7, 12-8, 12-9, 12-10, 12-11, 12-13, 12-14, 12-15, 12-16, 13-1, 13-2, 13-3, 13-4, 13-5, 13-6, 13-7, 13-8, 13-9, 13-10, 13-11, 13-12, 13-14, 13-15, 13-16, 14-1, 14-2, 14-3, 14-4, 14-5, 14-6, 14-7, 14-8, 14-9, 14-10, 14-11, 14-12, 14-13, 14-15, 14-16, 15-1, 15-2, 15-3, 15-4, 15-5, 15-6, 15-7, 15-8, 15-9, 15-10, 15-11, 15-12, 15-13, 15-14, 15-16, 16-1, 16-2, 16-3, 16-4, 16-5, 16-6, 16-7, 16-8, 16-9, 16-10, 16-11, 16-12, 16-13, 16-14, 16-15]
-----------------------------------------------------