A. Data writes a program for each ship in the attacking fleet to perform multiple Picard maneuvers, hitting the cube(s) with phasers and torpedos every time each ship stops. No way to predict where the ships will appear next.
B. Old Spock supplies Young Spock with the formula for Red Matter. The future fleet carries RM weapons for special occasions to either fire or beam into a cube, creating a mini-singularity that swallows the cube.
C. Tribbles. Lots and lots of tribbles.
D. All of the above.