[Leet] - 1672. Richest Customer Wealth [배열] - c++

ha·2022년 1월 31일
0

LeetCode

목록 보기
11/21

https://leetcode.com/problems/richest-customer-wealth/

C++풀이

class Solution {
public:
    int maximumWealth(vector<vector<int>>& accounts) {
        int answer=0;
        for(auto a : accounts){
            int tmp=0;
            for(auto b: a){
                tmp+=b;
            }
            if(tmp>answer) answer=tmp;
        }
        return answer;
    }
};

0개의 댓글