(String[] args)
| 171 | // 对数器 |
| 172 | // 为了测试 |
| 173 | public static void main(String[] args) { |
| 174 | // 一定要确保arr中的数字无重复,所以让v大于n |
| 175 | n = 100; |
| 176 | int v = 500; |
| 177 | int testTime = 10000; |
| 178 | System.out.println("测试开始"); |
| 179 | for (int i = 1; i <= testTime; i++) { |
| 180 | random(v); |
| 181 | if (!check()) { |
| 182 | System.out.println("出错了!"); |
| 183 | } |
| 184 | } |
| 185 | System.out.println("测试结束"); |
| 186 | } |
| 187 | |
| 188 | } |