update ucpc2026
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
#define div _div
|
||||
ll div(ll A, ll B)
|
||||
{
|
||||
ll q = A/B;
|
||||
if(A<0) q-=(B>0)-(B<0);
|
||||
ll div(ll A, ll B) {
|
||||
ll q = A/B; if(A<0) q-=(B>0)-(B<0);
|
||||
return q;
|
||||
}
|
||||
+15
-4
@@ -1,7 +1,18 @@
|
||||
const long long rand_L = 1;
|
||||
const long long rand_R = 10;
|
||||
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
|
||||
uniform_int_distribution<int> dist(rand_L, rand_R);
|
||||
const long long L = 1, R = 10;
|
||||
|
||||
random_device rd; mt19937 rng(rd());
|
||||
uniform_int_distribution<int> dist(L, R);
|
||||
// discrete_distribution<int> dist({10, 30, 60}); // [0, 2]
|
||||
// bernoulli_distribution dist(p); // true(p), false(1-p)
|
||||
// binomial_distribution<int> dist(N, p); // # of success
|
||||
// geometric_distribution<int> dist(p); // # of failure
|
||||
|
||||
// uniform_real_distribution<double> dist(L, R);
|
||||
// normal_distribution<double> dist(mean, std);
|
||||
// exponential_distribution<double> dist(lambda); // occur time
|
||||
// poisson_distribution<int> dist(lambda); // how many?
|
||||
// chi_squared_distribution<double> dist(df); // 자유도
|
||||
|
||||
auto gen = bind(dist, rng);
|
||||
|
||||
gen(); gen(); gen();
|
||||
Reference in New Issue
Block a user