```cpp
/*
ID:death_r2
TASK:friday
LANG:C++
*/
#include <map>
#include <vector>
#include <cstdio>
#include <string>
#include <iostream>
using namespace std;
#define reg register
inline bool leap(int x)
{
if(x % 100 == 0)
{
if(x % 400 == 0) return 1;
return 0;
}
if(x % 4 == 0) return 1;
return 0;
}
inline int getday(int x,int year)
{
if(x == 4||x == 6||x == 11||x == 9) return 30;
if(x == 2) return (leap(year)?29:28);
return 31;
}
int main()
{
//freopen("friday.in","r",stdin);
//freopen("friday.out","w",stdout);
int n,fi = 0,ans[8] = {};
scanf("%d",&n);
for(reg int i = 0;i < n;i++)
{
if(i) fi = (fi + (leap(i + 1990 - 1)?366:365)) % 7;
int day13 = (fi + 12) % 7;
for(reg int j = 1;j < 13;j++)
{
if(j == 1) ans[day13]++;
else {
day13 = (day13 + getday(j - 1,i + 1990)) % 7;
ans[day13]++;
}
//printf("[%d %d %d]\n",i + 1990,j,day13 + 1);
}
}
printf("%d %d",ans[5],ans[6]);
for(reg int i = 1;i < 6;i++) printf(" %d",ans[i - 1]);
putchar('\n');
return 0;
}
```
by resftlmuttmotw @ 2019-10-05 20:05:09
姑且改成这样还是错的
by resftlmuttmotw @ 2019-10-05 20:05:23
@[resftlmuttmotw](/space/show?uid=73992) 我懂了
by bellmanford @ 2019-10-05 20:25:10
@[resftlmuttmotw](/space/show?uid=73992) 你看错题了,是从1900年开始,不是1990年
谢谢
by bellmanford @ 2019-10-05 20:25:57
@[bellmanford](/space/show?uid=116015)
感谢!!
但是别拦我
我要从机房跳下去
by resftlmuttmotw @ 2019-10-05 20:27:37
@[resftlmuttmotw](/space/show?uid=73992) 没事,我也一样
~~我们一起跳~~
by bellmanford @ 2019-10-05 20:31:58
@[bellmanford](/space/show?uid=116015)
~~这算是殉情吗??~~
在不知道对方是男是女的情况下
还是不开车为好
by resftlmuttmotw @ 2019-10-05 20:35:41
。。。
by bellmanford @ 2019-10-05 20:36:51
@[bellmanford](/space/show?uid=116015)
那么问题来了
汉子
还是
妹子
(现在做题一遍A了(审题后))
by resftlmuttmotw @ 2019-10-05 20:53:31
@[resftlmuttmotw](/space/show?uid=73992) 和彩加一个性别。。。
by bellmanford @ 2019-10-05 20:55:21