15+13. Schwarz nimmt den letzten Zug zurück; dann Hilfsmatt in einem Zug!
White captures are a6xb7, b6xc7 and h2xg3. Black capture is f3xe2.
Suppose black just castled. When h2xg3 was played, the whole northeast
corner must have been there already: f2-f4 was already played to let
in the rook on f3. Bg5, Qh5 and Bh4 must've been there too, because
otherwise the only route the black bishop could've gotten in was over
f6 or h6, delivering an impossible check to the king, and the white
pieces were there too. This means that the piece that was created on
h1 by promotion, is either still on the board, or was captured on c7.
Since all black pieces were already on their positions they were now,
it was captured on c7. So the piece that was created on c8 by promotion
is still on the board. It can't have been the knight on d5, since it
couldn't get away without giving check, so it was the rook on b7. The
knight on d5 arose from promotion on b8 then, and this promotion happened
before the promotion on c8.
So the last moves were, if black just castled:
-1. ... OOO -2. Nb4-d5 Rf2-f3 -3. Nc2-b4 Rf3-f2 -4. Nd4-c2 Rf2-f3
-5. Ne6-d4 Rf3-f2 -6. Nd8-e6 Rf2-f3 -7. Rb8-b7 Rf3-f2 -8. Rc8-b8 Rf2-f3
-9. c7-c8=R Rf3-f2 -10. Ne6-d8 Rf2-f3 -11. Nc5-e6 Rf3-f2 -12. Na6-c5
Rf2-f3 -13. Nb8-a6 Rf3-f2 -14. b7-b8=N Rf2-f3 -15. a6xBb7 Bc8-b7 -16.
a5-a6 b7-b6 -17. b6xNc7 Nd5-c7 -18. a4-a5 Nb4-d5 -19. a3-a4 Nd3-b4 -20.
a2-a3 Rf3-f2 -21. c2-c3 Nf2-d3 -22. b5-b6 Nh1-f2 -23. b4-b5 h2-h1=N
-24. b3-b4 h3-h2 -25. h2xNg3
But now the rooks can't go back to behind the pawn barrier! So retracting
the position, assuming black just castled, isn't possible. So black
didn't castle as last move.
Solution: Retract Re8-d8, and h#1 with 1. Kd8 Rb8#
Solution by Philippe Schnoebelen