mirror of
https://gitlab.com/mfocko/Codeforces.git
synced 2024-11-09 13:49:06 +01:00
chore(rs): reorder modules to reflect alphabetic order
Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
parent
cae33b8f38
commit
44aa0b6d6d
1 changed files with 48 additions and 48 deletions
|
@ -38,6 +38,54 @@ fn main() {
|
|||
}
|
||||
// endregion runner
|
||||
|
||||
#[allow(dead_code)]
|
||||
mod aliases {
|
||||
use std::collections::{BTreeMap, BTreeSet, VecDeque};
|
||||
|
||||
pub type V<T> = Vec<T>;
|
||||
pub type M<K, V> = BTreeMap<K, V>;
|
||||
pub type S<T> = BTreeSet<T>;
|
||||
pub type Q<T> = VecDeque<T>;
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
mod input {
|
||||
use std::collections::VecDeque;
|
||||
use std::io;
|
||||
use std::str::FromStr;
|
||||
|
||||
pub struct Scanner {
|
||||
buffer: VecDeque<String>,
|
||||
}
|
||||
|
||||
impl Scanner {
|
||||
pub fn new() -> Scanner {
|
||||
Scanner {
|
||||
buffer: VecDeque::new(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn next<T: FromStr>(&mut self) -> T {
|
||||
if self.buffer.is_empty() {
|
||||
let mut input = String::new();
|
||||
|
||||
io::stdin().read_line(&mut input).ok();
|
||||
|
||||
for word in input.split_whitespace() {
|
||||
self.buffer.push_back(word.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
let front = self.buffer.pop_front().unwrap();
|
||||
front.parse::<T>().ok().unwrap()
|
||||
}
|
||||
|
||||
pub fn next_vec<T: FromStr>(&mut self, n: usize) -> Vec<T> {
|
||||
(0..n).map(|_| self.next()).collect()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
mod math {
|
||||
#[derive(Copy, Clone, Default)]
|
||||
|
@ -253,51 +301,3 @@ mod output {
|
|||
println!("{}", if ans { "YES" } else { "NO" });
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
mod input {
|
||||
use std::collections::VecDeque;
|
||||
use std::io;
|
||||
use std::str::FromStr;
|
||||
|
||||
pub struct Scanner {
|
||||
buffer: VecDeque<String>,
|
||||
}
|
||||
|
||||
impl Scanner {
|
||||
pub fn new() -> Scanner {
|
||||
Scanner {
|
||||
buffer: VecDeque::new(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn next<T: FromStr>(&mut self) -> T {
|
||||
if self.buffer.is_empty() {
|
||||
let mut input = String::new();
|
||||
|
||||
io::stdin().read_line(&mut input).ok();
|
||||
|
||||
for word in input.split_whitespace() {
|
||||
self.buffer.push_back(word.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
let front = self.buffer.pop_front().unwrap();
|
||||
front.parse::<T>().ok().unwrap()
|
||||
}
|
||||
|
||||
pub fn next_vec<T: FromStr>(&mut self, n: usize) -> Vec<T> {
|
||||
(0..n).map(|_| self.next()).collect()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
mod aliases {
|
||||
use std::collections::{BTreeMap, BTreeSet, VecDeque};
|
||||
|
||||
pub type V<T> = Vec<T>;
|
||||
pub type M<K, V> = BTreeMap<K, V>;
|
||||
pub type S<T> = BTreeSet<T>;
|
||||
pub type Q<T> = VecDeque<T>;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue