아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Equal Summed Subsets

시간 제한1초메모리 제한1024 MB

요약
집합 {1, 2, ..., N}을 같은 합을 갖는 두 부분집합으로 나누는 경우의 수를 순서쌍을 구분하지 않고 센다. N은 36 이하이다.
난이도

보통10점 중 6점

유형
동적 계획법, 조합론, 수학
정답자
아직 제출이 없습니다

문제

Given the set of integers {1, 2, 3, ..., N}, determine the total number of ways you can divide the set into two equal-summed subsets A and B of that set. The union of A and B is the set of integers {1,2,...n} and A and B have no integers in common. Do not count answers that are just mirror images of each other, e.g.:

{1, 4} and {2, 3}
      vs.
{2, 3} and {1, 4}

counts as a single solution, not two solutions just because the two sets can be ordered the other way.

입력

A single line with an integer 1 ≤ N ≤ 36 that denotes the size of the set.

출력

A single line with an integer that tells how many pairs of equal summed subsets can be created.

예제1

  1. 예제 1

    입력
    12
    
    예상 출력
    62