Detecting the Division at Run Time?

2 posts / 0 new
Last post
Carleton Coffrin
Detecting the Division at Run Time?

How can an algorithm detect which division it is participating in, so that it can set an appropriate time limit for computing solution1.txt?

Total votes: 71
Dr. Stephen Elbert
Detecting the Division (and time limit) at Run Time

Seven parameters are passed to each code as it is launched as explained on the Languages page. The fifth one is TimeLimitInSeconds and the sixth one is ScoringMethod

TimeLimitInSeconds = the amount of time before the execution will be terminated. The value is either 600 (10 minutes) for Divisions 1 & 3, or 2,700 (45 minutes) for Divisions 2 & 4 when executing Code1. The values for Code2 will be looser, intended only to stop runaway situations, and are yet to be determined; possibly 6,000 (100 minutes) or 27,000 (450 minutes) instead of 600 or 2,700 when executing Code1.

ScoringMethod = 1, 2, 3, or 4.  One indicates Objective Function Scoring for Division 1 will be used, two indicates Objective Function Scoring for Division 2 will be used, three  indicates Performance Profile Scoring for Division 3 will be used, and four indicates Performance Profile Scoring for Division 4 will be used.