0976_largest-perimeter-triangle

command
v0.0.0-...-60194e6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2020 License: Unlicense Imports: 1 Imported by: 0

README

0976_largest-perimeter-triangle

先从大到小排序, 设我们有a, b, c三条边, 且a <= b <= c, 必有c < a + b

从大到小取一个已知的c, a, b为排序后c紧接着的数字:

  • c >= a + b, 则其余小于等于a, b的数字必不能满足此条件
  • c < a + b, 则三者的和必是解

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL