#include<bits/stdc++.h>
using namespace std;
int NoLeap[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};//365
int Leap[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};//366
bool isLeapyear(int x){
if((x%4==0 && x%100!=0) || x%400==0) return true;
else return false;
}
...