Блог пользователя flatline

Автор flatline, история, 8 лет назад, По-английски

I have been practicing on TopCoder for some time and have been getting the warning about my code having more than "30% unused code".

I wanted to know a few things:

  1. Will I be penalized if I submit my code with more than the said amount of unused code? If yes what will be the penalty?

  2. In my case I was getting the warning because my template is a little long (35 lines in this case). But what exactly is wrong with having that big a template? Will I be penalized if I exceeded the Unused Code Limit because of my template?

I went through the TopCoder forums but couldn't get a definite answer to these questions, hence posting here.

Thanks in advance.

  • Проголосовать: нравится
  • +8
  • Проголосовать: не нравится

»
8 лет назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

Here it is in the rules.

Generally, the Unused Code Rule tries to penalize too much irrelevant text in your solution, so that in the challenge phase of a contest, it is easier for the readers to see what the actual solution is.

When you solve problems in Practice Rooms, however, there is no challenge phase, and the Unused Code Rule won't be used to decrease your points.