ACM训练2068: [STL训练]Ignatius and the Princess IV题解 (feng5166says.)

云中君 算法基础篇 40 0
不断提升技能,才能在职场中立于不败之地!全网最全C++题库,助您成为编程领域的佼佼者。
"OK, you are not too bad, em... But you can never pass the next. test." feng5166 says."I will tell you an odd number N, and then N integers. There will bea special integer among them, you have to tell me which integer isthe special one after I tell you all the integers." feng5166 says."But what is the characteristic of the special integer?"The integer will appear at least (N+1)/2 times. If you can't findthe right integer, I will kill the Princess, and you will be mydinner, too. Hahahaha....." feng5166 says.Can you find the special integer for Ignatius?

"OK, you are not too bad, em... But you can never pass the next  test." feng5166 says."I will tell you an odd number N, and then N integers. There will be a special integer among them, you have to tell me which integer is the special one after I tell you all the integers." feng5166 says."But what is the characteristic of the special integer?" Ignatius asks.         "The integer will appear at least (N+1)/2 times. If you can't find the right integer, I will kill the Princess, and you will be my dinner, too. Hahahaha....." feng5166 says. Can you find the special integer for Ignatius?

ACM训练2068: [STL训练]Ignatius and the Princess IV题解
(feng5166says.)-第1张图片-东莞河马信息技术
(图片来源网络,侵删)

标签: ACM训练2068: [STL训练]Ignatius and the Princess IV题解