Compare commits
	
		
			2 Commits
		
	
	
		
			2c03c77ff6
			...
			b12bf04f91
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| b12bf04f91 | |||
| 4c68223c42 | 
| @@ -8,7 +8,7 @@ func readInput(_ filePath: String) throws -> [Int] { | |||||||
| func haggle(_ seeds: [Int]) -> [[Int]: [Int: Int]] { | func haggle(_ seeds: [Int]) -> [[Int]: [Int: Int]] { | ||||||
|     var bananas: [[Int]: [Int: Int]] = [:] |     var bananas: [[Int]: [Int: Int]] = [:] | ||||||
|     for (monkey, seed) in seeds.enumerated() { |     for (monkey, seed) in seeds.enumerated() { | ||||||
|         var prevs = [monkey, seed, Int.min, Int.min] |         var prevs = [Int.min, Int.min, Int.min, Int.min] | ||||||
|         var lastPrice = seed |         var lastPrice = seed | ||||||
|         for _ in 0..<2000 { |         for _ in 0..<2000 { | ||||||
|             var price = ((lastPrice << 6) ^ lastPrice) & 16777215 |             var price = ((lastPrice << 6) ^ lastPrice) & 16777215 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user