Skip to content

Commit 889aa57

Browse files
committed
Improved template - added multiple testcase format + random number generator
1 parent bfce419 commit 889aa57

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

Library/Miscellanious/template.cpp

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,35 @@ typedef vector<pii> vpii;
2929
typedef vector<pl> vpl;
3030
typedef vector<vi> vvi;
3131
typedef vector<vl> vvl;
32+
mt19937_64 rang(chrono::high_resolution_clock::now().time_since_epoch().count());
33+
int rng(int lim) {
34+
uniform_int_distribution<int> uid(0,lim-1);
35+
return uid(rang);
36+
}
3237
int mpow(int base, int exp);
3338
void ipgraph(int m);
3439
void dfs(int u, int par);
35-
const int mod = 1000000007;
40+
41+
const int mod = 1'000'000'007;
3642
const int N = 3e5, M = N;
3743
//=======================
3844

3945
vi g[N];
4046
int a[N];
4147

48+
void solve() {
49+
int i, j, n, m;
50+
}
51+
4252
int main() {
43-
ios_base::sync_with_stdio(0);
44-
int t, i, j, k, p, q, r, x, y, u, v, n, m;
53+
ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
54+
srand(chrono::high_resolution_clock::now().time_since_epoch().count());
55+
56+
int t = 1;
57+
cin >> t;
58+
while(t--) {
59+
solve();
60+
}
4561

4662
return 0;
4763
}

0 commit comments

Comments
 (0)