10819

·Algorithm (PS)
permutations 를 써서 가능한 순열 조합들을 모두 확인해 보는 방법으로 풀었다. https://www.acmicpc.net/problem/10819 10819번: 차이를 최대로 첫째 줄에 N (3 ≤ N ≤ 8)이 주어진다. 둘째 줄에는 배열 A에 들어있는 정수가 주어진다. 배열에 들어있는 정수는 -100보다 크거나 같고, 100보다 작거나 같다. www.acmicpc.net # 10819 차이를 최대로 from itertools import permutations n = int(input()) array = list(map(int, input().split())) result = 0 cases = permutations(array, n) for case in cases: temp = 0 for..
minjiwoo
'10819' 태그의 글 목록