Need help in CSES Two Sets

Правка en1, от pop1912, 2021-01-18 14:09:52

Hi, Can you help me in this CSES Two Sets problem?.

Statement:

Your task is to divide the numbers 1,2,…,n into two sets of equal sum.

Input

The only input line contains an integer n.

Output

Print "YES", if the division is possible, and "NO" otherwise.

After this, if the division is possible, print an example of how to create the sets. First, print the number of elements in the first set followed by the elements themselves in a separate line, and then, print the second set in a similar way.

Constraints 1≤n≤106

Теги #cses

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский pop1912 2021-01-18 14:09:52 609 Initial revision (published)