×

# How To Use The Test Cases?

 0 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 3★ishoo 5●4 accept rate: 0%

 0 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. answered 26 Jan '15, 16:18 3★popoya 16●1 accept rate: 100% 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★
 0 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>>> answered 26 Jan '15, 18:13 3★arpanb8 120●1●3●12 accept rate: 13% 2 It's 10^8, not 10^7 operations per second. (26 Jan '15, 20:23) sandy9992★ @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 community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• 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:

×394
×358
×197
×116
×69

question asked: 26 Jan '15, 15:56

question was seen: 2,449 times

last updated: 02 Jun '16, 19:17