Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
Tags
- DBMS 구성요소
- 니가 참 좋아
- 아이유
- 기타
- 오라클
- 레이디스코드
- I'm fine thank you
- IT
- 개발자
- 천공의 시간
- 인덱스
- 슬픔의 후에
- DBMS
- db
- nginx
- 스위트라떼
- 말 더듬
- 오라클 아키텍처
- index
- 러블리즈
- 6학년 8반 1분단
- SQL 처리
- 장범준
- 봄 사랑 벚꽃 말고
- 신입
- 핑거스타일
- 악보
- 데이터베이스
- Inside Of Me
- oracle
Archives
취미로 음악을 하는 개발자
[C++] 백준 10971. 외판원 순회 2 본문
728x90
#include <iostream >
#include <vector>
#include <algorithm>
int travelCnt(int* arr, int col){ // 비용 계산
}
}
do{ // 모든 경로의 경우의 수에 다시 처음 지점으로 되돌아 오는 도시를 추가한 순열
}
index++;
} while ( next_permutation( v. begin( ), v. end( )));
}
sum += travelCnt(W[arr[i][j]], arr[i][j+1]);
else { // 경로 중에 0이 있으면 갈 수 없다!
isZero = true;
break;
}
}
if (isZero) {
sum = 0;
isZero = false;
continue;
}
else {
cost[i] = sum;
if (min > sum)
min = sum;
}
sum = 0;
}
cout << min << endl;
}
'공대인 > Nojam' 카테고리의 다른 글
[C++] 백준 11653. 소인수분해 (0) | 2019.04.23 |
---|---|
[C++] 백준 1934. 최소공배수 (0) | 2019.04.23 |
[C++] 백준 11022. A+B -8 (0) | 2019.04.17 |
[C++] 백준 11021. A+B -7 (0) | 2019.04.17 |
[C++] 백준 2163. 초콜릿 자르기 (0) | 2019.04.17 |
Comments