chore(rs): reorder modules to reflect alphabetic order

Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2023-07-29 19:51:35 +02:00
parent cae33b8f38
commit 44aa0b6d6d
Signed by: mfocko
GPG key ID: 7C47D46246790496

View file

@ -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>;
}