Having issues with a particular problem 1762A Divide and Conquer

Правка en1, от sajid_knownas_hawk, 2023-01-21 11:03:05

//codeforces problem link: https://codeforces.net/contest/1762/problem/A Divide and Conquer my alogorithm: We are asked to find least amount steps that is required to make an array good(sum is even). I took the lowset number in the array and tried to divide it by 2(according to question) and then do the sum again until we find the sum as an even number. Thus we will get the least required steps.

Here's my my submission in C I have provided adequate notes to help understand my code and variables. ] I would be grateful if someone help me understand this problem. Thank you.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский sajid_knownas_hawk 2023-01-21 11:07:49 156
en1 Английский sajid_knownas_hawk 2023-01-21 11:03:05 720 Initial revision (published)