|
- #include<iostream>
- #include<cmath>
- #include<iomanip>
- using namespace std;
- int i,j,n,b,c,day;
- double s,maxs=0,p,k;
- bool a[367]={};
- char data[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
- int main()
- {
- cin>>n;
- for(i=1;i<=n;i++)
- {
- day=0;
- cin>>b>>c;
- for(j=1;j<b;j++)
- day+=data[j];
- day+=c;
- a[day]=1;
- }
- for(i=1;i<=366;i++)
- {
- if(a[i]==1)s=0;
- else s++;
- if(s>maxs)maxs=s;
- }
- k=maxs/366*3600*24;
- cout<<fixed<<setprecision(0)<<k;
- return 0;
- }
复制代码 |
|