#40716: 超快超小


seancai78@gmail.com (風月春秋)


不要陣列
輸入比x大加count_r
反之加count_l

隨時記錄最大/最小位置

最後比較count_l和count_r
決定採用最大或最小位置

scanf("%d",&input);
        if(input>x)
        {
            count_r++;
            if(max < input)
                max = input;
        }
        else
        {
            count_l++;
            if(min > input)
                min = input;
        }