VK Cup 2017 - Wild Card Round 2

Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
775 VK Cup 2017 - Wild Card Round 2 FINISHED False 604800 283271085 April 26, 2017, 3:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 0 ) A University Schedule PROGRAMMING *special 2900

In this problem your task is to come up with a week schedule of classes in university for professors and student groups. Consider that there are 6 educational days in week and maximum number of classes per educational day is 7 (classes numerated from 1 to 7 for each educational day). It is known that in university n students study, m professors work and there are a classrooms for conducting classes. Also you have two-dimensional array with n × m size which contains the following information. The number which stays in i -th row and j -th column equals to the number of classes which professor j must conduct with the group i in a single week. The schedule which you output must satisfy to array described above. There are several other conditions for schedule. Single professor can not conduct more than one class. Similarly, single student group can not be on more than one class at the same time. Let define a fatigue function for professors and student groups. Call this function f . To single professor fatigue calculated in the following way. Let look on classes which this professor must conduct in each of the 6 -th educational days. Let x be the number of class which professor will firstly conduct in day i and let y — the last class for this professor. Then the value (2 + y - x + 1)·(2 + y - x + 1) must be added to professor's fatigue . If professor has no classes in day i , nothing is added to professor's fatigue . For single student group fatigue is calculated similarly. Lets look at classes of this group in each of the 6 educational days. Let x be the number of first class for this group on day i and let y — the last class for this group. Then the value (2 + y - x + 1)·(2 + y - x + 1) must be added to this group's fatigue . If student group has no classes in day i , nothing is added to group's fatigue . So the value of function f equals to total {fatigue} for all n student groups and for all m professors. Your task is to come up with such a schedule which mi

Tutorials

Submissions

No solutions yet.