## CCC '22 S3 - Good Samples

View as PDF

Points: 10 (partial)
Time limit: 1.0s
Memory limit: 1G

Author:
Problem types
##### Canadian Computing Competition: 2022 Stage 1, Senior #3

You are composing music for the Cool Clarinet Competition (CCC). You have been instructed to make a piece of music with exactly notes. A note is represented as a positive integer, indicating the pitch of the note.

We call a non-empty sequence of consecutive notes in the piece a sample. For instance, , , and are samples of . Note that is not a sample of . We call two samples different if they start or end at a different position in the piece.

We call a sample good if no two notes in the sample have the same pitch.

The clarinet players are picky in two ways. First, they will not play any note with pitch higher than . Second, they want a piece with exactly good samples.

Can you construct a piece to satisfy the clarinet players?

#### Input Specification

The first and only line of input will contain space-separated integers, , , and .

The following table shows how the available 15 marks are distributed.

Marks AwardedBounds on Bounds on Bounds on
marks
marks
marks
marks

#### Output Specification

If there is a piece of music that satisfies the given constraints, output integers between and , representing the pitches of the notes of the piece of music. If there is more than one such piece of music, any such piece of music may be outputted.

Otherwise, output .

#### Sample Input 1

3 2 5

#### Sample Output 1

1 2 1

#### Explanation of Output for Sample Input 1

Notice that the piece is composed of notes, each of which is one of possible pitches, and . That piece of music has a total of samples, but only good samples: , , , , . Notice that the two good samples of are different since they start at two different positions.

Note that the piece is the only other valid output for this input.

One example of an output that would be incorrect is , since it has notes with pitches larger than . Another incorrect output would be , since it only has four good samples: , , , and .

#### Sample Input 2

5 5 14

#### Sample Output 2

1 5 3 2 1

#### Explanation of Output for Sample Input 2

The 14 good samples are: , , , , , , , , , , , , , .

#### Sample Input 3

5 5 50

#### Sample Output 3

-1

#### Explanation of Output for Sample Input 3

There are no pieces with notes that can produce different good samples.

• commented on March 13, 2022, 4:07 p.m.

does 0 count as a "positive integer"

• commented on March 27, 2022, 11:22 a.m.

No

• commented on March 13, 2022, 4:23 p.m.

This comment is hidden due to too much negative feedback. Show it anyway.

• commented on March 13, 2022, 8:20 p.m.

yes

• commented on March 13, 2022, 8:56 p.m.

Thanks for clearing that up, I was confused on that part too. 🙏🙏🙏

• commented on Feb. 25, 2022, 9:53 p.m.

• commented on Feb. 25, 2022, 10:10 p.m.

This comment is hidden due to too much negative feedback. Show it anyway.

• commented on Feb. 24, 2022, 5:32 p.m.

i rlly like this problem except i didnt solve it during ccc

• commented on Feb. 24, 2022, 2:05 p.m.

angery ;-;

• commented on Feb. 24, 2022, 1:06 p.m.

rip ccc score :(

• commented on Feb. 24, 2022, 11:58 a.m.

CCC has become terrible this year, thanks to Mr. Riolku Gugeler and his team. Lots of server issues and users joining the wrong contest on the main CCC site this year. Some of them were blamed on the public. This doesn't happen in other programming contests but they got away with it because they didn't provide proper data to back their claims. It is easier to blame your server crashes and duplicate contests on the users, your team, or the wind blowing than learn a bit about load balancing to prevent overloading your servers, and naming conventions to prevent students from accidentally joining the contest outside North and South America.

This must have emboldened them to make the 2022 Senior contests a disaster. Take for example Problem S3 in 2022 - Good Samples. It has efficient solutions using Ad Hoc. However, these subjects are not in the Canadian high school math curricula, let alone computer studies.

In fact, Mr. Riolku Gugeler has SPECIFICALLY complained about difficult Ad Hoc problems. Take his comment on the Ad Hoc problem 'Loop Town' on last year's CCO:

eliden (loop town author) handed me the editorial, and i [still] didnt get the first subtask

Maybe there are other ways to solve it but they'd be extremely contorted. Ad Hoc provides a decisive advantage. Unsuspecting kids who attempt to circumvent or reinvent Ad Hoc will burn out their entire contest time and more.

The other problems in 2022 CCC Senior are equally out of whack. Either an illusionary image of Cancer Geo, some obscure 'Tree DP' technique being mandatory for S5, or overly implement-y and math-y questions like the question with the fours and fives. No fun data structures which make up a good portion of the IOI syllabus.

Since the organizers clearly didn't design this contest for a good IOI selection, nor to encourage the participants, they look like a bunch of one-trick-ponies who have ruined the contest on purpose. They get to look like geniuses to the corporate sponsors. You know, they get to show they are much smarter than the kids who couldn't invent on the spot all the advanced problem solving techniques that some of the organizers learned in university.

Considering that CCC participants will soon compete with the CCC organizers for jobs and grants, botching the contest in 2022 was a clever strategy for the organizers. They also got to make their favorites win by knocking down everyone else with unfair subject matter and server issues. Or maybe not?

We'll see if the powers that be are willing to fix the 2022 CCC botch. They need to get someone more responsible to redo the contest and properly select the IOI team. This contest used to run smoothly before Mr. Riolku Gugeler took over and wasted it. CCC is a tremendous asset for Canadian education, it is important for thousands and thousands of students each year, and it deserves honest and competent leadership.

https://dmoj.ca/post/158-ccc-19-problems-posted#comment-9190

• commented on Feb. 24, 2022, 6:51 p.m.

I get that this is a long running gag that's not meant to be taken too seriously, but I think it is getting a bit out of hand.

Keenan (Riolku) Gugeler is not in charge of CCC. He (and most of the other committee members) are not involved in (and not responsible for) setting up the contest registration or handling server issues. Despite this, he is going above and beyond and is actively working on a solution to address the server issues, as well as other CCC Grader concerns. Students who joined the wrong contest will still be eligible for the Honour Roll and CCO, as this is based on the school you are registed with, not which contest you joined.

Keenan has definitely not complained about Ad Hoc problems in the past, and I fail to see how his comment on a single question's editorial is related to his opinion on the category. Saying a problem is hard does not mean that all problems in that category are hard, nor is it equivalent to a complaint about that problem or the category.

On the topic of the IOI syllabus, most fun data structure are actually considered out of scope. 2D data structures, wavelet matrices, skew heaps, static and dynamic graph data structures, most string data structures, and almost all geometry related data structures are considered out of scope. In fact, in recent years, there has been a shift towards Ad Hoc problems, with around half of the problems every year being Ad Hoc (https://dmoj.ca/problems/?show_types=1&category=5&page=3). That being said, CCC is not soley used for IOI selection (it is around one-third of the weight, with the remainder from CCO, which follows the IOI syllabus even more closely).

Funny enough, the intended solution (and the solution most contestants used) is much closer to greedy than Ad Hoc. For the other problems, S1 is something you would probably see on a Codeforces Div 2 Problem A. S2 tests basic understanding of the map data structure, which is usually taught by this time in Grade 12 computer science courses. S4 is a counting/combinatorics problem that would perhaps show up on a contest like USACO or AtCoder. S5 is tree dp which shows up almost everywhere in competitive programming. While the problem quality is not as high as some would have liked, it is certainly unfair to declare them to be "out of whack" when similar problems have showed up in many other competitive programming contests.

CCC scores (along with many other high school achievements) have very little impact on jobs and grants, especially after the first year of university.

As I mentioned before, work is currently being done to address many of the CCC Grader concerns, with Keenan contributing significantly. But as he is not the person in charge, his suggestions may not necessarily be implemented.

Hopefully this is the last time we will see this copy pasta. Certainly there are disappointments with the current state of CCC, but this copy pasta highlights all the wrong parts and none of the actual issues.

• commented on Feb. 24, 2022, 7:14 p.m.

orz riolku

• commented on Feb. 24, 2022, 6:20 p.m.

This comment is hidden due to too much negative feedback. Show it anyway.

• commented on Feb. 23, 2022, 10:11 p.m.

gg hardstuck p3

• commented on Feb. 24, 2022, 8:33 a.m.