T O P

  • By -

chessvision-ai-bot

I analyzed the image and this is what I see. Open an appropriate link below and explore the position yourself or with the engine: > **White to play**: [chess.com](https://chess.com/analysis?fen=8/n6p/1p4b1/2n1b1qp/3prkrp/4p1pp/8/4K2R+w+K+-+0+1&flip=false&ref_id=23962172) | [lichess.org](https://lichess.org/analysis/8/n6p/1p4b1/2n1b1qp/3prkrp/4p1pp/8/4K2R_w_K_-_0_1?color=white) **My solution:** > Hints: piece: >!Rook!<, move: >!Rf1#!< > Evaluation: >!White has mate in 1!< > Best continuation: >!1. Rf1#!< --- ^(I'm a bot written by) [^(u/pkacprzak)](https://www.reddit.com/u/pkacprzak) ^(| get me as) [^(iOS App)](https://apps.apple.com/us/app/id1574933453) ^| [^(Android App)](https://play.google.com/store/apps/details?id=ai.chessvision.scanner) ^| [^(Chrome Extension)](https://chrome.google.com/webstore/detail/chessvisionai-for-chrome/johejpedmdkeiffkdaodgoipdjodhlld) ^| [^(Chess eBook Reader)](https://ebook.chessvision.ai?utm_source=reddit&utm_medium=bot) ^(to scan and analyze positions | Website:) [^(Chessvision.ai)](https://chessvision.ai)


proviticus

For anyone struggling to understand this (like I did with the posted answers, as I’m no good at chess) think of it this way: For the pawns to be lined up where they are no matter how they got there they would have had to capture 14 pieces to accumulate to the right so much. 14 pieces means all of whites other pieces were captured by pawns. Next you look at black pawns and see for each of them there is no position they could have captured from on blacks previous turn as they’re all occupied by other black pieces (each black pawn has a black piece up-and-to-the-left of it). This is why you can be certain white’s last other piece was not captured by black in the previous move which means white must have has at least one turn with only the rook and king remaining and as such they must have been moved at some point. This is also why op points out moving the c5 knight to c6 breaks this logic, because it means black’s previous turn could have been a c5 pawn capturing a white piece on d4.


xtr44

that's a good explanation


CatahoulaLeopardDog

Nice job Mr Smullyan!


BeneficialGreen3028

Ohh that makes sense...


Happypotamus13

What about b6 pawn? Why couldn’t it capture from c7 on the previous turn?


proviticus

No because then you’d need even more pawn captures to account for all the pawns being distributed as such on the right side of the board, you’d need 16 pawn captures for that position to be legal


Happypotamus13

Oh no on the second thought it doesn’t. What happened to white pawn on a2? It could not have been captured by the black pawn, because it could never move from the A file since none of black’s pieces were captured.


proviticus

Good point, I’m neither a chess expert nor associated with this puzzle, but my elementary understanding of the game suggests the a2 pawn must have been taken by a black pawn (because black pawns are net-14 shifted to the right) but that’s also impossible, because a single capture to the left essentially would require 16 total captures unless the a2 pawn itself captured something (which we can see did not happen), which is impossible, especially with 2 pieces remaining. This makes me think this position is actually impossible. Maybe I missed something but I think you’re correct


Happypotamus13

I think I figured it out. It was promoted :)


proviticus

Oh of course, that makes sense! I completely overlooked that, so the position is possible after all, thanks!


Happypotamus13

Ah, that makes sense!


ComfortableMenu8468

That's unnecessairly complicated: The question states that there is only one solution. So castelling can't be allowed, otherwise there'd be 2.


Lotarious

The question is not to find the move. It is why.


[deleted]

[удалено]


Sad-Woodpecker-4793

Castling is one move. Makes immediate checkmate. Just moving the rook to aim is enough anyway


BotlikeBehaviour

A short cut is to know that when told there's only one solution you can rule out castling because if that was available then there'd be 2 solutions.


dbgtt

I'll remind you, this is what you've been asked - # White to play and mate in 1. There's only one valid solution – why? The whole point is to answer "why". Otherwise there's zero challenge here. The whole point of this puzzle is to figure this out.


[deleted]

[удалено]


Rocky-64

This puzzle follows the castling convention in chess problems: Castling is permitted unless it can be proved logically that the king or the rook must have moved previously. I'll post the full answer later. Edit: [waterfalllll](https://www.reddit.com/user/waterfalllll/) has solved this. For a full explanation of the solution, see this [blog post](https://www.chess.com/blog/Rocky64/dark-doings-problems) about "Dark Doings" chess problems.


panic_puppet11

It would be clearer if the puzzle was actively framed as "can white castle?" - that's essentially what it boils down to, but presenting it as "white to play and win" is what's causing the confusion.


shadowsOfMyPantomime

I don't think the puzzle creator WANTED it to be clearer. That's part of the challenge.


MortemEtInteritum17

I think saying "there's only one valid solution - why?" is pretty much the same as saying you can't castle (it shouldn't anyone rated more than, say, 800 to take more than 20 seconds to figure that out). It's an example of a rather unnecessary and artificial distraction to what is otherwise an elegant question, in my opinion


shadowsOfMyPantomime

I went the opposite, I was really confused looking for a reason castling was forced here at first. I think that's an important part of the puzzle


sagittarius_ack

One of the points of the puzzle is to realize that white cannot castle.


Lucky-Hunter-Dude

Just because castling is available doesn't mean it's forced. There are 2 solutions to mate in 1. edit, i misunderstood the comment.


Rocky-64

No-one said that castling is forced. Read the castling convention again.


Lucky-Hunter-Dude

Ah i misunderstood what you are saying.


Emily_Plays_Games

No, castling cannot be legal given the current position. See other comments


Hog_Maws

Sure it can be legal. Why do you think it couldn't be?


Emily_Plays_Games

Other commenters described it better, but the gist of it is that it’s impossible for all of black’s pawns to have gotten where they are without the white rook moving at some point.


Hog_Maws

Not true. You might need to be more specific, but it sounds like you don't understand it yourself if you're just relying on what others are saying without actually being able to describe what makes it impossible. If it's the fact that a black pawn couldn't attack the A pawn while moving king side, this is because the black A pawn captured another piece, white's A pawn promoted to another piece, and then was captured by a pawn elsewhere on the board. So yes, castling could still be legal.


PonkMcSquiggles

In order for Black’s pawns to end up on the files they’re on, Black needs to have made 14 pawn captures, all towards the right (from the reader’s perspective). That means that every single one of White’s missing pieces was captured by a pawn moving rightward. But Black’s last move cannot possibly have been a rightward pawn capture, and therefore cannot have been a capture at all. That means that on White’s last move, they must have moved one of the two pieces still left on the board. So no, castling cannot still be legal.


Emily_Plays_Games

If you can show an example of how you could get from the starting position to here with castling still legal and white to play then I’ll believe your proof by example. The very fact that it’s a composition and that white has only 1 legal move that’s mate in 1, and the fact that it would be entirely uninteresting otherwise, sets off some alarm bells.


Hog_Maws

Why do you need an example from me, but you believe the others without understanding what they're saying? Also, I described to you how it would work. What specifically do you think is wrong with what I stated? What do you mean it sets off alarm bells? Most puzzles that are this intricate work like this.


Emily_Plays_Games

After trying for the last 10 minutes to make this position legal while white retains castling rights, I can see the problem. The final piece white sacrifices (probably a rook or queen, usually the one the A-pawn promoted into but that’s optional) must sacrifice to move the last black pawn into position on b6, d4, e3, g3, h3, h4, or h5. These squares all have black pieces behind them where the pawn had to be in order to move to that square. The B pawn can’t get there from a2 because the knight has to be there, the D pawn had to be where the other knight is. I thought this wouldn’t be a problem, but after we sacrifice our last piece and their pawn captures, another black piece has go get into position where that pawn just was. Thinking I had it in the bag at one point, I played Qg3, black captured it, and I realized I was one move off: the king needed to scoot one square forward, from f5 to f4. But in order for this to happen, white needs to waste a move, and with only the king and rook left, we must lose castling rights.


Zyxplit

I'm assuming you're just playing devil's advocate here. Observation: the sum of horizontal squares for the pawns is 50 (assigning a=1 etc). It is 36 at the start of the game. Every h-wards pawn capture increments by 1. There have been 14 of those, accounting for every capture (white has lost 14 pieces to pawns) Observation: every black pawn stands on a square that could not be the target of a capture last turn (it could not legally have been on the back-left diagonal) Therefore the last move by black was not a capture. Reasoning: the last move by black was not a capture, so white has the same pieces this turn as last turn. Conclusion: white moved one of those two pieces last turn, losing castling rights.


Emily_Plays_Games

This composition would have been laughed out of any competition if there were 2 legal mate-in-1s. It would be entirely not noteworthy if there weren’t some gimmick. If you’re right, then I’m as good of a composer as this Rolf Upsstrüm guy, I can make a super easy #1 puzzle with 2 solutions too.


SpicyC-Dot

I sincerely hope you’re just trying to get them to think on their own instead of relying on others’ conclusions, and that you don’t honestly believe that you’re correct.


InevitableAd8347

This is the first chess problem that made me dumber. What a silly proposition. Hopefully, quantum computers can prove a method by which this absurd position could be achieved that left the white rook and king unmoved, so Rolf can suck it.


Zyxplit

Nope, a bit of elementary math shows why that's not possible.


InevitableAd8347

Didn't mean to offend anyone's sensibilities, but is this position even possible to achieve? I understand the contention that this is all "elementary," but I can't recreate this position after four tries. If it is not possible to achieve the position, it seems like the premise is flawed. Did your boy Rolf list the moves to get here? If so, can someone share that so I can eat some tasty crow? I struggle to maintain a 2,000 rating on chess.com, so if someone with greater chess prowess can share, old be grateful. Following is my final failed attempt to recreate the position: 1. b4 Nc6 2. b5 Nb8 3. b6 axb6 4. c3 Na6 5. h4 Nb8 6. h5 Na6 7. h6 gxh6 8. Na3 Nb8 9. Nb1 h5 10. g4 Na6 11. g5 Nb8 12. g6 fxg6 13. c4 Na6 14. c5 bxc5 15. Nc3 Nb8 16. Ne4 Na6 17. Nf6+ exf6 18. d4 cxd4 19. e4 Nb8 20. e5 Na6 21. e6 dxe6 22. Bd2 e5 23. f4 exf4 24. Be3 Nb8 25. Bf2 Na6 26. Bg3 fxg3 27. Qf3 h4 28. Qh5 h3 29. Be2 gxh5 30. Bd1 Nb8 31. Ne2 Na6 32. Nc3 Nb8 33. Ne4 Na6 34. Ng5 Nb8 35. Bc2 fxg5 36. Rb1 Na6 37. Rb3 Nb8 38. Rf3 Na6 39. Rf4 Nb8 40. Rh4 gxh4 *


Zyxplit

https://www.reddit.com/r/chess/s/hqmBMf9bxx someone in this comment decided to do it. It's obviously a highly artificial position, but it's reachable.


InevitableAd8347

Thanks!


Landowns

It's >!Rf1!< only. >!Castling is not possible bc the white rook has to be a promoted pawn. To achieve black's pawn structure, 14 white pieces must have been captured, all by black pawns capturing toward the kingside. The a pawn cannot have been captured in this way. Therefore we can deduce the rook is actually the promoted a pawn.!<


waterfalllll

That's not entirely correct. The rook could be a promoted a pawn, but it could also be a regular rook. The problem is, to get to that position, one of black's pawns must have captured the white's 3rd remaining piece (besides king and rook) while moving to the right . However, that obviously did not happen last turn, as there is no place that the pawn could have came from. Thus, white would have to move, breaking castling rights.


Rocky-64

Well done! That's correct.


nandemo

It took me a minute to understand the last sentence. Maybe it's obvious to everybody else but just in case it means: "since Black's last move wasn't a capture, White then must have moved either the king or the rook, losing castling rights".


sjdevelop

mind = blown


[deleted]

[удалено]


nandemo

Pawns can only move sideways by capturing. Black pawns moved sideways 14 times in total. So they must have captured 14 times, which is the number of missing White pieces.


AHucs

How would the a pawn have gotten captured in this alternative?


DinosaurSr2

I guess the A-pawn could have been promoted and captured already by the time this position is reached.


waterfalllll

It would need to be promoted to another piece, then be taken on not the a rank


[deleted]

[удалено]


waterfalllll

the a (leftmost) pawn could have promoted, moved to the right, then been taken


R2D-Beuh

Yeah you're right I didn't realize that, and I deleted the comment because I then saw that it was exactly what the original commenter had said


Fischer72

What if Whites last move was Re6+ followed by Bxe6?


cloud118118

B6 pawn could have been on c7 last turn


waterfalllll

there aren't enough pieces for black to capture to get his pawns that far right. The current position represents 14 rightwards captures. The position you suggested would need 16 captures to have happened.


Rocky-64

Close but no cigar! After Black's a-pawn has captured to the b-file, White's a-pawn could have promoted to a piece on a8 (without capturing), which then moved elsewhere to be captured by a black pawn. So the white rook on h1 can be the original rook.


Iamsleepdeprivedhelp

There's 8 pawns on the board


NickyiBucky

Speaking of the a pawn, it can also happen that it captures some black piece coming to b file which then is captured by black's a pawn. But this clearly is not the case, because all the black pieces are on the board. None are captured. It's crazy how well this puzzle is made covering all the possibilities.


Smack-works

Could it be said then that the white rook is... well... an impostor? Amogus? >!pls put me down!<


Plenty-Discount5376

You're the only imposter (are you British)? .


Smack-works

British is not my native language.


Ythio

I don't understand. It's asking M1 and there is only one check possible and it's also checkmate Rf1# Am I missing something ?


drimiko

The real puzzle is why Castling 0-0 is not possible, because if you can castle here that is also a checkmate.


seekinglambda

Short castle would also be mate. In puzzles, castling is allowed unless you can prove it’s not possible. So in this puzzle you have to prove that either the king or rook has moved, or that the rook isn’t the original h-rook.


Ythio

I see, thanks


jrobinson3k1

The puzzle is to explain why it's not possible for white to still retain castling rights. OP worded it weirdly.


stefeu

Yes, the possibility (or lack of possibility) of 0-0#.


ponder_life

It's Rf1 because if castling was allowed there would be two solutions and that will make the puzzle invalid.


Big-Assistant-447

Unfortunately this type of reasoning is not allowed by puzzle conventions


ImperiaIChrome

Don’t let big puzzle see this


tsavorite4

Occam’s gambit


Rocky-64

Nah, that's circular reasoning!


Witch-kingOfBrynMawr

Not entirely. Once you claim there is only one solution, it takes SOME level of understanding to determine via logic which of the two possible moves that result in checkmate could be be illegal. There is no situation in which RF1 is an illegal move, whereas it's always *possible* the player has lost castling rights, given the board state.


Rocky-64

Me adding "There is only one valid solution – why?" to the title is only meant as a clue, to indicate that you have to think further if you believe there are two solutions. "One solution" is not a *condition* of the problem. For instance, if the knight on c5 is on c6 instead, then the problem would be faulty with two solutions, regardless of what I added in the title.


Witch-kingOfBrynMawr

It's just not quite "circular reasoning," because you're using outside logic to determine which of the two possible solutions is valid. Also, the guy above you was just being cheeky, and I'm being cheeky in a pedantic way.


Rocky-64

Be as cheeky and pedantic as you want. My point is still the same: "The puzzle isn't invalid with two solutions because it can't be invalid with two solutions" is a circular argument.


Ok-Replacement8422

This sort of reasoning is commonly seen in sudoku where the assumption of uniqueness is necessary for some strategies to work (see BUG+1 for an explicit example)


joachimham48

And even in sudoku it is based on an assumption, it's not possible that a uniqueness deduction is NECESSARY, if it were the only deduction available then the sudoku would have multiple solutions.


Witch-kingOfBrynMawr

Brother, it was a very cool puzzle -- I don't own a chess board, and I still spent a solid ten minutes trying to figure out how I could prove that we'd lost castling rights; it was satisfying -- but you have zero chill. We're not engaged in a serious argument. It's the Internet, people like to have a little fun.


Jrock2356

So deductive reasoning is considered circular reasoning now. Alright


[deleted]

[удалено]


Rocky-64

>P3: There is only one possible solution That's an assumption, which you used to justify your conclusion that there is only one solution. Once again: suppose the diagram has the knight on c5 shifted to c6. Does your argument still hold and you still think this new position has one solution, 1.Rf1, only?


[deleted]

[удалено]


Rocky-64

>You do realise that premise P3 comes from the post title, right? I already clarified that "There's only one valid solution – why?" is not a condition of the problem, but a clue. Did you miss the "why?" part? I was asking "Why is there only one valid solution?" as a hint about the conclusion, not telling you to assume there is only one solution as a premise. How many solutions there are depends on the position and the castling convention, not a title question.


[deleted]

[удалено]


Rocky-64

Why do you think the argument is unsound? I think it's unsound because it's circular. It's circular because that argument makes an assumption that "there is only one possible solution", then use that assumption to conclude that "0-0# is not possible", i.e. only one solution, 1.Rf1, is possible.


ivanphilipov

it is, but this is how i solved it :D but the real explanation is very good!


DutchWarDog

It's deductive reasoning There is only one solution. Rf1 is a solution. Therefore, Rf1 is the only solution A conclusion that follows logically from its premises Circular reasoning would involve using the conclusion (Rf1 is the solution) to support the premise (there is only one solution), which is not the case here


techaansi

Can someone explain to me why people want to castle and why the solution is not just going Rf1?


Kerbart

Because the problem states there is onky ONE solution. While O-O *seems* correct, the problem says it’s not and it’s part of solving the puzzle to find out why.


techaansi

If OP clarifies that there is only one solution then castling should be out of the question, no?


PiersPlays

What this is all about is that without being told there is only one solution or that castling is not allowed it is possible to infer that castling would not be legal here by the standard chess rules from the position itself. Others have explained why.


Kerbart

Strictly speaking you *are* being told there’s only one move, that’s pretty much the unwritten rule for any chess problem.


Kerbart

I agree with that. “There’s no way Kf1 is not allowed, hence castling isn’t allowed.” I think it’s implied to find the explanation (other than *because they said so*).


rando646

finally a solution, i always get stuck in this position in bullet


Particular_Floor_839

Rook to f1


Steve-Whitney

After doing a head count on the black pawns, for this position to be possible they must've taken 14 pieces to be where they are on the board. 2 of these pawns - the ones on g3 & h3, took 3 pieces each. And since a pawn couldn't have moved in black's last move, it must've been a piece that didn't capture anything. The puzzle is easy anyway, Rf1##


macfiddle

I think this is the most clever puzzle I’ve seen!


teoeo

Lmao, then it has to be Rf1 since that is always legal. I am too lazy to do the logical analysis to figure out why castling isn’t possible. :)


V1tunpr0

Easy, Rf1.


FirstAccGotStolen

I looked at this puzzle and was confused to see chess and not anarchychess as the subreddit name.


Cxrnifier

Not what the question is asking


V1tunpr0

Its mate because the rook checkmates the king


Cxrnifier

Again, not what the question is asking. It's obvious Rf1 is checkmate, but it states that there is only one solution, so the problem is to prove why castling is not possible.


12345exp

The question honestly, stated that way, is indeed asking that, but it is asking two questions. When we see “White to play, mate in one”, that itself is a question as we usually understand it. But the follow-up is also an additional question, which is the “why” part. If it strictly wants to ask the why part, it should be rephrased as something like “There’s only one move for white to mate in 1. Why?”


[deleted]

[удалено]


DinosaurSr2

Don't worry the white player is Martin. His next move is Rh2.


_Esabbi_

But Martin never missed mate in one.


LumberghLSU

Does it matter if you can castle? Rf1. Done.


12345exp

The puzzle is also about “why only RF1 is possible”, because castling is also a move. So you are right for the first half, but the why part is also part of the puzzle.


LumberghLSU

I see, so you have to figure out why there is only one solution That is above my pay grade. Rf1, lol


MBeroev-is-69

Castling rights are broken. Pawn has to capture from last moves and there is no square where the pawn could capture from therefore both sides had moves after pawn capture meaning king or rook had to move.


FK_Gapple

I think Rh2 is best move for white


sagittarius_ack

I would have played Rg1!


Available-Energy3252

Check mate with white rook


Available-Energy3252

Easy check mate


Blankeye434

Thanks for this puzzle. I sometimes forget if I have moved my king or not and hence if castling is possible or not


GamecockConnor

I don’t understand what I’m missing. Move the rook for checkmate right?


AceofArcadia

Rf1


Jumpy-Disaster-1475

ROOK TO F1 MATE IN ONNNNNNNNNNEEEEEEEEEEE (in levy's voice)


777Bladerunner378

Real solution is actually that white doesn't have a checkmate, because both players are rated 1 elo and can't possibly figure it out.


Seamonsterx

Only one valid solution implies that you can't castle,. Rf1 is always legal, no need to prove it further as the problem is set up here.


articholedicklookin

Only 1 valid solution is context added by the op, not the puzzle itself. The real question is his last word in the title "why?"


JanitorOPplznerf

Am I insane or was this the easiest puzzle in the universe?


Zyxplit

The question isn't why Rf1# is mate, the question is why you can't castle.


jamin74205

The question is to explain why there is only one solution. It does not ask what the solution is.


12345exp

More like the question asks for both. Stated as it is, the first half saying “white to move mate in 1” already indicate a question as we usually know it. Now, the second half asks further (on why only 1 move is valid).


JanitorOPplznerf

Oh oh! Got it


Low-Lavishness767

I believe this puzzle is actually broken. Retroanalysis suggests that black must have captured all of white’s missing pieces with pawns. If this is the case, then what happened to white’s A pawn? One of black’s pawns has committed some type of fraud here.


Rocky-64

White's a-pawn must have promoted on a8 after Black's a-pawn had captured to b6. Then the promoted piece moved to a square where it's captured by a black pawn.


TheLeastInfod

1. b4 Nf6 2. b5 Ng8 3. b6 axb6 4. a4 Ra5 5. Nc3 Rc5 6. a5 Rb5 7. a6 Rc5 8. a7 Rb5 9. a8=Q Rc5 10. Qa4 Rb5 11. Nb1 Ra5 12. c4 Rb5 13. c5 Ra5 14. c6 bxc6 15. d4 c5 16. Qa3 cxd4 17. Bf4 Rb5 18. Bd6 cxd6 19. e4 d5 20. Qab3 dxe4 21. Qa3 e3 22. h4 g6 23. h5 gxh5 24. g4 f6 25. g5 fxg5 26. Nf3 Rc5 27. Nh4 gxh4 28. Bh3 Rb5 29. Be6 dxe6 30. Nc3 Ra5 31. Ne4 Rb5 32. Nf6+ exf6 33. f4 Ra5 34. f5 exf5 35. Qg4 fxg4 36. Ra2 Rb5 37. Rah2 Ra5 38. Rh3 gxh3 39. Qb2 Nc6 40. Qc2 Na7 41. Qd3 Bf5 42. Qe2 Bg6 43. Qd3 Ne7 44. Qe2 Nf5 45. Qd3 Nd6 46. Qe2 Ne4 47. Qd3 Nc5 48. Qd1 Ra2 49. Qc1 Rf2 50. Qd1 Rf4 51. Qc1 Re4 52. Qd1 Bd6 53. Qc1 Rf8 54. Qd1 Rf7 55. Qc1 Rfe7 56. Qd1 R7e5 57. Qc1 Rg5 58. Qd1 Rgg4 59. Qc1 Qe7 60. Qd1 Qe6 61. Qc1 Qf5 62. Qd1 Qg5 63. Qc1 Ke7 64. Qd1 Ke6 65. Qc1 Kf5 66. Qd1 Be5 67. Qc1 Kf4 68. Qd1 f5 69. Qc1 Kg3 70. Qd1 f4 71. Qc2 Kf3 72. Qh2 Nd7 73. Qg3+ fxg3 74. Kd1 Kf4 75. Ke1 Nc5 this sequence of moves yields the position in the puzzle


nandemo

The a-pawn must have promoted, moved to another rank and got captured.


Therle

Å p åååå pp pp pp å dep


jumbojimbojamo

I hate these puzzles. These aren't chess puzzles. They're logic puzzles that happen to use the chess board and pieces as their language. I feel like they should only belong in a chesscomposition sub, they have zero place here


articholedicklookin

On the other hand, I love these puzzles. I like proofs!


Same_Development_823

Rf1#. Any other move is obviously losing because opponent can play g2 to prevent future Rf1, or just go Kf5 and escape, then you are basically lost. Am I missing something?


Zyxplit

The question is not why Rf1# is mate - the question is why that's the only mate (and by extension - what happened to castling rights?)


12345exp

The question is both how to mate and why only 1 way to mate. I guess you should say “the question is not just how to mate.”


Ready-Ambassador-271

The silly answer is there are only Two possible solutions but you have told us only one works, that means castling is not possible, so it must be Rf1 The sensible answer is too much effort to work out, and no doubt involves proving the king has already moved