POJ 3126-Prime Path(BFS+筛素数)
Prime Path Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 38194 Accepted: 20384 Description The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices. — It is a matter of security to change such things every now and then, to keep the enemy in the dark. — But look, I have chosen my number 1033 for good reasons. I am the Prime minister, you know! — I know, so therefore your new number 8179 is also a prime. You will just have to paste four new digits over the four old