generated from battlecode/battlecode23-scaffold
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFastSortTemplate.Java
More file actions
35 lines (24 loc) · 904 Bytes
/
FastSortTemplate.Java
File metadata and controls
35 lines (24 loc) · 904 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package examplefuncsplayer.fast;
import battlecode.common.*;
import MPWorking.Debug;
public class FastSort {
public static RobotController rc;
public static void init(RobotController r) {
rc = r;
}
// public static void main(String[] args) {
// int[] a = new int[]{4, 2, 3, 5, 0, 15, 20};
// sort(a);
// for(int i = 0; i < FastSort.size; i++) {
// System.out.println("" + i + ": " + a[FastSort.indices[i]] + "\n");
// }
// }
// DISTANCE SORT
// Sorts array in increasing order, placing the indices of the sorted array in indices
// See the commented out main method for an example of how to use this class
// WARNING: Only sorts arrays of nonnegative integers
// WARNING: If the array has more than 16 elements, only the first 16 will be sorted.
// MAIN SORT
// VARS
// SORTING NETWORKS
}