mirror of
https://gitlab.com/mfocko/Codeforces.git
synced 2024-12-22 07:01:21 +01:00
chore(cpp): use fully-qualified names
use fully-qualified names in the helpers instead of abusing the ‹using› Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
parent
663472e5da
commit
02cbe139e9
1 changed files with 8 additions and 15 deletions
|
@ -20,11 +20,9 @@ std::ostream &operator<<(std::ostream &s, std::pair<T, U> const &p) {
|
||||||
|
|
||||||
namespace helpers {
|
namespace helpers {
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
namespace math {
|
namespace math {
|
||||||
|
|
||||||
static constexpr int32_t MODULO = 1000000007;
|
static constexpr std::int32_t MODULO = 1000000007;
|
||||||
|
|
||||||
long pow(long base, long exp) {
|
long pow(long base, long exp) {
|
||||||
if (exp == 0) return 1;
|
if (exp == 0) return 1;
|
||||||
|
@ -56,27 +54,22 @@ namespace output {
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline void answer(const T &ans) {
|
inline void answer(const T &ans) {
|
||||||
cout << ans << "\n";
|
std::cout << ans << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void yes() { cout << "YES\n"; }
|
inline void yes() { std::cout << "YES\n"; }
|
||||||
inline void no() { cout << "NO\n"; }
|
inline void no() { std::cout << "NO\n"; }
|
||||||
|
inline void yesno(bool ans) { std::cout << (ans ? "YES" : "NO") << "\n"; }
|
||||||
inline void yesno(bool ans) {
|
|
||||||
if (ans) {
|
|
||||||
yes();
|
|
||||||
} else {
|
|
||||||
no();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace output
|
} // namespace output
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
using namespace math;
|
using namespace math;
|
||||||
using namespace input;
|
using namespace input;
|
||||||
using namespace output;
|
using namespace output;
|
||||||
|
|
||||||
#define LOOP(n) for (auto i = 0; i < n; ++i)
|
#define LOOP(var, n) for (auto var = 0; var < n; ++var)
|
||||||
|
|
||||||
} // namespace helpers
|
} // namespace helpers
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue