Equal Beauty CodeChef SnackDown 2021 Round 1A Question The beauty of an (non-empty) array of integers is defined as the difference between its largest and smallest element. For example, the beauty of the array [2,3,4,4,6] is 6−2=4. An array A is said to be good if it is possible to partition the elements of A into two non-empty arrays B1 and B2 such that B1 and B2 have the same beauty. Each element of array A should be in exactly one array: either in B1 or in B2. For example, the array [6,2,4,4,4] is good because its elements can be partitioned into two arrays B1=[6,4,4] and B2=[2,4], where both B1 and B2 have the same beauty (6−4=4−2=2). You are given an array A of length N. In one move you can: Select an index i (1≤i≤N) and either increase Ai by 1 or decrease Ai by 1. Find the minimum number of moves required to make the array A good. Input Format The first line of input contains a single integer T, denoting the number of test cases. The description of T test cases follow. Each test
CodeChef SnackDown 2021 is Back
CodeChef is one of the largest online coding platform and SnackDown is one of it's of grandest programs held ever year. SnackDown is a global programming event that invites programmers all over the world to participate in India's most prestigious multi-round programming competition. SnackDown is open to everyone who has a knack in programming.
Generally ever year SnackDown is a team event but due to the pandemic situation, SnackDown this year will be an individual event.
Eligibility
Anyone with a knack of coding can apply just a proper internet connection is requirement.
Registration
Registration have started from 2nd September 2021 and will end on 20th October (00:00 IST)
To register for CodeChef SnackDown 2021 Click Here
Schedule
- First Online Qualifier Round: October 15th - 19th
- Online Qualifier Round 1A will be held between 21st - 23rd October
- Online Qualifier Round 1B will be held between 29th - 31st October
- Online Pre-elimination on 21st November
- Online Elimination on 5th December
- Online Finale Round will be held on 9th January 2022.
Prizes
Global Prizes:
- 1st - $10,000
- 2nd - $7,500
- 3rd - $5,000
- 4th to 25th- $500
Indian Prizes:
- 1st - $2000
- 2nd - $1000
- 3rd to 10th - $250
Other Categories:
- 1st Global School Student - $500
- 2nd Global School Student - $250
- 1st Global Female - $500
- 2nd Global Female - $250
- Top Indian School Contestant - $250
- Top Indian Female - $250
Note: At least 2 questions must be solved in Final Round to Claim Prizes.
CodeChef has also launched referral program. You must register and refer to your friends to get goodies from CodeChef. To become a SnackDown Representative Click Here
Thus Register Now to become a part of this epic battle.
Comments
Post a Comment