Canadian Computing Competition
(Last modified
Monday February 15, 2016)
All of these are of course
UNOFFICIAL :-). The official website is
CCC.
The following people have contributed solutions
(thank you!): Quick links to the years:
|
Links and Resources Books (pdf)
Websites
|
2020 Problems | Junior Problems | Senior Problems | Solutions and Data Sets |
2019 Problems | Junior Problems | Senior Problems | Solutions and Data Sets |
2018 Problems | Junior Problems | Senior Problems | Solutions and Data Sets |
2017 Problems | Junior Problems | Senior Problems | Solutions and Data Sets |
2016 Problems | Junior Problems | Senior Problems | Solutions and Data Sets |
2015 Problems | Topics Involved | Rating | Input Files | Output files |
Junior Problems | ||||
J1: Special Day | simple if | * | 1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 |
J2: Happy or Sad | Strings and counting | * | 1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 |
J3: Rovarspraket | String processing | ** | 1 2 3 4 5 | 1 2 3 4 5 |
J4: Wait Time | Array of records and sorting | ** | 1 2 3 | 1 2 3 |
J5: Pi-Day | recursion | *** | 1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 |
Senior Problems | ||||
S1: Zero That Out | Stacks | ** | 1 2 3 4 5 | 1 2 3 4 5 |
S2: Jerseys | Arrays | ** | 1 2 3 4 5 6 | 1 2 3 4 5 6 |
S3: Gates Clever counting (ML2) Disjoint-set (WZ) |
Lists and clever counting Lists and a disjoint-set data structure |
*** ***** |
1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 |
S4: Convex Hull Shortest Path Faster Algorithm (CL) Dijkstra's Algorithm (DW) |
Lists and a SPFA (Shortest Path Faster Algorithm) Lists and Dijkstra's algorithm |
***** | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
S5: Greedy For Pies (DW) | Lists, Dynamic Programming, complex algorithms | ***** | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
2013 Problems | Topics Involved | Rating | Input Files | Output files |
Junior Problems | ||||
J1: Next in Line | simple calculation | * | 1 2 3 4 5 | 1 2 3 4 5 |
J2: Rotating Letters | simple string processing | * | 1-1 1-2 2-1 2-2 3-1 3-2 4-1 4-2 5-1 5-2 | 1-1 1-2 2-1 2-2 3-1 3-2 4-1 4-2 5-1 5-2 |
J3: From 1987 to 2013 | simple digit processing of a number | * | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
J4: Time on Task | sorting problem of a 1d array | ** | 1 2 3 4 5 | 1 2 3 4 5 |
J5: Chances
of Winning Simpler Version (JC) |
lots of loops and ifs and a string
array simpler version |
*** | 1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 |
Senior Problems | ||||
S1: From 1987 to 2013 | simple digit processing of a number | * | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
S2: Bridge Transport (NB, VW) | simple 1D array processing | ** | 1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 2 3 4 5 6 7 8 9 10 11 12 13 |
S3: Chances of Winning Brute force Approach Recursive Version (KK) Simpler Version (JC) |
lots of loops and ifs and a string array a recursive version simpler iterative version |
*** | 1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 |
S4: Who is Taller? | Graph theory and Breadth First Search | **** | 1-1
1-2 1-3
1-4 1-5
2-1
2-2 2-3
2-4 2-5 3-1 3-2 3-3 3-4 3-5 4-1 4-2 4-3 4-4 4-5 5-1 5-2 5-3 5-4 5-5 6-1 6-2 6-3 6-4 6-5 |
1-1
1-2 1-3
1-4 1-5
2-1
2-2 2-3
2-4 2-5 3-1 3-2 3-3 3-4 3-5 4-1 4-2 4-3 4-4 4-5 5-1 5-2 5-3 5-4 5-5 6-1 6-2 6-3 6-4 6-5 |
S5: Factor Solitaire DP: forward looking Work Backward Super Fast |
Factoring, DP (gets 12/15 points) work backwards, ridiculously simple |
*** ***** |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
2012 Problems | Topics Involved | Rating | Input Files | Output files |
Junior Problems | ||||
J1: Speed fines are not fine! | simple decision | * | 1 2 3 4 5 | 1 2 3 4 5 |
J2: Sounds fishy! | simple decision | * | 1 2 3 4 5 | 1 2 3 4 5 |
J3: Icon Scaling | simple loops | * | 1 2 3 4 5 | 1 2 3 4 5 |
J4: Big Bang Secrets | straight forward character manipulation | ** | 1 2 3 4 5 | 1 2 3 4 5 |
J5: A Coin Game | Breadth First Search of the complete Game Tree |
**** | 1 2 3 4 5 | 1 2 3 4 5 |
Senior Problems | ||||
S1: Don't pass me the ball! (DC) | Do you know the formula for C(n, r)? | ** | 1 2 3 4 5 | 1 2 3 4 5 |
S2: Aromatic Numbers | Roman Numeral like character processing | ** | 1 2 3 4 5 | 1 2 3 4 5 |
S3: Absolutely Acidic | arrays and sorting, nothing too tricky | ** | 1 2 3 4 5 | 1 2 3 4 5 |
S4: A Coin Game(DH, AJ, DC, KL2) | Breadth First Search of
the complete Game Tree. |
***** | 1 2 3 4 5 | 1 2 3 4 5 |
S5: Mouse Journey (KL2) | Simple dynamic programming, 2D array problem. |
*** | 1 2 3 4 5 6 7 | 1 2 3 4 5 6 7 |
2011 Problems | Topics Involved | Rating | Input Files | Output files |
Junior Problems | ||||
J1: Which Alien? | ifs | * | 1 2 3 4 5 | 1 2 3 4 5 |
J2: Who Has Seen the Wind | loop and if | * | 1 2 3 4 5 | 1 2 3 4 5 |
J3: Sumac Sequences | a loop | * | 1 2 3 4 5 | 1 2 3 4 5 |
J4: Boring Business | moving in a 2d array | ** | 1 2 3 4 | 1 2 3 4 |
J5: Unfriend a strange counting method a recursive approach (SF) a more general approach (DC) |
tricky counting and 1D array handling or recursion (SF relies on j<i as given in the problem, DC is more general allowing j>=i) |
*** | 1 2 3 4 5 | 1 2 3 4 5 |
Senior Problems | ||||
S1: English or French? | simple character counting | * | 1 2 3 4 5 | 1 2 3 4 5 |
S2: Multiple Choice | simple array processing | * | 1 2 3 4 5 | 1 2 3 4 5 |
S3: Alice through the Looking Glass | recursion (I won't say simple) | *** | 1 2 3 4 5 | 1 2 3 4 5 |
S4: Blood Distribution | array processing (straight forward: no tricks.) |
** | 1 2 3 4 5 | 1 2 3 4 5 |
S5: Switch my brute force method (solves the test cases but doesn't work in ALL cases) a dynamic programming approach (SF) |
relatively simple String handling or Dynamic programming |
** or **** |
1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 |
2010 Problems | Topics Involved | Rating | Input Files | Output files |
Junior Problems | ||||
J1: What is n, Daddy? | if's or a calculation | * | 1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 |
J2: Up and Down | loops and ifs | ** | 1 2 3 4 5 | 1 2 3 4 5 |
J3: Punchy | loop with ifs | * | 1 2 3 4 5 | 1 2 3 4 5 |
J4: Global Warming | arrays and matching | *** | 1 2 3 4 5 | 1 2 3 4 5 |
J5: Knight Hop Simple Recursion (by PS and WC) Bread First Search |
2D array - simple recursion - queue and BFS |
*** | 1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 |
Senior Problems | ||||
S1: Computer Purchase | calculations and ifs | ** | 1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 |
S2: Huffman Encoding | arrays and string handling | ** | 1 2 3 4 5 6 | 1 2 3 4 5 6 |
S3: Firehose linked list of gaps (by VSi) Binary seaching and arrays A Better Version (by SF) |
arrays and Linked lists or Binary Searching |
***** | 1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 |
S4: Animal Farm | 2D arrays, graph and Prim's algorithm | ***** | 1 2 3 4 5 | 1 2 3 4 5 |
S5: Nutrient Tree (by VL) | Binary Tree, Recursion and Arrays | ***** | 1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 |
2009 Problems | Topics Involved | Rating | Input Files | Output files |
Junior Problems | ||||
J1: ISBN | simple arithmetic | * | 1 2 3 | 1 2 3 |
J2: Old Fishin' Hole | nested for loops | * | 1 2 3 4 5 | 1 2 3 4 5 |
J3: Good Times | calculations and if's | ** | 1 2 3 4 5 | 1 2 3 4 5 |
J4: Signage | string handling, arrays | ** | 1 2 3 4 5 6 | 1 2 3 4 5 6 |
J5: Degrees of Separation | graph theory: 2D arrays | **** | 1 2 3 4 | 1 2 3 4 |
Senior Problems | ||||
S1: Cool numbers Cubes and powers approach Power of 6 method (by MANY people) Power 6 with Insight (by GV) |
tricky loops and calculation | *** | 1 2 3 4 5 | 1 2 3 4 5 |
S2: The Lights Going On and Off | array processing | *** | 1 2 3 4 5 | 1 2 3 4 5 |
S3: Degrees of Separation | graph theory: 2D arrays | **** | 1 2 3 4 | 1 2 3 4 |
S4: Ship and Shop Recursion (in a loop?) Dijkstra's Algorithm (By AJ and WHL) |
graph theory | **** | 1 2 3 4 5 | 1 2 3 4 5 |
S5: Wireless Straight forward Difference Array (by BB, AJ and DG) |
2D array processing | ***** | 1 2 3 4 5 6 | 1 2 3 4 5 6 |
2008 Problems | Topics Involved | Rating | Input Files | Output files |
Junior Problems | ||||
J1 Body mass Index | simple calculation | * | 1 2 3 | 1 2 3 |
J2 Do the Shuffle | simple string handling | * | 1 2 3 4 5 | 1 2 3 4 5 |
J3 GPS Text Entry | ifs and calculations | ** | 1 2 3 4 5 | 1 2 3 4 5 |
J4 From Prefix to Postfix | recursion | *** | 1 | 1 |
J5 Nukit | indirect recursion (see S5 for a DP approach) |
*** | 1 2 3 4 | 1 2 3 4 |
Senior Problems | ||||
S1 It's Cold Here | simple "find smallest" algorithm | * | 1 2 3 | 1 2 3 |
S2 Pennies in the Ring | simple geometry problem | ** | 1 2 3 4 5 | 1 2 3 4 5 |
S3 Maze Recursive DFS approach A better BFS approach (by KL) |
It's a 2D problem for sure - recursion (Depth First Search) - Breadth First Search |
*** | 1 2 3 4 5 | 1 2 3 4 5 |
S4 Twenty-four Brute force Recursion, stacks and RPN (By KL anf HT) |
nested loops and 2d arrays | **** | 1 2 3 4 5 | 1 2 3 4 5 |
S5 Nukit Recursive approach DP approach (by KL, ML and AJ) |
indirect recursion, or DP | **** | 1 2 3 4 | 1 2 3 4 |
2007 Problems | Topics Involved | Rating | Input Files | Output files |
Junior Problems | ||||
J1 Who is in the middle? | simple decisions | * | 1 2 3 4 5 | 1 2 3 4 5 |
J2 I Speak TXTMSG | simple decisions with a loop | * | 1 | 1 |
J3 Deal or No Deal Calculator | simple 1D array processing | * | 1 2 3 4 5 | 1 2 3 4 5 |
J4 Anagram Checker | string processing | ** | 1 2 3 4 5 6 7 | 1 2 3 4 5 6 7 |
J5 Keep on Truckin' Dynamic Programming approach Dynamic Programming V2 (by KL) Recursive approach (by WHL) |
dynamic programming or easier DP or recursion (easiest) |
*** | 1 2 3 4 5 | 1 2 3 4 5 |
Senior Problems | ||||
S1 Federal Voting Age | simple decision | * | 1 2 3 | 1 2 3 |
S2 Boxes | arrays, records and sorting | *** | 1 2 3 4 5 | 1 2 3 4 5 |
S3 Friends (by AV) | arrays and more arrays :-) | *** | 1 2 3 4 | 1 2 3 4 |
S4 Water park Linked List Approach Recursive Approach (by ML) |
linked lists and dynamic programming or easier recursion |
**** | 1 2 3 4 5 | 1 2 3 4 5 |
S5 Bowling for Numbers (by KL) | 2D Dynamic Programming | ***** | 1 2 3 4 5 | 1 2 3 4 5 |
2006 Problems | Topics Involved | Rating | Input Files | Output files |
Junior Problems | ||||
J1 Canadian Calorie Counting | simple decisions | * | 1 2 3 4 5 | 1 2 3 4 5 |
J2 Roll the Dice | loops and counting | * | 1 2 3 4 5 6 | 1 2 3 4 5 6 |
J3 Cell-Phone Messaging | strings and decisions | * | 1 | 1 |
J4 Tough Being a Teen | array handling | ** | 1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 |
J5 CCC Othello | 2D array handling | ** | 1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 |
Senior Problems | ||||
S1 Maternity | basic string handling | * | 1 2 3 | 1 2 3 |
S2 Cipher
Texts S2 Cipher Texts v2 |
string handling (V2 - inferring the 27th from 26 given requires a more complex approach) |
** | 1 2 3 4 5 | 1 2 3 4 5 |
S3
Tin Can Telephone S3 Tin Can Telephone (Vec) (by JJ) |
geometry calculations (Vector approach) |
*** | 1 2 3 4 | 1 2 3 4 |
S4 Groups | 2D array (matrix) manipulation | *** | 1 2 3 | 1 2 3 |
S5
Origin of Life (by CR, JJ, RH) S5 Origin Of Life (V2) (by JJ) |
2D arrays, queues and complex algorithm (find all Edens approach) |
**** | 1 2 3 4 5 | 1 2 3 4 5 |
2005 Problems | Topics Involved | Rating | Input Files | Output files |
Junior Problems | ||||
J1 Cell Sell | arithmetic, decision structures | * | 1 2 3 | 1 2 3 |
J2 RSA Numbers | arithmetic with nested structures | * | 1 2 3 | 1 2 3 |
J3 Returning Home | simple array and string processing | * | 1 2 3 | 1 2 3 |
J4 Cross Spiral | moving around a 2D array | *** | 1 2 3 4 5 | 1 2 3 4 5 |
J5 Bananas J5 Bananas (non-recursive) (by JJ) |
indirect recursion or
simple iteration (no recursion needed) |
*** | 1 2 3 4 | 1 2 3 4 |
Senior Problems | ||||
S1 Snow Calls | basic string handling | * | 1 | 1 |
S2 Mouse Move | basic structures | * | 1 2 3 4 5 | 1 2 3 4 5 |
S3 Quantum Operations | 2D array (matrix) manipulation | ** | 1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 |
S4 Pyramid Message Scheme | tree height / 1D array manipulation | *** | 1 | 1 |
S5 Pinball Ranking Very simple but slow - Counting (by RC) Slow- Insertion sort Fast - Binary Tree (by AL) Fast -Merge Sort (by SH) |
sorting exercise
(using insertion sort, a binary search tree or merge sort) |
*** | 1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 |
2004 Problems | Topics Involved | Rating | Input Files | Output files |
Junior Problems | ||||
J1 Squares | reals and integers | * | 1 2 3 4 5 | 1 2 3 4 5 |
J2 Terms of Office | simple arithmetic (loops and mod) | * | 1 2 3 4 5 | 1 2 3 4 5 |
J3 Smile with Similes | nesting loops | * | 1 2 3 4 5 | 1 2 3 4 5 |
J4 Simple Encryption | strings and character manipulation | ** | 1 2 3 4 5 | 1 2 3 4 5 |
J5 Fractals | geometry, array processing | *** | 1 2 3 4 5 | 1 2 3 4 5 |
Senior Problems | ||||
S1 Fix | decisions and built-in string functions | ** | 1 2 3 4 5 | 1 2 3 4 5 |
S2 Top Yodeller | simple 1D array processing | ** | 1 2 3 4 5 | 1 2 3 4 5 |
S3 Spreadsheet | simple 2D arrays and String processing | *** | 1 2 3 4 5 | 1 2 3 4 5 |
S4 Space Turtle (by RP) | ugly geometry problem | **** | 1 2 3 4 5 | 1 2 3 4 5 |
S5 Super Plumber | 2D arrays & dynamic programming | **** | 1 2 3 4 5 | 1 2 3 4 5 |
2003 Problems | Topics Involved | Rating | Input Files | Output files |
J1 Trident | character graphics | * | ||
J2 Perfect Picture | simple arithmetic (div and mod) | * | ||
J3/S1 Snakes and Ladders | simple counting, decisions | * | ||
J4/S2 Poetry | simple strings, decisions | ** | 1 2 3 4 | 1 2 3 4 |
J5/S3 Floor Plan | 2D array, recursion, largest of 1D array | *** | 1 2 3 4 5 | 1 2 3 4 5 |
S4 Substrings (by
VS) S4 Substrings (by CL) |
strings | *** | 1 2 3 4 5 | 1 2 3 4 5 |
S5 Trucking (by VS) | graph theory, Prim's algorithm | **** | 1 2 3 4 5 | 1 2 3 4 5 |
2002 Problems | Topics Involved | Rating | Input Files | Output files |
J1 0123456789 | character graphics | * | ||
J2 AmeriCanadian | simple strings | * | ||
J3/S1 Student Council's Breakfast | nested loops | * | ||
J4/S2 Fraction Action | GCD algorithm | * | ||
J5/S3 Blindfold | 1D and 2D array | ** | 1 2 3 4 | 1 2 3 4 |
S4 Bridge Crossing (by VS) | dynamic programming | ***** | 1 2 3 4 5 | 1 2 3 4 5 |
S5 Bouncing Ball | geometry calculations | **** | 1 2 3 4 5 | 1 2 3 4 5 |
2001 Problems | Topics Involved | Rating | Input Files | Output files |
J1 Dressing Up | character graphics | * | ||
J2 Mod Inverse | simple arithmetic (div and mod) | * | ||
J3/S1 Keeping Score | simple strings, decisions | * | ||
J4/S2 Spirals | loops, decisions | ** | ||
J5/S3 Strategic Bombing | graph theory, Warshall's algorithm | **** | 1 2 3 4 5 | 1 2 3 4 5 |
S4 Cookies (by RP) | geometry calculations | **** | 1 2 3 4 5 | 1 2 3 4 5 |
S5 Post's Correspondence Method 1 Method 2 (by HT) |
strings, complex recursion | **** | 1 2 3 4 | 1 2 3 4 |
2000 Problems | Topics Involved | Rating | Input Files | Output files |
J1 Calendar | loops, decisions | * | ||
J2 9966 | simple arithmetic (div and mod), decisions | * | ||
J3/S1 Slot machines | loops, decisions | * | ||
J4/S2 Babbling Brooks | 1D array (insertion/deletion shifting) | ** | 1 2 3 4 5 | 1 2 3 4 5 |
J5/S3 Surfing Warshall's algorithm Breadth First Search Method (by AS) |
strings, graph theory Warshall's algorithm or Breadth First Search |
**** | 1 2 | 1 2 |
S4 Golf Dynamic programming approach Breadth First Approach (by AV) |
dynamic programming or Breadth First Search |
**** | 1 2 3 4 5 | 1 2 3 4 5 |
S5 Sheep and Coyotes
Brute force approach or using Perpendicular Bisectors (by RP) |
geometry calculations, 1D arrays | **** | 1 2 3 4 5 | 1 2 3 4 5 |
1999 Problems | Topics Involved | Rating | Input Files | Output files |
P1 Card Game | 1D array, decisions | * | 1 | 1 |
P2 Year 2000 | Ugly string processing | *** | 1 | 1 |
P3 Divided Fractals | character graphics, recursion | *** | 1 | 1 |
P4 A Knightly Pursuit | 2D array, dynamic programming | ***** | 1 | 1 |
P5 Letter Arithmetic My Brute force Approach An Improved Method (by AV) |
exhaustive search (combinations/ permutations), string,
1D array, complex algorithm |
***** | 1 | 1 |
1998 Problems | Topics Involved | Rating | Input Files | Output files |
P1 Censor | strings, loops, decisions | * | 1 | 1 |
P2 Cross Number | simple arithmetic (div and mod) | * | 1 2 | |
P3 Mars rover | decisions | ** | 1 | 1 |
P4 Lottery | string, complex algorithm | *** | 1 | 1 |
P5 Mountain Passage | 2D arrays, dynamic programming | ***** | 1 | 1 |
1997 Problems | Topics Involved | Rating | Input Files | Output files |
P1 Sentences | nested loops | * | 1 | 1 |
P2 Nasty Numbers | complex arithmetic (div and mod) | ** | 1 | 1 |
P3 Double Knockout Competition | simple arithmetic (div and mod) | ** | 1 | 1 |
P4 Dynamic Dictionary Coding | string, 1D array | ** | 1 | 1 |
P5 Long Division | string, 1D array, complex algorithm | **** | 1 | 1 |
1996 Problems | Topics Involved | Rating | Input Files | Output files |
P1 Perfect Numbers | simple arithmetic (div and mod) | * | 1 | 1 |
P2 Divisibility by 11 | string, 1D array, complex algorithm | *** | 1 | 1 |
P3 Pattern Generator | complex string algorithm | *** | 1 | 1 |
P4 Roman Numerals | decisions | ** | 1 | 1 |
P5 Max Distance Linear Search Binary Search (by AS) |
1D array | *** | 1 | 1 |