Skip to content

Commit 241f01e

Browse files
Update Template.cpp
1 parent e652f24 commit 241f01e

File tree

1 file changed

+5
-58
lines changed

1 file changed

+5
-58
lines changed

Template.cpp

Lines changed: 5 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
#define UB upper_bound
2121
#define fr(x) freopen(x,"r",stdin)
2222
#define fw(x) freopen(x,"w",stdout)
23-
#define iout(x) printf("%d\n",x)
24-
#define lout(x) printf("%lld\n",x)
2523
#define REP(x, l, u) for(ll x = l;x<u;x++)
2624
#define RREP(x, l, u) for(ll x = l;x>=u;x--)
2725
#define complete_unique(a) a.erase(unique(a.begin(),a.end()),a.end())
@@ -45,22 +43,11 @@ typedef double db;
4543
typedef long double ld;
4644
using namespace __gnu_pbds; //required
4745
using namespace std;
48-
template<typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
46+
template<typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
4947
typedef vector<ll> VLL;
5048
typedef vector<int> VI;
51-
const int block_size = 320;
52-
typedef complex<ll> point;
5349
const ll mod = 1e9 + 7;
54-
const ll inf = 1e9 + 7;
55-
const ld eps = 1e-9;
56-
const db PI = atan(1) * 4;
5750

58-
template<typename T>
59-
inline int sign(const T &a) {
60-
if(a < 0)return -1;
61-
if(a > 0)return 1;
62-
return 0;
63-
}
6451

6552
string to_string(string s) { return '"' + s + '"'; }
6653

@@ -104,21 +91,6 @@ inline bool upmin(T &a, const S &b) { return a > b ? a = b, 1 : 0; }
10491
template<typename T, typename S>
10592
inline bool upmax(T &a, const S &b) { return a < b ? a = b, 1 : 0; }
10693

107-
template<typename T>
108-
inline void in(T &x) {
109-
x = 0;
110-
T f = 1;
111-
char ch = getchar();
112-
while(!isdigit(ch)) {
113-
if(ch == '-') f = -1;
114-
ch = getchar();
115-
}
116-
while(isdigit(ch)) {
117-
x = x * 10 + ch - '0';
118-
ch = getchar();
119-
}
120-
x *= f;
121-
}
12294

12395
ull twop(ll x) { return 1ULL << x; }
12496

@@ -134,27 +106,6 @@ ll inverse(ll a, ll m) {
134106
return MOD((1 - inverse(m, a) * m) / a, m);
135107
}
136108

137-
template<typename A, typename B>
138-
inline void in(A &x, B &y) {
139-
in(x);
140-
in(y);
141-
}
142-
143-
template<typename A, typename B, typename C>
144-
inline void in(A &x, B &y, C &z) {
145-
in(x);
146-
in(y);
147-
in(z);
148-
}
149-
150-
template<typename A, typename B, typename C, typename D>
151-
inline void in(A &x, B &y, C &z, D &d) {
152-
in(x);
153-
in(y);
154-
in(z);
155-
in(d);
156-
}
157-
158109
template<typename T>
159110
T sqr(T x) { return x * x; }
160111

@@ -170,13 +121,9 @@ ll fast(ll a, ll b, ll mod) {
170121
if(b < 0)a = inverse(a, mod), b = -b;
171122
ll ans = 1;
172123
while(b) {
173-
if(b & 1) {
174-
b--;
175-
ans = ans * a % mod;
176-
} else {
177-
a = a * a % mod;
178-
b /= 2;
179-
}
124+
if(b & 1)ans = ans * a % mod;
125+
a = a * a % mod;
126+
b /= 2;
180127
}
181128
return ans % mod;
182129
}
@@ -199,7 +146,7 @@ signed main() {
199146
int t = 1;
200147
// in(t);
201148
for(int i = 1; i <= t; i++) {
202-
// cout<<"Case #"<<i<<":";
149+
// cout<<"Case #"<<i<<": ";
203150
SOLVE::main();
204151

205152
}

0 commit comments

Comments
 (0)