示例#1
0
文件: Gen.java 项目: hrnn/olymp
 static void genSimple() throws IOException {
   data.add("a");
   data.add("da");
   data.add("dd");
   data.add("cc");
   print();
   data.add("a");
   data.add("j");
   data.add("jb");
   data.add("ac");
   print();
 }
示例#2
0
文件: Gen.java 项目: hrnn/olymp
 static void genRandom(int cnt, int value) throws IOException {
   ArrayList<Integer> ch = new ArrayList<Integer>();
   ch.add(rand.nextInt(value / cnt));
   for (int i = 1; i < cnt; i++) ch.add(rand.nextInt(value / cnt) + 1 + ch.get(i - 1));
   crypto(ch);
   print();
 }
示例#3
0
文件: Gen.java 项目: hrnn/olymp
 static void genRandom2(int cnt, int len) throws IOException {
   for (int i = 0; i < cnt; i++) {
     String t = "";
     for (int j = 0; j < len; j++) t += (char) ('a' + rand.nextInt(10));
     data.add(t);
   }
   print();
 }
示例#4
0
文件: Gen.java 项目: hrnn/olymp
 static void genYes(int cnt, int len) throws IOException {
   for (int i = 0; i < cnt; i++) {
     String t = "";
     for (int j = 0; j < len; j++) t += (char) ('a' + rand.nextInt(10));
     data.add(t);
   }
   Collections.sort(data);
   print();
 }
示例#5
0
文件: Gen.java 项目: hrnn/olymp
  static void genNo(int cnt, int value) throws IOException {
    ArrayList<Integer> ch = new ArrayList<Integer>();

    for (int i = 0; i < cnt - 1; i++) ch.add(rand.nextInt(value) + 1);
    ch.add(ch.get(rand.nextInt(cnt - 1)));
    Collections.sort(ch);
    crypto(ch);
    print();
  }
示例#6
0
文件: Gen.java 项目: hrnn/olymp
 static void genSpecialNo(int len) throws IOException {
   for (int i = 0; i < 10; i++) {
     String t = "";
     t += (char) ('a' + i);
     for (int j = 1; j < len; j++) t += "a";
     data.add(t);
   }
   Collections.shuffle(data, rand);
   print();
 }
示例#7
0
文件: Gen.java 项目: hrnn/olymp
 static void genRandomSame(int cnt, int len) throws IOException {
   for (int i = 0; i < cnt; i++) {
     String t = "";
     for (int j = 0; j < len; j++) t += (char) ('a' + rand.nextInt(10));
     data.add(t);
     if (rand.nextInt(100) < 30 && i < cnt - 1) {
       data.add(t);
       i++;
     }
   }
   Collections.sort(data);
   print();
 }