update ucpc2026
This commit is contained in:
@@ -1,16 +1,14 @@
|
||||
random_device rd; mt19937 rng(rd());
|
||||
|
||||
ll primary_root(ll p) {
|
||||
std::random_device rd;
|
||||
std::mt19937 gen(rd());
|
||||
std::uniform_int_distribution<ll> distrib(1, p-1);
|
||||
|
||||
//distrib(gen);
|
||||
uniform_int_distribution<ll> dist(1, p-1);
|
||||
auto gen = bind(dist, rng);
|
||||
|
||||
vl g = po_rho(p-1);
|
||||
|
||||
while(true) {
|
||||
ll c = distrib(gen);
|
||||
|
||||
bool ok = true; ll u = p-1;
|
||||
ll b = 1;
|
||||
ll c = gen(), u = p-1, b = 1;
|
||||
bool ok = true;
|
||||
|
||||
for(auto i:g) {
|
||||
if(i != b) u = p-1;
|
||||
ll x = pow(c, u/i, p);
|
||||
|
||||
Reference in New Issue
Block a user