[][src]Module competitive_hpp::prelude

Macros

input

read input from stdin.

Structs

BTreeMap

A map based on a B-Tree.

BTreeSet

A set based on a B-Tree.

BigInt

A big signed integer type.

BigUint

A big unsigned integer type.

Complex

A complex number in Cartesian form.

Reverse

A helper struct for reverse ordering.

VecDeque

A double-ended queue implemented with a growable ring buffer.

Enums

Bytes

Bytes: read a string as array of bytes.

Chars

Chars: read a string as array of chars.

Isize1

Isize1: 1-indexed isize. Output of reading has type isize.

Usize1

Usize1: 1-indexed usize. Output of reading has type usize.

Traits

Itertools

An Iterator blanket implementation that provides extra adaptors and methods.

Num

The base trait for numeric types, covering 0 and 1 values, comparisons, basic numeric operations, and string conversion.

Functions

abs

Computes the absolute value.

clamp

A value bounded by a minimum and a maximum

gcd

Calculates the Greatest Common Divisor (GCD) of the number and other. The result is always positive.

lcm

Calculates the Lowest Common Multiple (LCM) of the number and other.

max

Compares and returns the maximum of two values.

min

Compares and returns the minimum of two values.

Type Definitions

BigRational

Alias for arbitrary precision rationals.

Rational

Alias for a Ratio of machine-sized integers.

Attribute Macros

memoise

Memoise function by using Vec