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:
Matej Focko 2023-07-23 20:42:09 +02:00
parent 663472e5da
commit 02cbe139e9
Signed by: mfocko
GPG key ID: 7C47D46246790496

View file

@ -20,11 +20,9 @@ std::ostream &operator<<(std::ostream &s, std::pair<T, U> const &p) {
namespace helpers {
using namespace std;
namespace math {
static constexpr int32_t MODULO = 1000000007;
static constexpr std::int32_t MODULO = 1000000007;
long pow(long base, long exp) {
if (exp == 0) return 1;
@ -56,27 +54,22 @@ namespace output {
template <typename T>
inline void answer(const T &ans) {
cout << ans << "\n";
std::cout << ans << "\n";
}
inline void yes() { cout << "YES\n"; }
inline void no() { cout << "NO\n"; }
inline void yesno(bool ans) {
if (ans) {
yes();
} else {
no();
}
}
inline void yes() { std::cout << "YES\n"; }
inline void no() { std::cout << "NO\n"; }
inline void yesno(bool ans) { std::cout << (ans ? "YES" : "NO") << "\n"; }
} // namespace output
using namespace std;
using namespace math;
using namespace input;
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