Tips : implemented with ring listFor this topic is actually uses the C language circular link list realization one Joseph Ring. We can define a circular linked list, add this n person to the list, and then define three node pointers on the list of
int n = 17;boolean[] persons = new Boolean[n];Initializationfor (int i=0;iPersons[i] = true;}int len = persons.length;//The remainder of the numberint count = 0;while (len>1) {Continue to count.for (int i=0;iif (Persons[i]) {count++;if (count = = 3)
* * Copyright (c) 2012, Computer College of Yantai University
* All rights reserved.
* Author: Liu Tongbin
* Date of Completion: December 05, 2012
* Version number: v1.0
* *
Input Description:
*
Question: There are n people in a circle with sequential troubleshooting. When the first person reports the number (from 1 to 3), the person who reports the number 3 leaves the circle and asks the last person who left the first number?
1 package com.
Http://www.importnew.com/13246.html
Home
All articles
Information
Web
Architecture
Basic technology
Books
Tutorial
I want to contribute
More channels»
-nav Bar- Home all posts information web schema Basic technology
1-9 These 9 numbers are divided into three 3-digit numbers, the first of which is the second to third twice times, and 3 times times void Mygetthreenum () { int j,k; int arr[10],sum; for (int i = 123; I * 3 Copyright NOTICE: This
1, there are n people around in a circle, sequential numbering, from the first person began to count, where 3 of the people out of the circle, write procedures, ask the last left is the original number of the person.
#include #include typedef
"Dawson One, life two, two born three, Sansheng everything." "--Laozi's Sutra of Morals"
is 3 just a number?
3 can also represent more!?
The number 3 is driving the development of photography, design, architecture and natural law?
Let's look at
Show Author: Dodo 2005-5-17 14:39:50
Author: Dodo [website refactoring] One of the translators, the original text here: http://www.donews.net/dodo/archive/2005/05/16/382248.aspx, need to reprint the first contact author.
This idea comes from
1. Keep your PromiseSome time ago agreed to cousin, to his other useless laptop lent to her, used to do graduation design, probably to borrow 4 months. According to the previous plan and the consideration at that time, no problem at all. The
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.