Archive from Spring 2021

Quick Facts and Figures

172

competitors

$7000+

worth of prizes awarded

10

unique challenges

15

majors represented

19

prize winners

6

wonderful contributors

Feel free to check out this infographic on last year’s competition for more details on participation rates, breakdown by major, etc.

Prize Winners

A comprehensive list of standings and point-breakdowns can be found here. Summary of standings below:

Top 5 Overall

  1. Calvin Deng (MAT, Grad Student): 110/155
  2. Antonio Molina-Lovett (COS, Grad Student): 95/155
  3. Yuping Luo (COS, Grad Student) and Xiaoqi Chen (COS, Grad Student): 91/155
  4. Seyoon Ragavan (MAT ’21) and Lucas Salvador (COS, Grad Student): 65/155
  5. Kai Zheng (MAT ’21) and Justin Yan (COS ’21): 42/155

Undergraduate Top 5

  1. Kai Zheng (MAT ’21) and Justin Yan (COS ’21): 42/155
  2. Kiril Atasanov Bangachev (MAT ’22) and Rahul Saha (COS ’22): 35/155
  3. Allison Qi (MAT ’24) and Michael Tang (COS ’24): 35/155
  4. Brendan Zelikman (COS ’23) and Kevin Huang (COS ’23): 35/155
  5. Christopher Ye (MAT ’21) and Byron Chin (COS ’21): 34/155

Miscellaneous Prize Winners

  • Fastest Solution to Any Problem: Devon Ulrich (COS ’23) and Andrew Chen (COS ’23)
  • Best Codebreakers: Alex Valtchanov (COS ’22) and Brandon Huynh (ORF ’22)
  • Best Freshman/Sophomore Team: Allison Qi (MAT ’24) and Michael Tang (COS ’24)
  • Codegolf (Fewest Average Number of Characters): Kimberly Ding (COS ’21) and William Li (COS ’21)
  • Most Inquisitive: Allison Chou (MOL ’23) and Ellen Su (CBE ’23)

Problems can be found below. Solutions to last year’s problems can be accessed here (all coding problems should have a Java, C++, and Python solution for your convenience). Alternatively, you can check out the GitHub repository of COSCON 2021 here!


(The following is what was shown on the day of the competition, on April 3, 2021.)

Before you begin, here are some tips:

  • Each problem will either require you to make a submission on the corresponding page of our HackerRank contest or on Google Drive (in your team’s submission folder). You should submit solutions to problems with the [HR] tag on HackerRank and submit solutions to problems with the [GD] tag to your team’s Google Drive.
  • Not all HackerRank problems are “coding” problems: some HackerRank problems require you to work out a solution and then just print your answer in a program. The [HR] tag merely indicates that you need to submit your solution on HackerRank.
  • We recommend that you start with problem one — though if you’re gunning for the prize for the fastest solution, you might choose to ignore this advice (the fastest solution to problem one doesn’t count).
  • Problem one is worth five points, while all other problems are worth fifteen points in total. If there are multiple parts to a problem, the weight of each part will be clearly noted in the problem statement.
  • So of the problems will require you to submit a write-up or a proof. You may write your answers by hand or type them, but be warned that we will make little to no effort reading illegible solutions.
  • All your submissions (both on HackerRank and in your Drive) must be in by 5:00 PM EST. Submissions after then will be ignored.
  • Don’t hesitate to reach out either by email or by stopping by in our Zoom room if you have any questions/concerns about the rules or problems! We would love to meet you all.

Problem 0: This is Why You Went to Princeton [HR]

This problem is a warm-up to get you excited and familiar with the HackerRank interface. Download the problem statement below:

Problem 1: Fairly Filtering Freshmen [HR]

Can you combine your unwavering moral righteousness and programming skills to equitably distribute students to eating clubs on a PUID night? Download the problem statement below:

Problem 2: Not Another Pandemic [HR]

If you’re interested in the intersection of biology and computing, try this problem in biological networks on for size! Download the problem statement below:

Problem 3: Swiping Swag [HR]

Can you lend a hand to an extraterrestrial friend at the career fair? Download the problem statement below:

Problem 4: Cryptonite [HR]

If you’re interested in codebreaking, cryptography, or are just a nosy parker, you’ll enjoy this problem! Download the problem statement and the files you need below:
There are three parts to this problem. In each part, you will try to decrypt some encrypted ciphertexts and then tell us on Hackerrank what they say.
In part (ii), we challenged you to crack any one of ten possible ciphertexts. We gave you one ciphertext to start off with. The rest of the ciphertexts can be downloaded here.

Problem 5: Abnormal Gauss [HR]

If you’re interested in numerical methods, you’ll enjoy this problem, which asks you to complete an ingenious way to generate normal random numbers! Download the problem statement and auxiliary files below:

Problem 6: TigerHub 2.0 [HR]

It’s the change you’ve all been waiting for! The University has heard your concerns and has updated TigerHub. Naturally though, there’s still a bug. Can you exploit it? Download the problem statement below:

Problem 7: Lattice Lights [GD]

Can you light up my world like nobody else? Download the problem statement below:
Please make your solution as legible as possible (a typed version would be amazing, but not required) and upload your solutions to your team’s Google Drive by the time the contest ends. Please prefix any files you submit for this problem with the phrase problem7, e.g. problem7_solution.pdf.

Problem 8: Who Doesn’t Want to Win $1,000,000 [GD]

If you are a geek interested in complexity and the theory of computation, you’ll enjoy this problem. But even if you aren’t, you might learn something interesting! Download the problem statement below:
Please make your solution as legible as possible (a typed version would be amazing, but not required) and upload your solutions to your team’s Google Drive by the time the contest ends. Please prefix any files you submit for this problem with the phrase problem8, e.g. problem8_solution.pdf.

Problem 9: Drop the Bass I [HR]

Invasive species are taking over! Can you try to figure out a way to stop them from destroying the ecosystem? Download the problem statement below:

Problem 10: Drop the Bass II [HR]

The invasive species are still coming, so an alternative strategy to counteract their growth has been proposed. Let’s try it out! Download the problem statement below: