diff --git a/quiz4/quiz4.cpp b/quiz4/quiz4.cpp index af1dddf..db0e15a 100644 --- a/quiz4/quiz4.cpp +++ b/quiz4/quiz4.cpp @@ -50,16 +50,18 @@ int main () { } node* first = new node; - (*first).id = 0; + (*first).id = 1; (*first).prev = first; (*first).next = first; int count = 1; + std::cout << "招募了小人 #" << 1 << " ." << std::endl; for (int i = 2; i <= n; i++) { node* curr = new node; (*curr).id = i; insert_one(first, curr); count++; + std::cout << "招募了小人 #" << 1 << " , 它前面是 #" << (*(*curr).prev).id << " , 它后面是 #" << (*(*curr).next).id << std::endl; } int counting = 0; @@ -68,7 +70,7 @@ int main () { node* current = next_one; next_one = (*next_one).next; counting++; - std::cout << "小人 #" << (*current).id << "数到了" << counting; + std::cout << "小人 #" << (*current).id << " 数到了" << counting; if (counting == 3) { remove_one(current); counting = 0;