update day2part2
This commit is contained in:
parent
29ff13fb86
commit
8a21dc82f9
@ -7,8 +7,17 @@ fn main() {
|
||||
for line in input {
|
||||
let split:Vec<_> = line.split(':').collect();
|
||||
let rounds: Vec<_> = split.last().unwrap().split(';').collect();
|
||||
let rounds: Vec<_> = rounds.iter().map(|x| x.split(',').collect::<Vec<_>>()).collect();
|
||||
let rounds: Vec<_> = rounds.iter().map(|x| x.iter().map(|x| x.trim().split(' ').collect::<Vec<_>>()).collect::<Vec<_>>()).collect();
|
||||
let rounds: Vec<_> = rounds.iter()
|
||||
.map(|x| {
|
||||
x.split(',').collect::<Vec<_>>()
|
||||
}).collect();
|
||||
|
||||
let rounds: Vec<_> = rounds.iter()
|
||||
.map(|x| {
|
||||
x.iter().map(|x| {
|
||||
x.trim().split(' ').collect::<Vec<_>>()
|
||||
}).collect::<Vec<_>>()
|
||||
}).collect();
|
||||
let (mut r_max, mut g_max, mut b_max) = (0, 0, 0);
|
||||
for round in rounds {
|
||||
for set in round {
|
||||
|
Loading…
Reference in New Issue
Block a user