/**************************************************************
*
* Sample solution for the Moving Piano problem in contest 2002
*
* Author: A. Björklund & M-P. Pettersson
* Description: Sweep from day 1 to 100 and greedily undertake
* move jobs according to the following rule:
* Among the jobs which are left that may be performed
* the present day, choose the ones whose intervals' end day is
* earliest. This is the optimal strategy.
*
**************************************************************/
#define WED(x) (((x) % 7)>=5)
#define MAX_DAYS (100)
int Weeks[MAX_DAYS*MAX_DAYS];
int Weeks2[MAX_DAYS*MAX_DAYS];
void clearweeks()
{
int i,j;
for (i=0;i