mirror of
https://gitlab.com/mfocko/Codeforces.git
synced 2024-11-09 13:49:06 +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 {
|
||||
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue