1 条题解

  • -1
    @ 2024-12-8 16:03:46
    #include<bits/stdc++.h>
    using namespace std;
    int main() {
        std::vector<double> scores(3);
        
        for (int i = 0; i < 3; ++i) {
            int year;
            double chinese_score, math_score, english_score;
            
            std::cin >> year >> chinese_score >> math_score >> english_score;
            scores[i] = chinese_score + math_score + english_score; 
        }
    
        double max_score = scores[0], min_score = scores[0];
        for (const auto& score : scores) {
            if (score > max_score) max_score = score;
            if (score < min_score) min_score = score;
        }
        std::cout << static_cast<int>(std::round(max_score)) << " " 
                  << static_cast<int>(std::round(min_score)) << std::endl;
    
        return 0;
    }
    
    • 1

    信息

    ID
    95
    时间
    1000ms
    内存
    256MiB
    难度
    4
    标签
    递交数
    124
    已通过
    55
    上传者