Struct FastIO

Source
pub struct FastIO { /* private fields */ }
Expand description

高速な標準入出力

Implementations§

Source§

impl FastIO

Source

pub fn new() -> Self

FastIOを生成する。

Source

pub fn getc(&mut self) -> Option<u8>

1バイトだけ読み出す。

Source

pub fn peek(&self) -> Option<u8>

1バイトだけ先読みする。

Source

pub fn skip(&mut self)

is_ascii_whitespacetrueである間を読み飛ばす。

Source

pub fn read_u64(&mut self) -> u64

u64型の数値を読み出す。

Source

pub fn read_u32(&mut self) -> u32

u32型の数値を読み出す。

Source

pub fn read_usize(&mut self) -> usize

usize型の数値を読み出す。

Source

pub fn read_i64(&mut self) -> i64

i64型の数値を読み出す。

Source

pub fn read_i32(&mut self) -> i32

i32型の数値を読み出す。

Source

pub fn read_isize(&mut self) -> isize

isize型の数値を読み出す。

Source

pub fn read_f64(&mut self) -> f64

f64型の数値を読み出す。

Source

pub fn read_chars(&mut self) -> Vec<char>

文字列をVec<char>として読み出す。

Source

pub fn read_string(&mut self) -> String

文字列をStringとして読み出す。

Source

pub fn read_bytes(&mut self) -> Vec<u8>

文字列をVec<u8>として読み出す。

Source

pub fn read_char(&mut self) -> char

is_ascii_whitespaceでない文字を一文字だけ読み出す。

Source

pub fn write<T: Display>(&mut self, s: T)

sを標準出力に書き込む。

Source

pub fn write_rev<T: Display>(&mut self, s: T)

sを標準出力に逆順に書き込む。

Source

pub fn writeln<T: Display>(&mut self, s: T)

sと改行文字を標準出力に書き込む。

Source

pub fn writeln_rev<T: Display>(&mut self, s: T)

s逆順と改行文字を標準出力に書き込む。

Trait Implementations§

Source§

impl Drop for FastIO

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl Freeze for FastIO

§

impl RefUnwindSafe for FastIO

§

impl Send for FastIO

§

impl Sync for FastIO

§

impl Unpin for FastIO

§

impl UnwindSafe for FastIO

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.