You are not logged in. Please login at www.codechef.com to post your questions!

×

Subtasks evaluation

What is the difference between Constraints and Subtasks? Also, how are Subtasks evaluated?

asked 19 Feb '15, 19:15

m_joshi's gravatar image

1★m_joshi
111
accept rate: 0%


Constraints and Subtasks are two totally different things!

Constraints

  • It tells about range of inputs and testcases.
  • Maximum size of the array you require to solve the problem.
  • Maximum length of string etc.

Subtasks

  • Subtasks are different set of testcases to check your code efficiency and Time constraints.
  • Every problems has subtasks it really helps during Competition you can check for which range of inputs my solution is not working.

Consider this example

Problem : FEB15 Chef and Chain

constraints

  • 1 ≤ T ≤ 7 // maximum number of testcases is 7
  • 1 ≤ |S| ≤ 10^5 // maximum size of string you require for this problem is 10^5

Subtasks

  • Subtask 1 ≤ |S| ≤ 10, 1 ≤ T ≤ 7 Points: 20 // if your code passes all the testcases where string has size not greater than 10 then you'll get 20 points
  • Subtask 1 ≤ |S| ≤ 1000, 1 ≤ T ≤ 7 Points: 30 // same applies here
  • Subtask 1 ≤ |S| ≤ 10^5, 1 ≤ T ≤ 7Points: 50

Hope it helps!
Thank you!!
AlgoWiki ~ All the links and resources on different topics of Computer Science at one place!

link

answered 19 Feb '15, 20:21

vicky002's gravatar image

1★vicky002 ♦♦
2561314
accept rate: 27%

nice explaination :)

link

answered 19 Feb '15, 20:56

shiva_google's gravatar image

2★shiva_google
974
accept rate: 0%

edited 19 Feb '15, 21:05

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×26

question asked: 19 Feb '15, 19:15

question was seen: 2,898 times

last updated: 19 Feb '15, 21:05