In reality I would make one pass with a copy, but I would not fill it with twos beforehand, but only the middle (remainder), when the pass is already completed
This gives us N read operations, N write operations and 1 memory allocation operation. I can hardly think of anything less))
ps more N increment counter operations)))
I think it would be faster in two passes. Not one if!
Black surrendered, but what was White's last move?
So, we have defined, that the last move of White was obviously transformation of a pawn into a piece, i.e. before this move White had a pawn on one of the squares a7 or b7. It is not difficult to calculate that in both cases this pawn (it could originally be only on square f2) makes exactly 5 captures during the game. Further, note that the pawns standing on squares a3,b4,c5 also had 5 captures in total. Total, we have 10 captures of black pieces. Black has 6 pieces on the board now, therefore, all 10 of the above mentioned captures were done by white pawns.
However, on the board f8 there is no black bishop which, given the black pawns on e7 and g7, could not be taken by a white pawn and also could not leave his square. Consequently, the black bishop was not taken by a pawn, but by a piece. Thus we have arrived at a contradiction, from which the answer follows: this position is impossible and could not arise according to the rules of chess.
is if the pawn turned into a bishop... but since that was impossible - you proved it... so the last move is not a pawn... but with white's king... and probably with F3-G3
Aleksander: is if the pawn turned into a bishop... but since that was impossible - you proved it... so the last move is not a pawn... but with white's king... and probably with F3-G3
This is also impossible: on f3 the king was checkmated by the queen and rook, and there could be no opening check, because the queen and rook attack via different squares.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
the elephant made into a pawn?
In reality I would make one pass with a copy, but I would not fill it with twos beforehand, but only the middle (remainder), when the pass is already completed
This gives us N read operations, N write operations and 1 memory allocation operation. I can hardly think of anything less))
ps more N increment counter operations)))
I think it would be faster in two passes. Not one if!
This is the only move in which the previous position is not impossible
Not the only one. I see three variants:
- bishop from pawn vertically (pawn ate nothing during the transformation)
- bishop on the diagonal (pawn ate something on the 8th horizontal)
- queen from a pawn on the diagonal (also ate something on the 8th).
P.S. And I initially only saw the option with the white king move. But it was pointed out to me that there should have been double check then.
A+B=...
Black surrendered, but what was White's last move?
So, we have defined, that the last move of White was obviously transformation of a pawn into a piece, i.e. before this move White had a pawn on one of the squares a7 or b7. It is not difficult to calculate that in both cases this pawn (it could originally be only on square f2) makes exactly 5 captures during the game. Further, note that the pawns standing on squares a3,b4,c5 also had 5 captures in total. Total, we have 10 captures of black pieces. Black has 6 pieces on the board now, therefore, all 10 of the above mentioned captures were done by white pawns.
However, on the board f8 there is no black bishop which, given the black pawns on e7 and g7, could not be taken by a white pawn and also could not leave his square. Consequently, the black bishop was not taken by a pawn, but by a piece. Thus we have arrived at a contradiction, from which the answer follows: this position is impossible and could not arise according to the rules of chess.
Not the only one. I see three possibilities:
- bishop from pawn vertically (pawn ate nothing during the transformation)
- bishop on the diagonal (pawn ate something on the 8th horizontal)
- queen from a pawn on the diagonal (also ate something on the 8th).
P.S. And I initially only saw the option with the white king move. But it was pointed out to me that there should have been double check then.
is if the pawn turned into a bishop... but since that was impossible - you proved it... so the last move is not a pawn... but with white's king... and probably with F3-G3
So, we have determined that white's last move was clearly the transformation of a pawn into a piece,
The premise is wrong ;)
There are really not enough pawns for transformation
the only correct option
the only correct option