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


How To Use The Test Cases?

Since we won't be able to use online graders at INOI, I was wondering how to use the sample test cases that IARCS will provide us because I have never used them properly before.

Can someone give an example(C++ code) of how to use the test cases?(for any problem)

And how do I check that my code runs under the given time limit? Thanks!

asked 26 Jan '15, 15:56

ishoo's gravatar image

accept rate: 0%

edited 26 Jan '15, 15:57

Suppose you're solving COVERING from the INOI Practice Server. First extract onto your current directory, then make sure you have a compiled .exe version of your code, suppose covering.exe, in the same directory. Go to your command prompt, switch to your current working directory, then type:

covering.exe < covering-data/ > 5.out

The < and > operators essentially redirect the input and output streams of covering.exe to and from the external files and 5.out.

Open 5.out on your text editor and voila, you'll have your output.



answered 26 Jan '15, 16:18

popoya's gravatar image

accept rate: 100%

edited 26 Jan '15, 16:24

You can use > without < and vice-versa...

(26 Jan '15, 18:07) arpanb83★

You don't need to use '5.out'. Then the output will be shown in cmd itself.

(28 Jan '15, 11:26) ketanhwr6★

that's r8 @ketanhwr

(28 Jan '15, 15:07) arpanb83★

When it comes to time limits it suffices to analyze the complexity...based on the upperbounds of N: An average computer can perform around 10^7 operations per second.

N= ||||| Required Complexity

5000-6000 N^2

10^5 NlgN

10^7 N

Above 10^7
Cannot be done in time prop. to N...Try to do it in time prop. to some other const. with lesser upperbounds...EX: The Leaf Eaters (ICO Online Judge)



answered 26 Jan '15, 18:13

arpanb8's gravatar image

accept rate: 13%

edited 26 Jan '15, 18:14


It's 10^8, not 10^7 operations per second.

(26 Jan '15, 20:23) sandy9993★

@sandy999 Sorry, my bad...But linear time solutions don't seem to work when upper bounds of N are more than 10^7?!??!?!?!

(26 Jan '15, 23:50) arpanb83★

Might be high constant factor.

(27 Jan '15, 13:28) superty3★

Yeah dat might be

(27 Jan '15, 15:19) arpanb83★
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 26 Jan '15, 15:56

question was seen: 1,802 times

last updated: 02 Jun '16, 19:17