This documentation is automatically generated by competitive-verifier/competitive-verifier
#include "src/util/random.hpp"#include "../template.hpp"
struct Random {
mt19937 mt;
Random(){
random_device rd;
auto seed=rd()^std::chrono::steady_clock::now().time_since_epoch().count();
mt.seed(seed);
}
int randint(int l,int r){ //[a,b]
uniform_int_distribution<int> dist(l,r);
return dist(mt);
}
float randfloat(int l=0,int r=1){
uniform_real_distribution<float> dist(l,r);
return dist(mt);
}
int operator()(){
return mt();
}
}
#line 2 "src/template.hpp"
#include <bits/stdc++.h>
using namespace std;
#define si(a) (long)a.size()
#define fi first
#define se second
#define all(x) x.begin(),x.end()
#define rep(i,n) for(int i=0;i<(int)(n);++i)
template<typename S,typename F> bool chmin(S&a,F b){return b<a?(a=b,1):0;}
template<typename S,typename F> bool chmax(S&a,F b){return b>a?(a=b,1):0;}
bool _=(ios::sync_with_stdio(0),cin.tie(0),cout<<fixed<<setprecision(16),0);
#line 2 "src/util/random.hpp"
struct Random {
mt19937 mt;
Random(){
random_device rd;
auto seed=rd()^std::chrono::steady_clock::now().time_since_epoch().count();
mt.seed(seed);
}
int randint(int l,int r){ //[a,b]
uniform_int_distribution<int> dist(l,r);
return dist(mt);
}
float randfloat(int l=0,int r=1){
uniform_real_distribution<float> dist(l,r);
return dist(mt);
}
int operator()(){
return mt();
}
}