Laggy's blog

By Laggy, history, 6 years ago, In English

Hey guys, I am working on a virtual contest picker as part of the algo-chan project. I am trying to use http://codeforces.com/api/problemset.problems to build a problem list for each contest but this won't work because of contests with more than one division only the appended problems show there.

Example: ContestsL 872,871,870 870 seems like the base for the other two but there's no way to know where the other two start. For 872 the api doesn't even know about it's existence.

I hope MikeMirzayanov or anyone who has experience with doing something like this could help. PS: I am trying to use the API and not parse every codeforces.com/contest/id page. (Keeping this as a last resort)

Thanks in advance.

  • Vote: I like it
  • +22
  • Vote: I do not like it

| Write comment?
»
4 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Sorry for bringing this 2 years old blog back to life but I am facing the same issue. Have you found solution for this Laggy?

Please check this MikeMirzayanov and Fefer_Ivan

  • »
    »
    3 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I'm about another year late to this, but for anyone who might still have this problem, it seems like you can get the list of problems in a given contest by quering the contest.standings endpoint, which has a result.contest.problems field with all problems. For example, https://codeforces.com/api/contest.standings?contestId=1529&from=1&count=1.

    • »
      »
      »
      3 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      But this doesn't solve this issue. We want to get all problems from all contests in one go. From above endpoint we would need to thousands of queries to get problems from thousands of contests till now. Moreover there a rate limiter, you can't do them in one go.

    • »
      »
      »
      2 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Thienu It is responding with only type, name and some other properties of the problems, How can i get the all problems test cases?

      • »
        »
        »
        »
        2 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        You can't get all test cases of a problem (by design).

        • »
          »
          »
          »
          »
          2 years ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          Okay, how come then some people parse the test cases of a contest to files into their local system? Do they parse it by fetching HTML pages?

          • »
            »
            »
            »
            »
            »
            2 years ago, # ^ |
              Vote: I like it +10 Vote: I do not like it

            IIRC, these extensions parse the the problem statement pages directly to extract the sample cases.