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
scoreboard.md62 linesDownload Raw Back to finals
1The 2019 Hacker Cup Finals have just concluded! There were **N** participants2(numbered 1 to **N**), including yourself (competing as participant 1), and3**M** problems (numbered 1 to **M**).4 5Participant _i_ solved problem _j_ if **Si,j** = "Y", and otherwise they6didn't solve it (if **Si,j** = "N"). Problem _i_'s point value is 2i, and each7participant's score is the sum of the point values of the problems that they8solved. No two participants solved exactly the same set of problems, which9also means that all participants have distinct scores.10 11Before the final results get announced, you have an opportunity to rearrange12the **M** columns of the scoreboard **S** into any permutation of problems 113to **M**. For example, if you swap columns 1 and 2, then everybody who had14originally solved problem 1 will now be considered to have solved problem 215(thus earning 4 points for it rather than 2), and vice versa.16 17Of course, you'd like to use this opportunity to your benefit — it would be18irresponsible to just let it pass by! However, it would be too suspicious if19you simply made yourself win the whole competition. As such, you'd like to20cause yourself to end up in 2nd place, such that you (participant 1) have21exactly the second-highest score out of all **N** participants. Now you just22need to determine whether or not this is achievable...23 24### Input25 26Input begins with an integer **T**, the number of scoreboards.  27For each scoreboard, there is first a line containing the space-separated28integers **N** and **M**.  29Then, **N** lines follow, the _i_th of which contains a length-**M** string,30the characters **Si,1** through **Si,M**.31 32### Output33 34For the _i_th scoreboard, print a line containing "Case #_i_: " followed by35one character, either "Y" if you can end up in 2nd place, or "N" otherwise.36 37### Constraints38 391 ≤ **T** ≤ 200  402 ≤ **N** ≤ 400  411 ≤ **M** ≤ 400  42 43The sum of **N** * **M** across all **T** test cases is no greater than441,000,000.45 46### Explanation of Sample47 48In the first case, there's only one possible permutation of problems: [1].49This results in you having a score of 2 and participant 2 having a score of 0,50which puts you in 1st place rather than 2nd.51 52In the second case, if you preserve the original permutation of problems, [1,532], you'll have a score of 2 while participant 2 has a score of 4, putting you54in 2nd place, as required. The permutation [2, 1] would have put you in 1st55place instead.56 57In the third case, if you choose the problem permutation [2, 1], the 458participants' scores will be 4, 0, 6, and 2, respectively. This puts you in592nd place, as required. The problem permutation [1, 2] would have put you in603rd place instead.61 62