Skip to content

yadav26/GoogleCodeJam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C++, C# Solution for Problems posted by GOOGLE CODE JAM

Round 1B 2010 File Fix-it

  1. Problem Description https://code.google.com/codejam/contest/635101/dashboard

mkdir /home mkdir /home/gcj mkdir /home/gcj/finals mkdir /home/gcj/quals Given the full set of directories already existing on your computer, and a set of new directories you want to create if they do not already exist, how many mkdir commands do you need to use? SOLUTION : Code_Google_FileFix_it

Round 1B 2010 Problem C. Your Rank is Pure https://code.google.com/codejam/contest/635101/dashboard#s=p2&a=2

The game can be played on any subset S of positive integers. A number in S is considered pure with respect to S if, starting from it, you can continue taking its rank in S, and get a number that is also in S, until in finite steps you hit the number 1, which is not in S. When n is given, in how many ways you can pick S, a subset of {2, 3, ..., n}, so that n is pure, with respect to S? The answer might be a big number, you need to output it modulo 100003. SOLUTION : PurePrime

Round 1A 2017 Problem A. CakeInitials - https://code.google.com/codejam/contest/5304486/dashboard

You are catering a party for some children, and you are serving them a cake in the shape of a grid with R rows and C columns. Your assistant has started to decorate the cake by writing every child's initial in icing on exactly one cell of the cake. Each cell contains at most one initial, and since no two children share the same initial, no initial appears more than once on the cake.

Each child wants a single rectangular (grid-aligned) piece of cake that has their initial and no other child's initial(s). Can you find a way to assign every blank cell of the cake to one child, such that this goal is accomplished? It is guaranteed that this is always possible. There is no need to split the cake evenly among the children, and one or more of them may even get a 1-by-1 piece; this will be a valuable life lesson about unfairness. SOLUTION : CakeInitials

Qualification Round 2017 https://code.google.com/codejam/contest/3264486/dashboard#s=p1

Tatiana likes to keep things tidy. Her toys are sorted from smallest to largest, her pencils are sorted from shortest to longest and her computers from oldest to newest. One day, when practicing her counting skills, she noticed that some integers, when written in base 10 with no leading zeroes, have their digits sorted in non-decreasing order. Some examples of this are 8, 123, 555, and 224488. She decided to call these numbers tidy. Numbers that do not have this property, like 20, 321, 495 and 999990, are not tidy.

She just finished counting all positive integers in ascending order from 1 to N. What was the last tidy number she counted?

SOLUTION with input and output file posted/uploaded

Thanks Anshul Yadav

Releases

No releases published

Packages

No packages published