Skip to content

Commit fffa537

Browse files
authored
add gitgud (#104)
* add gitgud * format * fix * fix
1 parent 7fe3a97 commit fffa537

File tree

8 files changed

+11
-7
lines changed

8 files changed

+11
-7
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@
1313
- https://github.com/EbTech/rust-algorithms
1414
- https://github.com/qitoy/rust-library
1515
- https://github.com/stuart0035/procon-lib-rs
16+
17+
## Our List of Recommended Practice Problems
18+
19+
[gitgud.cc](https://www.gitgud.cc/)

examples/data_structures/deq_agg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
use proconio::input;
44
use programming_team_code_rust::data_structures::deq_agg::DeqAgg;
5-
use rand::{thread_rng, Rng};
5+
use rand::{Rng, thread_rng};
66
use std::collections::VecDeque;
77

88
const MOD: u64 = 998_244_353;

examples/data_structures/range_container_handmade.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// verification-helper: PROBLEM https://onlinejudge.u-aizu.ac.jp/courses/lesson/2/ITP1/all/ITP1_1_A
22

33
use programming_team_code_rust::data_structures::range_container::RangeContainer;
4-
use rand::{thread_rng, Rng};
4+
use rand::{Rng, thread_rng};
55
use std::collections::BTreeMap;
66

77
fn main() {

examples/graphs/bridges_aizu.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fn main() {
2424

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

27-
for (i, (mut u, mut v)) in edges.iter_mut().enumerate() {
27+
for (i, &mut (mut u, mut v)) in edges.iter_mut().enumerate() {
2828
if is_bridge[i] {
2929
if u > v {
3030
std::mem::swap(&mut u, &mut v);

examples/graphs/cuts_aizu.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fn main() {
3030
let all_cut_nodes = is_cut
3131
.iter()
3232
.enumerate()
33-
.filter(|(_, &value)| value)
33+
.filter(|&(_, &value)| value)
3434
.map(|(index, _)| index)
3535
.collect::<Vec<usize>>();
3636

examples/helpers/lis_handmade.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// verification-helper: PROBLEM https://onlinejudge.u-aizu.ac.jp/courses/lesson/2/ITP1/all/ITP1_1_A
22

33
use programming_team_code_rust::helpers::lis::Lis;
4-
use rand::{thread_rng, Rng};
4+
use rand::{Rng, thread_rng};
55

66
fn lis_quadratic(a: &[i32]) -> usize {
77
let n = a.len();

src/data_structures/deq_agg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ impl<T: Clone, F: Fn(&T, &T) -> T> DeqAgg<T, F> {
145145
if self.le.is_empty() {
146146
let mut ary = vec![];
147147
std::mem::swap(&mut ary, &mut self.ri);
148-
self.rebuild((ary.len() + 1) / 2, ary);
148+
self.rebuild(ary.len().div_ceil(2), ary);
149149
}
150150
self.le.pop().map(|elem| elem.0)
151151
}

src/graphs/count_paths_per_length.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! # Count the number of paths of each length in a tree
2-
use crate::graphs::cent_decomp::{cent_decomp, CentDecompDfs};
2+
use crate::graphs::cent_decomp::{CentDecompDfs, cent_decomp};
33
use crate::numbers::fft::fft_multiply;
44

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

0 commit comments

Comments
 (0)