onlinejudge_template.analyzer.constants module¶
the module to list constants used in given problems (e.g. 1000000007)
この module は問題中で使われている定数を列挙します。 この機能の実装は kyuridenamida/atcoder-tools を参考にしています。
たとえば Educational Codeforces Round 83: D. Count the Arrays に対しては
{
"MOD": 998244353,
}
に相当する結果を返します。
MOD の値や YES / NO の文字列は間違えやすいため、この機能は便利です。
1000000007 でなく 10000000009 が使われていることに気付かず WA を出す、Impossible
と出力すべきところを impossible
と出力してしまい WA になる、などの事態を防げます。
-
onlinejudge_template.analyzer.constants.
list_constants
(*, html: Optional[bytes], sample_cases: Optional[List[onlinejudge_template.types.SampleCase]]) → Dict[NewType.<locals>.new_type, onlinejudge_template.types.ConstantDecl][source]¶