コード例 #1
0
ファイル: ScoreboardController.cs プロジェクト: namofun/ccs
 private Scoreboard.Problem MakeProblem(ScoreCellModel s, ProblemModel p, bool xcpc)
 {
     if (s == null)
     {
         return(new Scoreboard.Problem
         {
             IsPassFail = xcpc,
             ProblemId = $"{p.ProblemId}",
             Label = p.ShortName
         });
     }
     else
     {
         return(new Scoreboard.Problem
         {
             IsPassFail = xcpc,
             FirstToSolve = s.IsFirstToSolve,
             NumJudged = s.JudgedCount,
             NumPending = s.PendingCount,
             ProblemId = $"{p.ProblemId}",
             Solved = s.Score.HasValue,
             Score = s.Score ?? 0,
             Label = p.ShortName,
             Time = s.Score ?? 0
         });
     }
 }
コード例 #2
0
 private Scoreboard.Problem MakeProblem(ScoreCellModel s, Data.ContestProblem p)
 {
     if (s == null)
     {
         return(new Scoreboard.Problem
         {
             problem_id = $"{p.ProblemId}",
             label = p.ShortName
         });
     }
     else
     {
         return(new Scoreboard.Problem
         {
             first_to_solve = s.IsFirstToSolve,
             num_judged = s.JudgedCount,
             num_pending = s.PendingCount,
             problem_id = $"{p.ProblemId}",
             solved = s.Score.HasValue,
             label = p.ShortName,
             time = s.Score ?? 0
         });
     }
 }