卡常经验分享
查看原帖
卡常经验分享
614496
Pollard_Rho楼主2024/10/24 14:33
  1. 建议使用 time(0) 作为种子,使你的评测都用同样的种子,例:std::mt19937_64 rd(time(0));

  2. 不要使用 __uint128_t !!! 巨慢

  3. 使用快速乘,inline ll qmu(ll a,ll b,ll p){return (a*b-(ll)((__float128)a/p*b)*p+p)%p;}

综上满足的代码不写挂 5\le 5 次应该就能过

2024/10/24 14:33
加载中...