show that among any group of five (not necessary consecutive
) integers, there are two with the same remainder when
divided by 4.
Answer / lalala
generalized pigeon principle: If N objects are placed into k
boxes, then there is at least one box containing at least (ceiling) N/k objects.
let k = 4 ;
find N:
N/4 = 2 , N= 5, in order to get the answer 2..
| Is This Answer Correct ? | 17 Yes | 19 No |
What is cloning?
What is a friend function in c++?
Can constructor be private in c++?
Write syntax to define friend functions in C++.
What is the difference between reference and pointer?
Explain the auto storage classes in c++.
How can you quickly find the number of elements stored in a dynamic array?
Which of the Standard C++ casts can be used to perform a ?safe? downcast: a) reinterpret_cast b) dynamic_cast c) static_cast d) const_cast
How the V-Table mechanism works?
How can we check whether the contents of two structure variables are same or not?
Is c the same as c++?
why all c++ program must have default constructor?