CoolFace
Datasetpublic

hackercupai/hackercup

Data Preview The data available in this preview contains a 10 row dataset: Sample Dataset ("sample"): This is a subset of the full dataset, containing data from 2023. To view full dataset, download output_dataset.parquet. This contains data from 2011 to 2023. Fields The dataset include the following fields: name (string) year (string) round (string) statement (string) input (string) solution (string) code (string) sample_input (string) sample_output (string)… See the full description on the dataset page: https://huggingface.co/datasets/hackercupai/hackercup.

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
24likes2.2kdownloads
squished_status.md41 linesDownload Raw Back to round1
1Some engineers got tired of dealing with all the different ways of encoding2status messages, so they decided to invent their own. In their new scheme, an3encoded status message consists of a sequence of integers representing the4characters in the message, separated by spaces. Each integer is between 1 and5**M**, inclusive. The integers do not have leading zeroes. Unfortunately they6decided to compress the encoded status messages by removing all the spaces!7 8Your task is to figure out how many different encoded status messages a given9compressed status message could have originally been. Because this number can10be very large, you should return the answer modulo 4207849484 (0xfaceb00c in11hex).12 13For example, if the compressed status message is "12" it might have originally14been "1 2", or it might have originally been "12". The compressed status15messages are between 1 and 1000 characters long, inclusive. Due to database16corruption, a compressed status may contain sequences of digits that could not17result from removing the spaces in an encoded status message.18 19### Input20 21The input begins with a single integer, **N**, the number of compressed status22messages you must analyze. This will be followed by **N** compressed status23messages, each consisting of an integer **M**, the highest character code for24that database, then the compressed status message, which will be a string of25digits each in the range '0' to '9', inclusive. All tokens in the input will26be separated by some whitespace.27 28### Output29 30For each of the test cases numbered in order from 1 to **N**, output "Case31#**i**: " followed by a single integer containing the number of different32encoded status messages that could be represented by the corresponding33compressed sequence modulo 4207849484. If none are possible, output a 0.34 35### Constraints36 375 ≤ **N** ≤ 25  382 ≤ **M** ≤ 255  391 ≤ length of encoded status ≤ 100040 41