Пример #1
0
        public void LoadUserData(LimpUser user)
        {
            ResponseContainer <List <Submission> > response = CodeforcesClient
                                                              .User
                                                              .Status(user.CodeforcesHandle)
                                                              .Result;

            response.ThrowExceptionIfFailed();

            IEnumerable <Submission> okSubmission = response
                                                    .Result
                                                    .Where(s => s.Verdict == SubmissionVerdictEnum.Ok);

            IEnumerable <string> solvedProblems = okSubmission
                                                  .Select(s => $"{s.Problem.ContestId}{s.Problem.Index}")
                                                  .Distinct();

            user.CodeforcesSubmissions = solvedProblems.ToList();
        }