ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1967. Programmer Casino

is this algo correct??
Posted by Shen Yang 16 Nov 2017 07:09
initially  let result sequence to be 10*  10* 10*   0* means zero or more zeroes.

every time choose two number and if we merge them produce a smaller number then we merge them.

the procedure stops until we can't merge to get a smaller number

is it correct?? seems to be..

Edited by author 16.11.2017 07:10
Re: is this algo correct??
Posted by Shen Yang 16 Nov 2017 08:31
we should modify this algo:   every time choose right most two number that we merge them can

get a smaller number then we merge them,....

we must merge numbers from right to left.... seems to be more correct
Re: is this algo correct??
Posted by Shen Yang 16 Nov 2017 11:21
AC  with long double