PCS Standard Contest 9

Welcome to (embarrassingly) our first PCS contest of the year! It's taken us a while to get here, but at least we did.

This contest comprises of 3 questions. Thanks to Tommoa, maxward and 1021839 for writing the problems.

Some questions may have sub-tasks worth partial points. The contest will run for one week. However, you will have only 2 hours to complete the questions starting at any time you like during the contest span. After your 2 hours is up, you will become a spectator.

All input and output will be done via the standard input and output streams respectively.


  • Do not discuss the questions at all with anyone who has not yet finished (or begun) their competition window.
  • Do not create a second account to view the questions before competing.
  • You may copy and paste code from your code library.
  • The scoreboard is provisional until the winner is announced, and ratings are updated. The contest writers reserve the right to add test data to break any incorrect or time limit exceeded solutions.

Some Advice

  • Read the bounds, read the time limit, and DO COMPLEXITY ANALYSIS. Do not waste time on a solution that will definitely get time limit exceeded.
  • Read every question.
  • Try not to get stuck solving a question if there are others you can work on.
  • If you cannot solve a question, try solving a sub-task. Sometimes these are designed to help you along the path to a complete solution.
  • Partial points for sub-tasks are extremely valuable, and often are the difference between the bottom of the scoreboard, and at the top.
  • If you get wrong answer, try debugging using your own test cases.

We guaranteed that all problems are solvable in C/C++. Due to the relative efficiency of some languages, we do not guarantee any other languages are viable. Problems are almost always solvable in Java. Problems are occasionally solvable in Python.

This contest is rated.


Problem Points AC Rate Users
Counting Trees 5 26.1% 9
A PCS ODay 1 24.0% 5
Palindromic Deletion 1p 17.1% 4


  • 0
    Manstie  commented on Aug. 28, 2019, 2:51 p.m.

    Yay I did one...