Skip to content

kento-yoshidu/Rust_algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3,576 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust_algorithm

AtCoder Template

改善が必要

  • ABC001 D - 感雨時刻の整理

memo

Why chars().nth(index).unwrap() is so slow?

Not AC

BFS

ナップサック

ダイクストラ

ワーシャルフロイド

01-BFS

Union Find

重み付きUF

use std::io::*;
use std::str::FromStr;

fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages