B — Find The Array

Правка en2, от avi_9314, 2020-12-18 09:10:18

here are some solutions to the problem B of yesterday educational round

approach 1 : find the nearest power of 2

simple implementation : 101610177

using builtin function : 101611194

101612253

using log function : 101611253

approach 2: alternate 1 at even and odd position ( rest elements = a[i]) and compute the sum 2* | a[i] -b[i]| for two different array and print the one with less sum

simple implementation : 101610719

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en4 Английский avi_9314 2020-12-18 09:12:39 4 Tiny change: 'ion:101612253]\n\n \n ' -> 'ion:101612390]\n\n \n '
en3 Английский avi_9314 2020-12-18 09:10:48 7 Tiny change: '101611194]\n \n [submissi' -> '101611194] [submissi'
en2 Английский avi_9314 2020-12-18 09:10:18 32 Tiny change: '1611194]\n\n \n ' -> '1611194]\n \n [submission:101612253]\n\n \n '
en1 Английский avi_9314 2020-12-18 09:07:21 548 Initial revision (published)