摘要:
很久没写题了,在hdoj分类中的water分类里找了道水题,顺便简单复习一下Java的排序。贴下代码:hdu 1084import java.util.*;class Rank implements Comparable<Rank> { /*设计类的同时,实现Comparable接口,重写它compareTo方法, * 以实现按规定的顺序排序。*/ int idx; int cnt; String ti; int score; public Rank(int idx, int cnt, String ti) { this.idx = idx; this.cnt = cnt; thi 阅读全文
posted @ 2011-03-19 22:55 ¥忘%风 阅读(181) 评论(0) 推荐(0) 编辑