int128
このページは自動生成された下書きです。
公開 API と基本的な import パスを整理しています。詳細な説明、計算量、注意点、使用例は必要に応じて追記してください。
import
import atcoder/extra/math/int128
公開 API
const ATCODER_INT128* = 1
type Int128* {.importcpp: "__int128_t", nodecl.} = object
type Uint128* {.importcpp: "__uint128_t", nodecl.} = object
converter to_Int128*(x: SomeInteger or Uint128): Int128 {.importcpp: "(__int128_t)((#))", nodecl.}
converter to_Uint128*(x: SomeInteger or Int128): Uint128 {.importcpp: "(__uint128_t)((#))", nodecl.}
proc to_int*(x: Int128 or Uint128): int {.importcpp: "(long long)(#)", nodecl.}
proc to_int32*(x: Int128): int32 {.importcpp: "(int)(#)", nodecl.}
proc to_Uint*(x: Int128): uint {.importcpp: "(unsigned long long)(#)", nodecl.}
proc `-`*(x: Int128): Int128 {.importcpp: "(-(#))", nodecl.}
proc `not`*[T: Int128 or Uint128](x: T): T {.importcpp: "(~(#))", nodecl.}
proc `inc`*(x: var Int128):void {.importcpp: "(++(#))", nodecl.}
proc `dec`*(x: var Int128):void {.importcpp: "(--(#))", nodecl.}
proc `nimop`*[T: Int128 or Uint128](x: var T, y: T) {.inline importcpp: "((#) " & cop & "(#))", nodecl.}
macro generateUpdateOperator*(ops: varargs[tuple]) =
macro generateBinaryOperator*(ops:varargs[untyped]) =
proc `>`*(x: Int128 or Uint128, y: Int128 or Uint128): bool {.importcpp: "((#) > (#))", nodecl.}
proc `>=`*(x: Int128 or Uint128, y: Int128 or Uint128): bool {.importcpp: "((#) >= (#))", nodecl.}
proc `<`*(x: Int128 or Uint128, y: Int128 or Uint128): bool {.importcpp: "((#) < (#))", nodecl.}
proc `<=`*(x: Int128 or Uint128, y: Int128 or Uint128): bool {.importcpp: "((#) <= (#))", nodecl.}
proc `==`*(x: Int128 or Uint128, y: Int128 or Uint128): bool {.importcpp: "((#) == (#))", nodecl.}
proc abs*(x: Int128): Int128 = (if x >= 0:x else: -x)
proc cmp*[T: Int128 or Uint128](x, y: T): int = (if x < y: -1 elif x == y: 0 else: 1)
proc hash*[T: Int128 or Uint128](x: T): Hash = hash(x div int(100000000000000000)) !& hash(x mod int(100000000000000000))
proc parseUint128*(s: string): Uint128 =
proc parseInt128*(s: string): Int128 =
proc pow*(x, n, m: Int128): Int128 =
proc `^`*(x, n: Int128): Int128 =
proc `$`*(x: Int128): string = $(to_string(x))
proc `$`*(x: Uint128): string = $(to_string(x))
proc floorDiv*(x, y: Int128): Int128 =
proc floorMod*(x, y: Int128): Int128 =
概要
TODO: このライブラリの用途と使いどころを記述してください。
使用例
TODO: 使用例を追加してください。
注意
TODO: 制約、前提条件、落とし穴を記述してください。