cp-documentation

This documentation is automatically generated by online-judge-tools/verification-helper

View the Project on GitHub zawa-tin/cp-documentation

:heavy_check_mark: Chmax
(Src/Template/Chmax.hpp)

template <class T1, class T2>
bool Chmax(T1& fr, const T2& bk)

bkfrよりも真に大きい時、frbkを代入してtrueを返す。そうで無い時、falseを返す。

Verified with

Code

#pragma once

namespace zawa {

template <class T1, class T2>
bool Chmax(T1& fr, const T2& bk) {
    return fr < bk and (fr = bk, true);
}

} // namespace zawa
#line 2 "Src/Template/Chmax.hpp"

namespace zawa {

template <class T1, class T2>
bool Chmax(T1& fr, const T2& bk) {
    return fr < bk and (fr = bk, true);
}

} // namespace zawa
Back to top page