onlinejudge.service.kattis module

the module for Kattis (https://open.kattis.com/)

class onlinejudge.service.kattis.KattisProblem(*, problem_id, contest_id=None, domain='open.kattis.com')[source]

Bases: onlinejudge.type.Problem

download_sample_cases(*, session=None)[source]
Raises

SampleParseError

Return type

List[TestCase]

classmethod from_url(url)[source]
Return type

Optional[KattisProblem]

get_service()[source]
Return type

KattisService

get_url(*, contests=True)[source]
Return type

str

class onlinejudge.service.kattis.KattisService[source]

Bases: onlinejudge.type.Service

classmethod from_url(url)[source]
Return type

Optional[KattisService]

get_name()[source]

example:

  • AtCoder

  • Codeforces

  • PKU JudgeOnline

Note

If you want something like identifier (e.g. atcoder, codeforces or poj), you can use a domain obtained from get_url().

Return type

str

get_url()[source]
Note

sometimes this URL is not correct, i.e. something like https://hanoi18.kattis.com/ exists

Return type

str