onlinejudge_template.types module

exception onlinejudge_template.types.AnalyzerError[source]

Bases: onlinejudge_template.types.TemplateAnalyzerGeneratorError

class onlinejudge_template.types.AnalyzerResources(url, html, input_format_string, output_format_string, sample_cases)[source]

Bases: tuple

html

Alias for field number 1

input_format_string

Alias for field number 2

output_format_string

Alias for field number 3

sample_cases

Alias for field number 4

url

Alias for field number 0

class onlinejudge_template.types.AnalyzerResult(resources, input_format, input_variables, output_format, output_variables, constants, output_type, topcoder_class_definition)[source]

Bases: tuple

constants

Alias for field number 5

input_format

Alias for field number 1

input_variables

Alias for field number 2

output_format

Alias for field number 3

output_type

Alias for field number 6

output_variables

Alias for field number 4

resources

Alias for field number 0

topcoder_class_definition

Alias for field number 7

class onlinejudge_template.types.ConstantDecl(name, value, type)[source]

Bases: tuple

name

Alias for field number 0

type

Alias for field number 2

value

Alias for field number 1

class onlinejudge_template.types.FormatNode[source]

Bases: abc.ABC

exception onlinejudge_template.types.GeneratorError[source]

Bases: onlinejudge_template.types.TemplateAnalyzerGeneratorError

class onlinejudge_template.types.ItemNode(*, name: str, indices: Sequence[str] = [])[source]

Bases: onlinejudge_template.types.FormatNode

class onlinejudge_template.types.LoopNode(*, size: str, name: str, body: onlinejudge_template.types.FormatNode)[source]

Bases: onlinejudge_template.types.FormatNode

class onlinejudge_template.types.NewlineNode[source]

Bases: onlinejudge_template.types.FormatNode

class onlinejudge_template.types.OneOutputType(*, name: NewType.<locals>.new_type, type: Optional[onlinejudge_template.types.VarType])[source]

Bases: onlinejudge_template.types.OutputType

class onlinejudge_template.types.OutputType[source]

Bases: abc.ABC

class onlinejudge_template.types.SampleCase(input, output)[source]

Bases: tuple

input

Alias for field number 0

output

Alias for field number 1

class onlinejudge_template.types.SequenceNode(*, items: Sequence[onlinejudge_template.types.FormatNode])[source]

Bases: onlinejudge_template.types.FormatNode

exception onlinejudge_template.types.TemplateAnalyzerGeneratorError[source]

Bases: RuntimeError

class onlinejudge_template.types.TopcoderClassDefinition(class_name, method_name, formal_arguments, return_type)[source]

Bases: tuple

class_name

Alias for field number 0

formal_arguments

Alias for field number 2

method_name

Alias for field number 1

return_type

Alias for field number 3

class onlinejudge_template.types.TopcoderType[source]

Bases: enum.Enum

An enumeration.

Double = 'double'
DoubleList = 'double[]'
Int = 'int'
IntList = 'int[]'
Long = 'long'
LongList = 'long[]'
String = 'String'
StringList = 'String[]'
class onlinejudge_template.types.TwoOutputType(*, name1: NewType.<locals>.new_type, type1: Optional[onlinejudge_template.types.VarType], name2: NewType.<locals>.new_type, type2: Optional[onlinejudge_template.types.VarType], print_newline_after_item: bool)[source]

Bases: onlinejudge_template.types.OutputType

class onlinejudge_template.types.VarDecl(name, type, dims, bases, depending)[source]

Bases: tuple

bases

Alias for field number 3

depending

Alias for field number 4

dims

Alias for field number 2

name

Alias for field number 0

type

Alias for field number 1

class onlinejudge_template.types.VarType[source]

Bases: enum.Enum

An enumeration.

Char = 'Char'
Float = 'Float'
IndexInt = 'IndexInt'
String = 'String'
ValueInt = 'ValueInt'
class onlinejudge_template.types.VectorOutputType(*, name: NewType.<locals>.new_type, type: Optional[onlinejudge_template.types.VarType], subscripted_name: str, counter_name: NewType.<locals>.new_type, print_size: bool, print_newline_after_size: bool, print_newline_after_item: bool)[source]

Bases: onlinejudge_template.types.OutputType

class onlinejudge_template.types.YesNoOutputType(*, name: NewType.<locals>.new_type, yes: str, no: str)[source]

Bases: onlinejudge_template.types.OutputType