#include <queue>
#include <cmath>
#include <cstdio>
#include <string>
#include <vector>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
#define mem(n,v) memset(n,v,sizeof(n))
#define ll long long
using namespace std;
const int inf=1<<29;
int main()
{
ios::sync_with_stdio(false);
system("pause");
return 0;
}
给定一天,计算星期几。
int CaculateWeekDay(int y,int m, int d)
{
if(m==1||m==2) {
m+=12;
y--;
}
int iWeek=(d+2*m+3*(m+1)/5+y+y/4-y/100+y/400)%7;
return iWeek+1;
}