Solitaire
71D2200· master1.5s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
4 62S 3S 4S 7S 8S AS5H 6H 7H 5S TC AC8H 9H TH 7C 8C 9C2D 2C 3C 4C 5C 6C
Output
No solution.
Sample 2of 3
Input
4 62S 3S 4S 7S 8S AS5H 6H 7H J1 TC AC8H 9H TH 7C 8C 9C2D 2C 3C 4C 5C 6C
Output
Solution exists.Replace J1 with 2H.Put the first square to (1, 1).Put the second square to (2, 4).
Sample 3of 3
Input
4 62S 3S 4S 7S 8S AS5H 6H 7H QC TC AC8H 9H TH 7C 8C 9C2D 2C 3C 4C 5C 6C
Output
Solution exists.There are no jokers.Put the first square to (1, 1).Put the second square to (2, 4).
58%
71D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)