mirror of
https://gitlab.com/mfocko/Codeforces.git
synced 2024-12-22 02:21:22 +01:00
chore(rs): implement printing of ‹Vec<T>›
Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
parent
efed3b5976
commit
3911ca609c
1 changed files with 9 additions and 0 deletions
|
@ -329,4 +329,13 @@ mod output {
|
|||
pub fn yesno(ans: bool) {
|
||||
println!("{}", if ans { "YES" } else { "NO" });
|
||||
}
|
||||
|
||||
pub fn print_vec<T: Display>(v: &[T]) {
|
||||
print!("{}", v[0]);
|
||||
|
||||
for i in 1..v.len() {
|
||||
print!(" {}", v[i]);
|
||||
}
|
||||
println!();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue