daylight-library

This documentation is automatically generated by competitive-verifier/competitive-verifier

View the Project on GitHub daylight-pro/daylight-library

:warning: daylight/structure/monoid.hpp

Depends on

Code

#include "daylight/base.hpp"

struct MinMonoid {
	using value_type = ll;
	static const bool isOperator = false;
	static constexpr ll e() {
		return LINF;
	}
	static ll op(ll a, ll b) {
		return min(a, b);
	}
};
template<class T>
struct SumMonoid {
	using value_type = T;
	static const bool isOperator = false;
	static constexpr T e() {
		return T(0);
	}
	static T op(T a, T b) {
		return a + b;
	}
};
template<class T>
struct AddMonoid {
	using value_type = T;
	static const bool isOperator = true;
	static constexpr T e() {
		return T(0);
	}
	static T op(T a, T b) {
		return a + b;
	}
};
struct UpdateMonoid {
	using value_type = ll;
	static const bool isOperator = true;
	static constexpr ll e() {
		return 4e18;
	}
	static ll op(ll a, ll b) {
		return b;
	}
};

template<class T>
struct LinerFunctionMonoid {
	using value_type = T;
	static const bool isOperator = true;
	static constexpr T e() {
		return make_pair(1, 0);
	}
	static T op(T a, T b) {
		return make_pair(a.first * b.first,
						 b.first * a.second + b.second);
	}
};
Traceback (most recent call last):
  File "/home/runner/.local/lib/python3.10/site-packages/competitive_verifier/oj_resolve/resolver.py", line 181, in resolve
    bundled_code = language.bundle(path, basedir=basedir)
  File "/home/runner/.local/lib/python3.10/site-packages/competitive_verifier/oj/verify/languages/cplusplus.py", line 252, in bundle
    bundler.update(path)
  File "/home/runner/.local/lib/python3.10/site-packages/competitive_verifier/oj/verify/languages/cplusplus_bundle.py", line 482, in update
    self.update(
  File "/home/runner/.local/lib/python3.10/site-packages/competitive_verifier/oj/verify/languages/cplusplus_bundle.py", line 477, in update
    raise BundleErrorAt(
competitive_verifier.oj.verify.languages.cplusplus_bundle.BundleErrorAt: daylight/base.hpp: line 103: unable to process #include in #if / #ifdef / #ifndef other than include guards
Back to top page