Codeforces 1355 D. Game With Array_子序列

题意:

让你构造一个长度为 Codeforces 1355 D. Game With Array_子序列_02 的序列,并且 Codeforces 1355 D. Game With Array_子序列_02 个数的和为 Codeforces 1355 D. Game With Array_数组_04,问能不能找到一个 Codeforces 1355 D. Game With Array_数组_05 的数 Codeforces 1355 D. Game With Array_数组_06,使得数组里找不出一个子序列的和为 Codeforces 1355 D. Game With Array_数组_06 或者 Codeforces 1355 D. Game With Array_数组_08

Codeforces 1355 D. Game With Array_子序列_09,然后数组只要不出现 Codeforces 1355 D. Game With Array_数组_10Codeforces 1355 D. Game With Array_数组_11 就好了,只要 Codeforces 1355 D. Game With Array_数组_12,也就是由 Codeforces 1355 D. Game With Array_数组_11Codeforces 1355 D. Game With Array_数组_14 和一个 Codeforces 1355 D. Game With Array_子序列_15

AC代码:

int n, s, k;

int main()
{
int t;
sdd(n, s);
if (s < n * 2)
puts("No");
else
{
puts("YES");
rep(i, 1, n - 1)
printf("2 ");
pd(s - 2 * (n - 1));
puts("1");
}

return 0;
}