Test instructions: Last time, you managed to get rid of the FFF mechanic. However, you have wasted quite a lot of time. The FFF Regiment has surrounded you and gradually
Approaching your location. In the face of such a crisis, you can not help but pessimistic thought: "This ACM road will be interrupted?" Though it's only a few days to walk on this road, good
You've helped a lot of creatures out of trouble, too. How to be a good person ... Wait, you turned over the parcel, took out a rather old brass bottle, with tin on the bottle
Wrappers, this bottle is the last time the frog sent, it said the crisis, open the bottle can be the rescue. "The Bottle of Satan!" And, behold, just taking out the bottle, I heard little a
The cry of surprise, "it may help us out of trouble, but I'm afraid there will be some danger." ”
"Don't worry so much, what do you do?" "You asked quickly," open the bottle on the line. "Although this method sounds familiar, in the present situation, a dead horse
Make a living horse doctor. You uncover the tin foil at the bottle. A gust of green smoke from out, into a horrible goblin staring at you.
You: "..."
Devil: "As long as you and I game three innings, you win, then I will meet your one wish, otherwise, you just lose a sentence." Hum. ”
You didn't have time to spit this ESU bridge section, then agreed to the Devil's request. In the first inning, the devil turned out two piles of stones, and he gave the number of stones, and you chose to have the hand to see
Who is the last one who can no longer take the stone?
Problem Analysis: Witzov game problem, as long as the judge is currently in the p situation, or n the situation can be, the current p is the current failure, vice versa.
1#include"stdio.h"2#include"Cmath"3 #defineGOLD ((sqrt (5.0) + 1)/2)4 intMain ()5 {6 intn,m,s;7 while(SCANF ("%d%d", &n,&m)! =EOF)8 {9s = std::abs (M-n);Ten if(n = =int(S*gold) | | m = =int(s*GOLD)) Oneprintf ("0\n"); A Else -printf ("1\n"); - } the return 0; -}
View Code
Summer Camp (4) ——— combo of the six rounds (poj1067)