转战Atcoder,这场比赛的名字看起来就很有趣的样子,很盛大的感觉,那当然赶紧来玩玩
A - Takahashi Calendar
思路:定义新日历算法,求特定日子数
典型的签到题,当然是直接在新日历上跑一遍即可
#include <bits/stdc++.h>
using namespace std;
int main()
{
int mm,dd;
scanf("%d%d",&mm,&dd);
int sum = 0;
for(int m=1;m<=mm;m++)
{
for(int d=1;d<=dd;d++)
{
int d1 = d%10;
int d10 = d/10;
if(d1>=2&&d10>=2&&d1*d10==m)
sum++;
}
}
printf("%d\n",sum);
return 0;
}
B - Kleene Inversion
思路:看似一个很复杂的逆序对问题,立刻