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
let s:second = 1 | |
let s:minute = 60 * s:second | |
let s:hour = 60 * s:minute | |
let s:day = 24 * s:hour | |
let s:week = 7 * s:day | |
let s:month = 30 * s:day | |
let s:year = 365 * s:day | |
function! s:get_undo_time(undo_dict) abort | |
let l:idx = a:undo_dict.seq_cur |
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
use crate::common::Solution; | |
use std::collections::BTreeMap; | |
type PassportInformation<'a> = BTreeMap<&'a str,&'a str>; | |
pub fn solve(lines: &[String]) -> Solution { | |
let s = lines.join("\n"); | |
let passports: Vec<PassportInformation> = s.split("\n\n") | |
.map(|pwd_fields| pwd_fields | |
.split_whitespace() |
OlderNewer