This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Enter your code here | |
use std::io; | |
#[derive(Debug)] | |
enum Case { | |
TwoLines(String, String) | |
} | |
fn readStdin() -> Vec<String> { | |
let mut result: Vec<String> = Vec::new(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Memoize<'a, A, R> { | |
cache: std::collections::HashMap<A, R>, | |
func: &'a dyn Fn(A) -> R | |
} | |
impl<'a, A, R> Memoize<'a, A, R> where | |
A: Eq + std::hash::Hash + Copy + Clone, | |
R: Copy + Clone | |
{ | |
fn from_func(func: &'a dyn Fn(A) -> R) -> Self { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; <! - left alt-key | |
; ^ - ctrl-key | |
; + - shift-key | |
; sc021 - W | |
; sc010 - D | |
; sc011 - F | |
; sc014 - T | |
; sc013 - R | |
; sc024 - J | |
; sc025 - K |