CodeChef Logo CodeChef Logo
Learn Practice Compete
Upgrade to Pro
Learn Practice Compete
Home » Wiki » March 2012 Cook-off Problem Editorials

March 2012 Cook-off Problem Editorials

Problem Setter for the contest was Hiroto Sekido.

Problem Tester for the contest was Rajiv Kumar Aggarwal.

----------------------------------------------------------

CIELGAME : Ciel and Genjiko

Editorial

----------------------------------------------------------

CIELLAND : Ciel and a new island

Editorial

----------------------------------------------------------

CIELNUM1 : Ciel Numbers I

Editorial

----------------------------------------------------------

CIELNUM2 : Ciel Numbers II

Editorial

----------------------------------------------------------

CIELWEB : Ciel and Communications System

Editorial

----------------------------------------------------------

Ok then what's this??

2★coder_c @ 19 Mar 2012 03:05 PM
Ok then what's this?? http://www.codechef.com/download/Solutions/COOK20/Setter/CIELNUM2.c

@singh_637 : Please try

1★rajiv_adm @ 19 Mar 2012 11:29 PM
@singh_637 : Please try running your solution on sample test case.

@withoutc: Here I consider a

1★rajiv_adm @ 19 Mar 2012 11:53 PM
@withoutc: Here I consider a base 4 no. I considered decimal representation which contains only one of these 4 digits: 0, 3, 5 and 8. If It contains any other no., then it is not ciel no. I considered 0(base 4) = 0(base 10) 1(base 4) = 3(base 10) 2(base 4) = 5(base 10) 3(base 4) = 8(base 10) If there are zero in between, then it is not ciel no. Now question arise, Why use 0? Why not use base 3? If I would have used base 3 by replacing 3(base 10) = 0(base 3) then then 3, 33, 333, 3333, .... all become 0. This solution could have been further optimized to base 3. But base 4 was good enough to be solved within time limit.

Programming Tools

Online IDE
Upcoming Coding Contests
Host Your Contest
Problem Setting

Learning Resources

Getting Started
Practice Problems
CodeChef Discuss
FAQ's

More

CodeChef For Business
Contact Us
Code Of Conduct
User Ranklist

Usage Policy

Privacy policy
Terms
www.codechef.com
Follow Us

We use cookies to improve your experience and for analytical purposes. Read our Privacy Policy and Terms to know more. You consent to our cookies if you continue to use our website.