Skip to content

Rename the crate name to acl #125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ keywords = ["competitive"]
categories = ["algorithms", "data-structures"]
publish = false

[lib]
name = "acl"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/library-checker-convolution-mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#[macro_use]
extern crate proconio as _;

use ac_library_rs::{convolution, modint::ModInt998244353 as Mint};
use acl::{convolution, modint::ModInt998244353 as Mint};
use std::fmt;

fn main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/library-checker-static-range-sum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ extern crate proconio as _;
#[macro_use]
extern crate proconio_derive as _;

use ac_library_rs::fenwicktree::FenwickTree;
use acl::fenwicktree::FenwickTree;

#[allow(clippy::needless_collect)]
#[fastout]
Expand Down
2 changes: 1 addition & 1 deletion examples/library-checker-sum-of-floor-of-linear.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ extern crate proconio as _;
#[macro_use]
extern crate proconio_derive as _;

use ac_library_rs::math;
use acl::math;

#[fastout]
fn main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/library-checker-unionfind.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#[macro_use]
extern crate proconio as _;

use ac_library_rs::dsu::Dsu;
use acl::dsu::Dsu;

fn main() {
input! {
Expand Down
2 changes: 1 addition & 1 deletion examples/practice2_d_maxflow.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use ac_library_rs::MfGraph;
use acl::MfGraph;
use std::io::Read;

#[allow(clippy::many_single_char_names)]
Expand Down
2 changes: 1 addition & 1 deletion examples/practice2_j_segment_tree.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use ac_library_rs::{Max, Segtree};
use acl::{Max, Segtree};
use std::io::Read;

fn main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/practice2_k_range_affine_range_sum.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use ac_library_rs::{LazySegtree, MapMonoid, ModInt998244353, Monoid};
use acl::{LazySegtree, MapMonoid, ModInt998244353, Monoid};
use std::io::Read;

type Mint = ModInt998244353;
Expand Down
2 changes: 1 addition & 1 deletion examples/practice2_l_lazy_segment_tree.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![allow(clippy::many_single_char_names)]
use ac_library_rs::{LazySegtree, MapMonoid, Monoid};
use acl::{LazySegtree, MapMonoid, Monoid};
use std::io::Read;
use std::iter;

Expand Down
2 changes: 1 addition & 1 deletion src/dsu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/// # Example
///
/// ```
/// use ac_library_rs::Dsu;
/// use acl::Dsu;
/// use proconio::{input, source::once::OnceSource};
///
/// input! {
Expand Down
8 changes: 4 additions & 4 deletions src/math.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use std::mem::swap;
/// # Example
///
/// ```
/// use ac_library_rs::math;
/// use acl::math;
///
/// assert_eq!(math::pow_mod(2, 10000, 7), 2);
/// ```
Expand Down Expand Up @@ -63,7 +63,7 @@ pub fn pow_mod(x: i64, mut n: i64, m: u32) -> u32 {
/// # Example
///
/// ```
/// use ac_library_rs::math;
/// use acl::math;
///
/// assert_eq!(math::inv_mod(3, 7), 5);
/// ```
Expand Down Expand Up @@ -106,7 +106,7 @@ pub fn inv_mod(x: i64, m: i64) -> i64 {
/// # Example
///
/// ```
/// use ac_library_rs::math;
/// use acl::math;
///
/// let r = [2, 3, 2];
/// let m = [3, 5, 7];
Expand Down Expand Up @@ -181,7 +181,7 @@ pub fn crt(r: &[i64], m: &[i64]) -> (i64, i64) {
/// # Example
///
/// ```
/// use ac_library_rs::math;
/// use acl::math;
///
/// assert_eq!(math::floor_sum(6, 5, 4, 3), 13);
/// ```
Expand Down
36 changes: 18 additions & 18 deletions src/modint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//! For most of the problems, It is sufficient to use [`ModInt1000000007`] or [`ModInt998244353`], which can be used as follows.
//!
//! ```
//! use ac_library_rs::ModInt1000000007 as Mint; // rename to whatever you want
//! use acl::ModInt1000000007 as Mint; // rename to whatever you want
//! use proconio::{input, source::once::OnceSource};
//!
//! input! {
Expand All @@ -18,7 +18,7 @@
//! If the modulus is not fixed, you can use [`ModInt`] as follows.
//!
//! ```
//! use ac_library_rs::ModInt as Mint; // rename to whatever you want
//! use acl::ModInt as Mint; // rename to whatever you want
//! use proconio::{input, source::once::OnceSource};
//!
//! input! {
Expand Down Expand Up @@ -73,7 +73,7 @@ pub type ModInt = DynamicModInt<DefaultId>;
/// # Example
///
/// ```
/// use ac_library_rs::ModInt1000000007 as Mint;
/// use acl::ModInt1000000007 as Mint;
/// use proconio::{input, source::once::OnceSource};
///
/// input! {
Expand All @@ -99,7 +99,7 @@ impl<M: Modulus> StaticModInt<M> {
/// # Example
///
/// ```
/// use ac_library_rs::ModInt1000000007 as Mint;
/// use acl::ModInt1000000007 as Mint;
///
/// assert_eq!(1_000_000_007, Mint::modulus());
/// ```
Expand Down Expand Up @@ -217,13 +217,13 @@ impl<M: Modulus> ModIntBase for StaticModInt<M> {
/// #[derive(Copy, Clone, Eq, PartialEq)]
/// enum $name {}
///
/// impl ac_library_rs::modint::Modulus for $name {
/// impl acl::modint::Modulus for $name {
/// const VALUE: u32 = $value;
/// const HINT_VALUE_IS_PRIME: bool = $is_prime;
///
/// fn butterfly_cache() -> &'static ::std::thread::LocalKey<::std::cell::RefCell<::std::option::Option<ac_library_rs::modint::ButterflyCache<Self>>>> {
/// fn butterfly_cache() -> &'static ::std::thread::LocalKey<::std::cell::RefCell<::std::option::Option<acl::modint::ButterflyCache<Self>>>> {
/// thread_local! {
/// static BUTTERFLY_CACHE: ::std::cell::RefCell<::std::option::Option<ac_library_rs::modint::ButterflyCache<$name>>> = ::std::default::Default::default();
/// static BUTTERFLY_CACHE: ::std::cell::RefCell<::std::option::Option<acl::modint::ButterflyCache<$name>>> = ::std::default::Default::default();
/// }
/// &BUTTERFLY_CACHE
/// }
Expand All @@ -232,7 +232,7 @@ impl<M: Modulus> ModIntBase for StaticModInt<M> {
/// };
/// }
///
/// use ac_library_rs::StaticModInt;
/// use acl::StaticModInt;
///
/// modulus!(Mod101(101, true), Mod103(103, true));
///
Expand Down Expand Up @@ -294,7 +294,7 @@ pub struct ButterflyCache<M> {
/// # Example
///
/// ```
/// use ac_library_rs::ModInt as Mint;
/// use acl::ModInt as Mint;
/// use proconio::{input, source::once::OnceSource};
///
/// input! {
Expand Down Expand Up @@ -325,7 +325,7 @@ impl<I: Id> DynamicModInt<I> {
/// # Example
///
/// ```
/// use ac_library_rs::ModInt as Mint;
/// use acl::ModInt as Mint;
///
/// assert_eq!(998_244_353, Mint::modulus()); // default modulus
/// ```
Expand All @@ -345,7 +345,7 @@ impl<I: Id> DynamicModInt<I> {
/// # Example
///
/// ```
/// use ac_library_rs::ModInt as Mint;
/// use acl::ModInt as Mint;
///
/// Mint::set_modulus(7);
/// assert_eq!(7, Mint::modulus());
Expand Down Expand Up @@ -547,7 +547,7 @@ pub trait ModIntBase:
/// # Example
///
/// ```
/// use ac_library_rs::modint::ModIntBase;
/// use acl::modint::ModIntBase;
///
/// fn f<Z: ModIntBase>() {
/// let _: u32 = Z::modulus();
Expand All @@ -567,7 +567,7 @@ pub trait ModIntBase:
/// If `val` is greater than or equal to `Self::modulus()`, the behaviors are not defined.
///
/// ```should_panic
/// use ac_library_rs::ModInt1000000007 as Mint;
/// use acl::ModInt1000000007 as Mint;
///
/// let x = Mint::raw(1_000_000_007);
/// let y = x + x;
Expand All @@ -584,7 +584,7 @@ pub trait ModIntBase:
/// # Example
///
/// ```
/// use ac_library_rs::modint::ModIntBase;
/// use acl::modint::ModIntBase;
///
/// fn f<Z: ModIntBase>() -> Z {
/// debug_assert!(Z::modulus() >= 100);
Expand All @@ -608,7 +608,7 @@ pub trait ModIntBase:
/// # Example
///
/// ```
/// use ac_library_rs::modint::ModIntBase;
/// use acl::modint::ModIntBase;
///
/// fn f<Z: ModIntBase>(x: Z) {
/// let _: u32 = x.val();
Expand All @@ -627,7 +627,7 @@ pub trait ModIntBase:
/// # Example
///
/// ```
/// use ac_library_rs::modint::ModIntBase;
/// use acl::modint::ModIntBase;
///
/// fn f<Z: ModIntBase>(x: Z) {
/// let _: Z = x.inv();
Expand All @@ -642,7 +642,7 @@ pub trait ModIntBase:
/// # Example
///
/// ```
/// use ac_library_rs::modint::ModIntBase;
/// use acl::modint::ModIntBase;
///
/// fn f<Z: ModIntBase>() {
/// let _ = Z::new(1u32);
Expand All @@ -664,7 +664,7 @@ pub trait ModIntBase:
/// # Example
///
/// ```
/// use ac_library_rs::modint::ModIntBase;
/// use acl::modint::ModIntBase;
///
/// fn f<Z: ModIntBase>() {
/// let _: Z = Z::new(2).pow(3);
Expand Down
2 changes: 1 addition & 1 deletion src/scc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::internal_scc;
/// # Example
///
/// ```
/// use ac_library_rs::SccGraph;
/// use acl::SccGraph;
/// use proconio::{input, source::once::OnceSource};
///
/// input! {
Expand Down
2 changes: 1 addition & 1 deletion src/twosat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::internal_scc;
/// ```
/// #![allow(clippy::many_single_char_names)]
///
/// use ac_library_rs::TwoSat;
/// use acl::TwoSat;
/// use proconio::{input, marker::Bytes, source::once::OnceSource};
///
/// input! {
Expand Down