Checker

The following documentation applies to the new comparators only. If you have created a problem on Drafts before the new comparators were implemented, you will have an option to switch to the new comparators.

Types

TypeDescriptionOptions
StringTreats each space separated token as strings. These tokens must match exactly.Strict Space
IntParses each space separated token as intgers. Each integer must be in base 10 and fit in 64 bits (signed).Strict Space
FloatParses each space separated token as floating-point numbers. Each number must fit in 64 bits.Strict Space, Precision
Yes/NoCompares yes’s and no’s in any letter casing. For example, “Yes”, “yes”, “YES”, etc are equivalent.Strict Space
CustomPlease refer to Custom Checker page.

Options

OptionDescription
Strict Space (On)Each space character must match exactly.
Strict Space (Off)All consecutive sequences of space are considered equivalent. For example, “\n \t” and " \t \n " are considered the same. Trailing spaces are ignored.
Transform CRsTransforms CRs (’\r’) and CRLFs ("\r\n") to LFs (’\n’). Available with Strict Space (On).
Ignore Trailing LFOne trailing LF (’\n’, if any) is ignored. Available with Strict Space (On).
PrecisionDefines the value of eps in comparison1 of floating point numbers.

  1. Two floating point numbers, a and b, are compared using the following expression:

    abs(a-b) <= eps+1e-15 || (b+1e-15 >= min(a*(1-eps), a*(1+eps)) && b+1e-15 <= max(a*(1-eps), a*(1+eps))) ↩︎

Search

Related Pages