Package cn.edu.zju.acm.onlinejudge.util

Examples of cn.edu.zju.acm.onlinejudge.util.RankList


        if (!isProblemset) {
            List<Problem> problems = context.getProblems();
            context.setAttribute("problems", problems);
            long roleId = Utility.parseLong(context.getRequest().getParameter("roleId"));

            RankList ranklist = StatisticsManager.getInstance().getRankList(contest.getId(), roleId);

            String export = context.getRequest().getParameter("export");

            if ("txt".equalsIgnoreCase(export)) {
                return this.export(context, contest, problems, ranklist, export);
            } else if ("xls".equalsIgnoreCase(export)) {
                return this.export(context, contest, problems, ranklist, export);
            }
            context.setAttribute("RankList", ranklist);
        } else {
            int from = Utility.parseInt(context.getRequest().getParameter("from"));
            if (from < 0) {
                from = 0;
            }
            int count = 30;
            String sort=context.getRequest().getParameter("order");
            if(sort==null)
            {
                sort="ac";
            }

            ProblemsetRankList ranklist =
                    StatisticsManager.getInstance().getProblemsetRankList(contest.getId(), from, count, sort);
            if (from > 0) {
                context.setAttribute("previousFrom", from - count > 0 ? from - count : 0);
            }
            if (ranklist.getSolved().length == count) {
                context.setAttribute("nextFrom", from + count);
            }

            context.setAttribute("RankList", ranklist);
        }
View Full Code Here

TOP

Related Classes of cn.edu.zju.acm.onlinejudge.util.RankList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.