import java.util.ArrayList;
import java.util.Collections;
import java.util.Random;
public class Game {
ArrayList
public static void main(String[] args) {
// TODO Auto-generated method stub
Game g = new Game();
g.deal();
System.out.println("一等奖获得者:");
g.sj(1);
System.out.println("
");
System.out.println("二等奖获得者:");
g.sj(5);
System.out.println("
");
System.out.println("三等奖获得者:");
g.sj(8);
System.out.println("");
}
public void deal(){
if(choujiang == null){
choujiang = new ArrayList<Integer>();
for(int i=1;i<=2000;i++){
choujiang.add(i);
}
}
Collections.shuffle(choujiang);
}
public void sj(int n){
Random ran1 = new Random(2000);
for (int i = 0; i < n; i++) {
int index = ran1.nextInt(choujiang.size());
System.out.print(choujiang.get(index)+" ");
choujiang.remove(index);
}
}
}