Make Unreal REAL.
article thumbnail
Level 0. 특별한 이차원 배열 2

 

 

#include <iostream>
#include <vector>

using namespace std;

int solution(vector<vector<int>> arr)
{
    size_t n = arr.size();

    for (int i = 0; i < n; ++i)
        for (int j = 0; j <= i; ++j)
            if (arr[i][j] != arr[j][i])
                return 0;

    return 1;
}

'자료구조 & 알고리즘 > 프로그래머스' 카테고리의 다른 글

Level 0. 수열과 구간 쿼리 3  (0) 2023.06.27
Level 2. 다리를 지나는 트럭  (0) 2023.06.26
Level 0. 수 조작하기 2  (0) 2023.06.24
Level 0. 가까운 1 찾기  (0) 2023.06.23
Level 2. 2 x n 타일링  (0) 2023.06.22
profile

Make Unreal REAL.

@diesuki4

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!

검색 태그