Skip to content
Merged
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
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@
- https://github.com/EbTech/rust-algorithms
- https://github.com/qitoy/rust-library
- https://github.com/stuart0035/procon-lib-rs

## Our List of Recommended Practice Problems

[gitgud.cc](https://www.gitgud.cc/)
2 changes: 1 addition & 1 deletion examples/data_structures/deq_agg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use proconio::input;
use programming_team_code_rust::data_structures::deq_agg::DeqAgg;
use rand::{thread_rng, Rng};
use rand::{Rng, thread_rng};
use std::collections::VecDeque;

const MOD: u64 = 998_244_353;
Expand Down
2 changes: 1 addition & 1 deletion examples/data_structures/range_container_handmade.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// verification-helper: PROBLEM https://onlinejudge.u-aizu.ac.jp/courses/lesson/2/ITP1/all/ITP1_1_A

use programming_team_code_rust::data_structures::range_container::RangeContainer;
use rand::{thread_rng, Rng};
use rand::{Rng, thread_rng};
use std::collections::BTreeMap;

fn main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/graphs/bridges_aizu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fn main() {

let mut all_bridges: Vec<(usize, usize)> = vec![];

for (i, (mut u, mut v)) in edges.iter_mut().enumerate() {
for (i, &mut (mut u, mut v)) in edges.iter_mut().enumerate() {
if is_bridge[i] {
if u > v {
std::mem::swap(&mut u, &mut v);
Expand Down
2 changes: 1 addition & 1 deletion examples/graphs/cuts_aizu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fn main() {
let all_cut_nodes = is_cut
.iter()
.enumerate()
.filter(|(_, &value)| value)
.filter(|&(_, &value)| value)
.map(|(index, _)| index)
.collect::<Vec<usize>>();

Expand Down
2 changes: 1 addition & 1 deletion examples/helpers/lis_handmade.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// verification-helper: PROBLEM https://onlinejudge.u-aizu.ac.jp/courses/lesson/2/ITP1/all/ITP1_1_A

use programming_team_code_rust::helpers::lis::Lis;
use rand::{thread_rng, Rng};
use rand::{Rng, thread_rng};

fn lis_quadratic(a: &[i32]) -> usize {
let n = a.len();
Expand Down
2 changes: 1 addition & 1 deletion src/data_structures/deq_agg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ impl<T: Clone, F: Fn(&T, &T) -> T> DeqAgg<T, F> {
if self.le.is_empty() {
let mut ary = vec![];
std::mem::swap(&mut ary, &mut self.ri);
self.rebuild((ary.len() + 1) / 2, ary);
self.rebuild(ary.len().div_ceil(2), ary);
}
self.le.pop().map(|elem| elem.0)
}
Expand Down
2 changes: 1 addition & 1 deletion src/graphs/count_paths_per_length.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! # Count the number of paths of each length in a tree
use crate::graphs::cent_decomp::{cent_decomp, CentDecompDfs};
use crate::graphs::cent_decomp::{CentDecompDfs, cent_decomp};
use crate::numbers::fft::fft_multiply;

fn conv(a: &[u64], b: &[u64]) -> Vec<u64> {
Expand Down
Loading