2018復旦機試第一題,求衆數(水)

 求衆數。  衆數就是一個序列中出現次數最多的數字。 若是不惟一,則輸出小的那個值。   給定第一個表明有幾個數字。  1<=n<=10^5   每一個數字在 int 範圍內ios 樣例:    輸入,  (第一個表明有幾個數字) 8 10 3 8 8 3 2 2 2spa 輸出   2code #include "stdafx.h" #include <stdio.h> #include <io
相關文章
相關標籤/搜索