Package cn.edu.zju.acm.onlinejudge.bean

Examples of cn.edu.zju.acm.onlinejudge.bean.Limit


        problem.setCode(this.code);
        problem.setAuthor(this.author);
        problem.setSource(this.source);
        problem.setContest(this.contest);

        Limit limit = new Limit();
        if (!this.useContestDefault) {
            limit.setTimeLimit(Integer.parseInt(this.timeLimit));
            limit.setMemoryLimit(Integer.parseInt(this.memoryLimit));
            limit.setSubmissionLimit(Integer.parseInt(this.submissionLimit));
            limit.setOutputLimit(Integer.parseInt(this.outputLimit));
        }
        problem.setLimit(limit);
        problem.setChecker(this.specialJudge);

        problem.setColor(this.color);
View Full Code Here


        ReflectionUtil.setFieldValue(DAOFactory.class, "submissionDAO", new MockSubmissionDAO());
        ReflectionUtil.setFieldValue(DAOFactory.class, "referenceDAO", new MockReferenceDAO());
        Problem problem = new Problem();
        problem.setId(0);
        problem.setRevision(0);
        Limit limit = new Limit();
        limit.setTimeLimit(1);
        limit.setMemoryLimit(1024);
        limit.setOutputLimit(1);
        problem.setLimit(limit);
        Reference reference = new Reference();
        reference.setReferenceType(ReferenceType.INPUT);
        reference.setContent("0 0\n1 2\n2 3\n".getBytes("ASCII"));
        DAOFactory.getReferenceDAO().save(reference, 0);
View Full Code Here

   * Creates a new limit.
   * @param id the id
   * @return a new limit instance
   */
  private Limit newLimit(long id) {
    Limit limit = new Limit();
    limit.setId(id);
    limit.setTimeLimit((int) id * 10);
    limit.setMemoryLimit((int) id * 100);
    limit.setOutputLimit((int) id * 1000);
    limit.setSubmissionLimit((int) id * 10000);   
    return limit;
  }
View Full Code Here

TOP

Related Classes of cn.edu.zju.acm.onlinejudge.bean.Limit

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.