S001-AC.cc 720 Bytes
#include <iostream>
#include <string>

using namespace std;

string day_of_the_week(int d, int m, int y)
{
	m -= 2;
	if(m < 1)
	{
		m += 12;
		y--;
	}
	int c = y / 100;
	int a = y - c*100;
	int f = (int)(2.6*m - 0.2) + d + a + (int)(a/4) + (int)(c/4) - 2*c;
	f %= 7;
	if(f < 0)
	{
		f += 7;
	}
	switch(f)
	{
		case 0:
			return "Sunday";
			break;
		case 1:
			return "Monday";
			break;
		case 2:
			return "Tuesday";
			break;
		case 3:
			return "Wednesday";
			break;
		case 4:
			return "Thursday";
			break;
		case 5:
			return "Friday";
			break;
		case 6:
			return "Saturday";
			break;
	}
}

int main()
{
/*
	int d,m,y;
	cin >> d;
	cin >> m;
	cin >> y;
	cout << day_of_the_week(d,m,y) << endl;
	return 0;
*/
}