Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    I have the same question:

    	std::cout << firstNSmallest(vector<int>{2, -10, -9, 10, 2, 2, -4, 0, 8, -4, 10, 8, -10, 3, 5, 10, -2, -7, 7, -7, -7, -2, 6, 2, 0, -2, 1, -7, -4, 10, 0, -2, 0, -2, 6, -8, -8, 7, 4}, 38);
    	// my answer:
    	//[ 2, -10, -9, 10, 2, 2, -4, 0, 8, -4, 10, 8, -10, 3, 5,     -2, -7, 7, -7, -7, -2, 6, 2, 0, -2, 1, -7, -4, 10, 0, -2, 0, -2, 6, -8, -8, 7, 4 ]
    	//got
    	//[ 2, -10, -9, 10, 2, 2, -4, 0, 8, -4, 	8, -10, 3, 5, 10, -2, -7, 7, -7, -7, -2, 6, 2, 0, -2, 1, -7, -4, 10, 0, -2, 0, -2, 6, -8, -8, 7, 4 ]
    	//Expected:
    	//[ 2, -10, -9, 10, 2, 2, -4, 0, 8, -4, 10, 8, -10, 3, 5, 10, -2, -7, 7, -7, -7, -2, 6, 2, 0, -2, 1, -7, -4,     0, -2, 0, -2, 6, -8, -8, 7, 4 ]
    	std::cout << firstNSmallest(vector<int>{1, 4, -6, -9, -6, -9, -8, 2, -2, -8, -8, -9, -10, 8, 10, -6, 3, 10, 4, 2, 6}, 8);
    	//Expected:
    	//	[-6, -9, -9, -8, -8, -8, -9, -10]
    	//got
    	//	[-9, -9, -8, -8, -8, -9, -10, -6]
    	//my answer
    	//	[-6, -9, -9, -8, -8, -8, -9, -10]
    

    can anyone help?

  • Custom User Avatar

    Sorry, I should read the problem description more carefully。=_=||

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    any tip please..

  • Custom User Avatar

    The default-constructed std::istream_iterator is known as the end-of-stream iterator. When a valid std::istream_iterator reaches the end of the underlying stream, it becomes equal to the end-of-stream iterator.
    do you mean that?
    thanks for reply.

  • Custom User Avatar

    Can you explain the parameter "std::istream_iterator()
    "What does it mean, I can't find a suitable description in cppref

  • Custom User Avatar

    Expected '#("Robin" "Singh"), but instead got '("Robin" "Singh")
    what # mean? I has forget about racket,can someone help?
    how can I return a form like '#("Robin" "Singh")?

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution