library_checker/number_theory/enumerate_quotients.rs
1#[doc(no_inline)]
2pub use competitive::algorithm::FloorQuotientIndex;
3use competitive::prelude::*;
4
5#[verify::library_checker("enumerate_quotients")]
6pub fn enumerate_quotients(reader: impl Read, mut writer: impl Write) {
7 let s = read_all_unchecked(reader);
8 let mut scanner = Scanner::new(&s);
9 scan!(scanner, n);
10 let qi = FloorQuotientIndex::new(n);
11 iter_print!(writer, qi.len(); @it qi.values());
12}