New Year's 2016

It's almost 2016! A new year means setting new year resolutions, bettering yourself, and of course — a contest!

The problem writers this time will be k_53P, cheesecake, awaykened, Xyene, and FatalEagle.

The pretest/systest format will not be used. This means that submissions will be judged on the full set of data during the contest. However, partial output will be disabled.

This contest will be rated for all participants.

Before the contest, you may wish to check out the tips and help pages.

The contest will run from Jan 1, 12 PM EST to Jan 3, 12 PM EST. It will consist of 7-8 problems in approximated increasing order of difficulty. The problems will be allotted different point values based on their difficulties. As usual, if you cannot fully solve a problem, there are subtasks you can complete for partial points. We encourage contestants to read all problems and go for these partial marks. It is also highly recommended that you join and start the contest as soon as possible since ties are broken by your submission times.

After joining the contest, you proceed to the Problems tab to begin. You can also go to Users if you wish to see the rankings.

We have listed below some advice as well as contest strategies:

• Start from the beginning. Ties will be broken by the sum of times used to solve the problems starting from the beginning of the contest. Your last submission time will be used.
• Remove all extra debugging code and/or input prompts from your code before submitting. The judge is very strict — most of the time, it requires your output to match exactly.
• Do not pause program execution at the end. The judging process is automated. You should use stdin / stdout to perform input / output, respectively.
• It is guaranteed that all the problems will be solvable with C++.

At the end of the contest, you may comment below to appeal a judging verdict. In the case of appeals, the decision(s) of DMOJ staff is final.

Good luck and Happy New Year!

Problems

Problem Points AC Rate Users
Late Christmas Shopping 3p 33.2% 143
The 365 Days of Christmas 5p 23.4% 111
Arithmetic Snowman 7p 19.7% 103
DIY Christmas Tree 10p 31.4% 50
Eggnog Dilemma 12p 5.2% 25
Cake Balancing 15p 36.8% 57
Old Christmas Lights 17p 15.4% 28
S-NO-wall 20p 9.5% 25

• Xyene
commented on Jan. 3, 2016
Updated ratings

Ratings have been updated!

• bobhob314
commented on Jan. 3, 2016 edited

I love you bud

• cheesecake
commented on Jan. 3, 2016 edited
Solution Sketches

There won't be an official editorial so here are some rough solution sketches and hints:

P1 - Apologies once again for the issues with test data. Anyone who still WAs on the last case needs to consider the case where one bag has multiple copies of the same item.

P2 - Easy implementation, most errors were on the suffixes for the numbers.

P3 - Constraints were set loosely on this problem. Counting the occurrences of each size and sorting the sizes gives us a solution.

P4 - Multiple ways to approach this problem. One way is to DFS and get the size of the subtree rooted at each node. Number the nodes by depth and from left to right. For node , leave a "gap" between node and node equal to the size of 's subtree.

P5 - Consider a restricted version of the problem where . Some may have noticed that the inspiration for the problem came from a famous puzzle involving a king, some prisoners, and a poisoned barrel of wine.

P6 - Standard bitmask DP. The state is , the minimum number of moves required to reach the state where represents the items in the left pan and represents the items in the right pan.

P7 - Consider a restricted version of the problem where queries have no upper bound. In other words, what is the maximum size consistent subarray of ?

P8 - We can use segment tree where each node keeps track of the contiguous prefix and suffix length of 1s in that segment. When merging nodes, the new maximum contiguous section is either the prefix, suffix, or the new section created by merging the two.

Hope you guys enjoyed the contest. Happy new year!

• XIAOAGE
commented on Jan. 3, 2016

Anyone knows the puzzle name for problem 5?

• alexyu
commented on Jan. 3, 2016
• XIAOAGE
commented on Jan. 3, 2016

Thx

• odaniel
commented on Jan. 3, 2016

"All the King's Wine"

• XIAOAGE
commented on Jan. 3, 2016

Thx

• ahmedtn
commented on Jan. 1, 2016
Pascal?

Pascal is not available for this contest?

Happy new year everybody :)

• cheesecake
commented on Jan. 1, 2016

P1 was on a separate judge, it's now available for all languages.

• ahmedtn
commented on Jan. 1, 2016

Thanks a lot!

• cheesecake
commented on Jan. 1, 2016
HAPPY NEW YEAR

HAPPY NEW YEAR

• bobhob314
commented on Jan. 1, 2016

YOU TOO BUD

commented on Dec. 26, 2015
Difficulty

What kind of difficulty levels can we expect, roughly speaking?

• cheesecake
commented on Dec. 26, 2015

With lots of problems and lots of time, there will be something for everyone!

• bobhob314
commented on Dec. 27, 2015 edited

If there will be something for Fatal, you, etc., it's going to be hard ;_;

• d
commented on Dec. 31, 2015 edited

They probably made an Aubrey Alston-style problem just for you (which is why there are 7 problems, not 6)

• cheesecake
commented on Dec. 31, 2015

There may be 8 problems actually, not confirmed yet :)

• bobhob314
commented on Dec. 26, 2015

last year's was pretty hard :/