9年前的提高组。。。
by SW_Wind @ 2017-10-11 13:53:44
您好,其实这道题并不难,以下是我的代码(仅供参考):
```cpp
#include <cstdio>
#include <cstdlib>
#include <cstring>
int f[10]={6,2,5,5,4,5,6,3,7,6};
bool book[10];
int hc(int n)
{
if(n==0)
{
return f[0];
}
int ans=0;
while(n!=0)
{
ans+=f[n%10];
n/=10;
}
return ans;
}
int main()
{
int l=0,ans=0;
scanf("%d",&l);
memset(book,false,sizeof(book));
for(int i=0;i<=1111;i++)
{
for(int j=0;j<=1111;j++)
{
if(i!=j)
{
if(hc(i)+hc(j)+hc(i+j)+4==l)
{
ans++;
}
}
else if(i==j && book[i]==false)
{
book[i]=true;
if(hc(i)+hc(j)+hc(i+j)+4==l)
{
ans++;
}
}
}
}
printf("%d",ans);
return 0;
}
```
by Drinkkk @ 2017-10-11 14:00:50
您好,这道题,讲真,不难,模拟即可,并且本身就是几年前的提高组的水题(我没说其他题水)。
by DefFrancis @ 2017-10-11 14:03:42
这么水的题不1A不行哇
by λᴉʍ @ 2017-10-11 14:08:46
回这个帖子的都是红名大佬...
by misinclair @ 2017-10-11 14:28:07
我好像还蛙了一次//捂脸@[XZZ\_\_233](/space/show?uid=23118) .
by iotang @ 2017-10-11 14:28:18
@[杨奕辉](/space/show?uid=48989) 一道CTSC的题目,有42.4K通过,假的
by λᴉʍ @ 2017-10-11 14:33:53
@[XZZ\_\_233](/space/show?uid=23118) dalao您说的是A+B problem吧,那不是dinic模板题吗?
by IsaacOriGuo @ 2017-10-11 16:57:55
绿名破队形
by Frank06 @ 2017-10-18 12:47:23
可以打表的,啥也不用想
by bymlg001 @ 2017-10-19 19:05:18