Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two Sets #138

Closed
suryaprakashpandey opened this issue Oct 2, 2023 · 5 comments
Closed

Two Sets #138

suryaprakashpandey opened this issue Oct 2, 2023 · 5 comments

Comments

@suryaprakashpandey
Copy link
Collaborator

Write code in the preferred language and attach output with it.

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.

Example 1

Input: 7
Output:
YES
4
1 2 4 7
3
3 5 6

Example 2

Input: 6
Output:
NO

@maskboyAvi
Copy link

@suryaprakashpandey I would like to work on this issue. Please assign it to me.

@DhritiSoni4
Copy link

I would like to contribute. Please assign.

vaishnavim141003 added a commit to vaishnavim141003/Competitive-Programming-2023-GDSC-CUMMINS-X-GDSC-MMCOE that referenced this issue Oct 14, 2023
@vaishnavim141003
Copy link

two sets #138 solved .. Create two sets #138

vaishnavim141003 added a commit to vaishnavim141003/Competitive-Programming-2023-GDSC-CUMMINS-X-GDSC-MMCOE that referenced this issue Oct 14, 2023
@vaishnavim141003
Copy link

Vaishnavi Mahajan-Cummins college of engineering.
I would like to work on this issue.
So please assign this issue(#138) to me.

vaishnavim141003 added a commit to vaishnavim141003/Competitive-Programming-2023-GDSC-CUMMINS-X-GDSC-MMCOE that referenced this issue Oct 22, 2023
@Eesha04
Copy link
Contributor

Eesha04 commented Oct 25, 2023

Eesha Satvalekar - Cummins College
email: eesha.satvalekar@cumminscollege.in
I would like to work on this issue.
Please assign this (#138) issue to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants