goorm_edu_rs_kit 0.1.1

A code test library for easy variable of integer or vector of integer from standard input.
Documentation
  • Coverage
  • 75%
    3 out of 4 items documented0 out of 2 items with examples
  • Size
  • Source code size: 8.18 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.17 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 18s Average build duration of successful builds.
  • all releases: 18s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • pmnxis/goorm_edu_rs_kit
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • pmnxis

goorm edu rs kit, easy helper kit for rust code test environment.

The code test (a.k.a competitive programming) with rust has a problem that it is sometimes difficult to process the integer from standard input. This library solves such situations comfortably.

Usage Example

use goorm_edu_rs_kit::goorm_helper;

fn main() {
    // Input Example
    // '8\n'
    let len: usize = goorm_helper::get_int();
    // Input Example
    // '10 20 30 40 50 60 70 80\n'   or
    // '10 20 30 40 50 60 70 80 \n'  or
    // '10 20 30 40 50 60 70 80   \n'
    let list: Vec<i32> = goorm_helper::get_vec_int(len);
    
    assert_eq!(len, 8);
    assert_eq!(&[10, 20, 30, 40, 50, 60, 70, 80], &list[..]);

    solve(&list);
}

goorm_helper::get_int()

Get single integer from one line stdio.

  • If system architecture is 32bit, cannot parse number bigger than i32::MAX or smaller than i32::MIN.
  • If system architecture is 64bit, cannot parse number bigger than i64::MAX or smaller than i64::MIN.

goorm_helper::get_vec_int(len: usize)

Get vectorized multiple integers with fixed length from one line stdio.

  • Must contain integer count in one line.
  • Experimental support, that super huge one line string that is bigger than 8KB buffer.

Related Project

10weeks-codingtest : https://github.com/dongyi-kim/10weeks-codingtest