KPart

아직 제출이 없습니다시간 제한2초메모리 제한1024 MB

문제

Virgil has just set out to study the properties of arrays. Thus, he defines a KK-array as any array AA of positive integers such that all length KK continuous subsequences of AA can be partitioned into two disjoint, potentially not continuous subsequences having equal sum. For example 11, 22, 11, 33 is a 33-array, since 11, 22, 11 can be partitioned into 11, 11 and 22 which both have sum 22, and 22, 11, 33 can be partitioned into 22, 11 and 33 which both have sum 33. It is not a 22-array, since 11, 22 cannot be partitioned into two potentially not continuous subsequences with equal sum. Likewise it is not a 44-array.

You are given TT arrays of positive integers. For each array AA Virgil wants to know all the values of KK for which AA is a KK-array.

입력

The first line contains the integer TT. The TT arrays follow. Each array is represented by two lines. The first line contains NN, the length of the array. The second contains the elements of the array, separated by a single space.

출력

Output the answers for each array AA in order. For each array output only one line containing first the number of values of KK for which the given array is a KK-array, and then those values of KK for which the array is a KK-array, in increasing order.

제한

  • 1T201 ≤ T ≤ 20.
  • Let A\sum{A} represent the sum of the values in any one array (not the sum of the values in all of the arrays). Then 1A100,0001 ≤ \sum{A} ≤ 100\\,000.

힌트

The first array, the one of length 77, is a 44-array and 66-array, since each continuous subsequence of length 44 and 66, respectively, can be partitioned into two potentially not continuous subsequences with equal sum.

The second array, the one of length 66, is 33-array and 66-array, since each continuous subsequence of length 33 and the of length 66 can be partitioned into two potentially not continuous subsequences with equal sum.