pub type DynMIntU32 = MInt<DynModuloU32>;Aliased Type§
#[repr(transparent)]pub struct DynMIntU32 {
x: u32,
_marker: PhantomData<fn() -> DynModuloU32>,
}Fields§
§x: u32§_marker: PhantomData<fn() -> DynModuloU32>Implementations§
Source§impl DynMIntU32
impl DynMIntU32
Sourcepub fn set_mod(m: u32)
pub fn set_mod(m: u32)
Examples found in repository?
crates/library_checker/src/number_theory/sqrt_mod.rs (line 9)
5pub fn sqrt_mod(reader: impl Read, writer: impl Write) {
6 prepare_io!(reader, writer);
7 sc!(q, yp: [(u32, u32); iter q]);
8 for (y, p) in yp {
9 DynMIntU32::set_mod(p);
10 if let Some(x) = DynMIntU32::from(y).sqrt() {
11 pp!(x);
12 } else {
13 pp!("-1");
14 }
15 }
16}