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!

Suppose you’re solving COVERING from the INOI Practice Server. First extract covering-data.zip 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.in > 5.out

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

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

Cheers.

You can use > without < and vice-versa…

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)

ALL THE BEST>>>

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

2 Likes

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

Might be high constant factor.

Yeah dat might be

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

that’s r8 @ketanhwr