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

×

new in competitive programming

I am new in programming activities like contests which are held online. I just started learning coding and I have participated in one of the coding competitions in our university. I just want to ask if I still have to check the restrictions/constraints for test cases given in the problems. In the competition that I joined, its not verbally implemented but they marked the answers wrong if you dont check for the restrictions. How about online/international competitions? Is it necessary to check for the restriction given?

asked 29 Oct '14, 17:41

ramher237's gravatar image

2★ramher237
1351619
accept rate: 28%


You dont have to check in your code but you have to keep it in mind. Suppose a problem says you have to take 10^6 numbers as input in the worst case and u declare an array of say 1000 while making your code (without looking at the constraints) then you will get a wrong answer. Constraints are there to make you sure of the bounds of memory you need to keep in mind while making your code.

link

answered 29 Oct '14, 17:48

pranjalranjan's gravatar image

4★pranjalranjan
2.0k21432
accept rate: 20%

No. The test files do not contain invalid input . Inputs are always in the range mentioned in the constraints .

link

answered 29 Oct '14, 18:42

the65bit's gravatar image

4★the65bit
1.1k101328
accept rate: 13%

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:

×148

question asked: 29 Oct '14, 17:41

question was seen: 561 times

last updated: 29 Oct '14, 18:42