Problem Solving/백준

나는 요리사

높은곳에영광 2022. 1. 16. 23:43

#include <bits/stdc++.h>
using namespace std;

int main() {
    vector<int> chef(5);
    int temp;
    for(int i = 0; i < 5; i++) {
        for(int j = 0; j < 4; j++) {
            cin >> temp;
            chef[i] += temp;
        }
    }
    cout << distance(chef.begin(),max_element(chef.begin(),chef.end()))+1 << "\n" << *max_element(chef.begin(),chef.end());
}