## DMOPC '14 November Contest

The contest has ended.

Welcome to the second Don Mills Open Programming Competition of the year! In this month's contest, you'll be helping The Logging Company in their forestry enterprise.

Before the contest date, you may wish to check out the tips and help pages (more content to be added soon).

The contest consists of 6 questions with a wide range of difficulties, and you can get partial marks for partial solutions. The difficulty of a problem may be anywhere from CCC Junior to CCO level. You will have 3 hours to complete the contest. Check when the contest begins in your timezone here.

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.

For some of you, online programming contests are a relatively new thing; therefore, we have listed below some advice as well as contest strategies:

• Start from the beginning. The problems are ordered by difficulty.
• It is strongly advised to run your code on your own computer with the sample input we provide before submitting. It's faster to find and fix mistakes at this stage rather than submitting and waiting only to find out that your solution doesn't compile.
• Remove all extra debugging code and/or input prompts from your code before submitting. The judge is very strict — it requires your output to match exactly.
• Ensure your program works with the sample input, however, just because it works with the sample input doesn't guarantee that it will earn full points. Read the problem statement very carefully to look for things you may have missed on the first read-through. It is not forbidden — in fact, even encouraged to make your own test cases to debug your program on.
• If you're stuck on a problem, or are getting most of the partial marks, you can simply proceed to the next question. There are some people who spend their time debugging or making their code more efficient only to earn a few extra points for one question. Sometimes it's best to just move on and return to that question later on in the contest.
• For the first few problems, we have allowed you to see some of your program's output for easier debugging. We don't want you to be frustrated at not being able to do anything but look upon red WAs throughout the contest!
• The test data is guaranteed to fit within the constraints given. You do not have to perform any extra checks to make sure of this fact.

In the case of appeals, the decision(s) of DMOJ staff is final.

Good luck!

• commented on Nov. 19, 2014, 11:59 a.m.

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

• commented on Nov. 19, 2014, 7:19 p.m. edit 2

Your submission on problem 2 is incorrect. Java throws an exception all the test cases.

Below is your program being run on test case #5.

https://ideone.com/ghOTfx

The exception is

Exception in thread "main" java.util.NoSuchElementException: No line found
at java.util.Scanner.nextLine(Scanner.java:1585)
at Main.main(Main.java:40)

In fact, this is the same problem with your other programs. Java allows Scanners to be buffered, and indeed this is the case on the judge, so creating new Scanners will not resume reading input from the same place.

A solution to this problem is to use one instance of Scanner for all your input reading needs.

Your appeal for a manual evaluation of your solution is being considered. Please note that this does not guarantee you will receive more points. It will be up to the organizational staff to make the final judgement.

UPDATE

The organizational staff have come to a decision that you will not receive extra points.

The buffering behavior of Scanner on online judges is conventionally turned on. The difference between your line-buffered console and the i/o pipes of the judge should be taken into consideration before submitting a program.

Unfortunately, we are unable to readjust your points as the program is ultimately incorrect (due to the reasons stated above).