| [ Fun ] in KIDS 글 쓴 이(By): mickey (Free S*X) 날 짜 (Date): 1993년11월09일(화) 07시16분25초 KST 제 목(Title): C++로 풀어보는 환상의 퀴즈.. 나두 쨙 #define LIAR 1 #define NOT_LIAR 0 int is_this_sucker_a_liar(int n) /* * REQUIRES n > 0; * ENSURES result is 1 if the n-th f*cker is a liar, otherwise it is 0; */ { int talker[n]; for (int i = 0, talker[0] = LIAR; i < n-1; ) if (talker[i] == LIAR) talker[++i] = NOT_LIAR; else /* i.e., i-th guy is NOT a liar */ talker[++i] = LIAR; return ((talker[n-1] == LIAR) ? 1 : 0); } �- 키즈의 죽돌이(to be ;-) Micky, The Ultimate Angler | WANTED>>>>>> GOOD WOMAN <<<<<<WANTED 5.18 ft, 130 lbs, brown | Able to clean, cook, sew, dig worms and bait: minie or hot babe / | clean fish. Must have boat and motor. mickey@kids _____/\/\/\/\\ | Please send picture of boat and motor. |