Label the 50 holes as (1,100), (2,99),...(50,51). Each hole can hold one or two numbers and the number has to match the label. For example, 1 and/or 100 can only go to the 1st hole. Now put the 51 numbers into these holes. There must be one hole to get two numbers. These two numbers will add up to 101.
回复:Set S has 51 positive but <=100 ints, show exists x1+x2=101.
Use PHP.
Label the 50 holes as (1,100), (2,99),...(50,51). Each hole can hold one or two numbers and the number has to match the label. For example, 1 and/or 100 can only go to the 1st hole. Now put the 51 numbers into these holes. There must be one hole to get two numbers. These two numbers will add up to 101.
Label the 50 holes as (1,100), (2,99),...(50,51). Each hole can hold one or two numbers and the number has to match the label. For example, 1 and/or 100 can only go to the 1st hole. Now put the 51 numbers into these holes. There must be one hole to get two numbers. These two numbers will add up to 101.