KLSMC

Speed Round

Each question gains max points for every 5 minutes after it is answered, after every 5 minutes to maximum number of points which can be gained is deducted by half. Input your teamID only once below. Each submission has to be followed with a algorithmic check by one of the supervisors to ensure you aren't brute forcing!

The digital forensics and analysis team of the PD has an open spot for a job, but first you need to pass through some cases as an intern, do you have what it takes?

Each question provides points with the points halving every 5 minutes.

Two Sum : Missing Evidence

The evidence locker is in disarray, with items scattered everywhere. Somewhere in the chaos are two items that, when combined, unlock a critical clue. Quickly find the two items whose combined weight equals the target value!

Difficulty: Trivial

Question

Encryption Key

A suspicious message has been intercepted encoded with a simple structure. Figure out what this structure requires to ensure that it can be read correctly, be wary, some of these messages are long.

Difficulty: Easy

Question

A Suspect Code

In a crime scene we found a numeric code which we think contains the co-ordinates for the suspects address, although some of these may be red herrings, our superior analysts have concluded that the numeric sequences are only valid if the sequence is the same as it is forwards as it is backwards. It may be a simple yes or no but a guessing mistake could cost you.

Warning! This question deducts 40 Points if answered incorrectly

Difficulty: Easy/Moderate

Question

Victim Logs

Due to the budget cuts we have had to seperate our reports into two seperate departments, yet each department has a collection of reports which are out of order! Sort out these two lists to figure out the correct timeline, each report is denoted by the number n with n+1 as its next consecuritve report number. The resultant collection is denoted by R(c) = n + (n+1) + (n+2) ...

Warning! This question deducts 40 Points if answered incorrectly

Difficulty: Medium

Question

Detective Mood

The stress of the case is taking a toll. Each day, your mood fluctuates wildly. Some days are great, and others are filled with despair. Track the longest streak of "good mood days" to determine when you're most effective.

Input is denoted by a list of integers `nums`.

  • Each integer represents your mood score for a particular day: positive values are good days, and negative values are bad days.
  • Your task is to find the maximum sum of a contiguous subarray (a sequence of consecutive days). For example, given `nums = [-2, 1, -3, 4, -1, 2, 1, -5, 4]`, the maximum sum is `6` for the subarray `[4, -1, 2, 1]`.
Difficulty: Hard

Question

Safehouse Access

The mastermind’s safehouse is at the top of a towering staircase. The only way to reach the safehouse is by climbing the stairs, and the guards have set a rule: you can climb either 1 or 2 steps at a time. Determine how many distinct ways you can climb to the top.

Input is denoted by an integer n, the total number of steps in the staircase.

  • Each step can be taken as a single step or as part of a double step.
  • The output should be the total number of distinct ways to climb to the top. For example, for n = 4, there are 5 distinct ways to climb: (1+1+1+1), (1+2+1), (2+1+1), (1+1+2), (2+2).
Difficulty: Medium

Question

The Sequence Riddle

The mastermind has left behind a series of encoded numbers. Intelligence suggests these numbers form a sequence with hidden meaning

Input is denoted by a list of integers nums

  • Your task is to find the length of the longest subsequence that is strictly increasing.
  • A subsequence is a sequence derived from the input array by deleting some or no elements without changing the order of the remaining elements. For example, given nums = [10, 9, 2, 5, 3, 7, 101, 18], the LIS is [2, 3, 7, 101] with a length of 4.
Difficulty: Hard

Question

Market Interception

The criminal syndicate is profiting from a volatile artifact trading market. Your mission is to determine the perfect time to buy low and sell high to intercept the syndicate's profits.

Input is denoted by a list of integers `prices`.

  • Each integer represents the price of the artifact on a given day.
  • Your task is to maximize profit by choosing one day to buy and one day to sell, ensuring the buying day comes before the selling day. If no profit can be made, return `0`. For example, given `prices = [7, 1, 5, 3, 6, 4]`, buy on day 2 (price = 1) and sell on day 5 (price = 6), yielding a profit of `6 - 1 = 5`.

WARNING! This question deducts 60 points for any wrong attempt!

Difficulty: Hard

Question

Leaderboard

Position Team Name Points