top of page
Search
CCC 2018 Problem S3: RoboThieves
This is a graph short path problem. Build a Graph data structure. If the cell (x,y) is a camera, special handle the row x, and the column...
Jul 5, 20202 min read
CCC 2018 S1: Voronoi Villages
The boundaries of a neighbourhood are defined by the two adjacent villages. 1. Sort the villages,. 2. Compute the midpoint of each...
Jul 5, 20201 min read
CCC 2019 S3: Arithmetic Square
CCC 2019 S3:Arithmetic Square Case 1: 1 x Case 2: 2 x Case 3: 3 x Case 4: 4 x We can set row by row , the column by column, you can...
Jun 29, 20203 min read
CCC 2018 J4/S2: Sunflowers
Matrix rotated anti clockwise 90 degree, next 90 degree (180 degree), next 90 degress(270 degree), next 90 degree(360 degree). Look the...
Jun 28, 20202 min read
CCC 2019 S2: Pretty Average Primes
For this problem, we can use a simple for-loop to generate values of a and b.Set a=i and b=2n−i. Loop it through the integers from 2 to...
Jun 28, 20201 min read
CCC 2019 J4/S1 - Flipper
It is easy , swap rows or swaps columns by 'H' or 'V' rawM = [[1,2], [3,4]] def hFlip(): t = rawM[0][0] rawM[0][0] = rawM[1][0]...
Jun 28, 20201 min read
CCC 2020 S2 or J5: Escape Room
Perform a depth-first search (DFS) on the cells. There areN2cells and individually finding the factors of each number. For a faster...
Jun 21, 20202 min read
CCC 2020 S1: Surmising a Sprinter's Speed
Sort the points by time. Then loop through consecutive pairs to find the constant speed over each interval. The answer is the maximum of...
Jun 21, 20201 min read
CCC2020 S3: Searching for Strings
Let S be a substring of H with length |N| To check whether S is a permutation of H, keep a count of each of the 26 letters of the...
Jun 21, 20202 min read
CCC 2019 Junior J5: Rule of Three Solution
https://cemc.uwaterloo.ca/contests/computing/2019/stage%201/juniorEF.pdf Build two lists wordsrc and worddst to simulate a dictionary....
Apr 28, 20201 min read
One-time Donations
I hope I can solve all CCC problems!
bottom of page