Tubes 2
Public  2y:8м  24xp  Programming  66.7% 
See p180 from Sinan. Now there are 10 tubes named with A,B,C,D,E,F,G,H,I,J with capacities 14,13,12,12,10,10,7,7,7,7 respectively. The first state is (A to J) 10,9,11,10,9,8,5,5,4,2. The goal state is (A to J) 13,12,11,11,4,6,6,0,6,4. Encode each state as a hex number JIHGFEDCBA, so the starting state is 245589AB9A, the ending state is 460664BBCD.
We need to reach to the goal state with the mimimum number of steps.
Let A be the eventual array of size k with the states (from first to last) in it:
A=[245589AB9A,...,460664BBCD]
where A[i] is the state at the ith phase, i=1,..,k
Let N be the hex number obtained by concatenating the hex digits of the above array:
N=245589AB9A...460664BBCD or
N=A[1]*B^(k1)+A[2]*B^(k2)+...+A[k]*B^0 where B=16^10=2^40
Find the smallest N.
(i.e. Find the lexicographically first, shortest path.)
Answer format: N Mod 1000000007
My timing: 60 sec. [[using less than 1GB of Ram]]
We need to reach to the goal state with the mimimum number of steps.
Let A be the eventual array of size k with the states (from first to last) in it:
A=[245589AB9A,...,460664BBCD]
where A[i] is the state at the ith phase, i=1,..,k
Let N be the hex number obtained by concatenating the hex digits of the above array:
N=245589AB9A...460664BBCD or
N=A[1]*B^(k1)+A[2]*B^(k2)+...+A[k]*B^0 where B=16^10=2^40
Find the smallest N.
(i.e. Find the lexicographically first, shortest path.)
Answer format: N Mod 1000000007
My timing: 60 sec. [[using less than 1GB of Ram]]
New Members
 Pamblumsshata 1d:18h
 pipe_palacio 2d:5h
 Sedictious 3d
 zombieadd 3d:16h
 hoppala 1w:2d
Fresh Problems

Generating Seeds 4d:14h
solved by 4 
Sum of three cubes 6d:13h
solved by 6 
Squarefree Numbers 1w:6d
solved by 12 
Carmichael chains 3w
solved by 8 
Standard Nim 3w:5d
solved by 7