| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
我的代码第一次贴,希望喜欢,仅供参考(当然是A的..)#include <stdio.h>
int main()
{
int n,m,c,a,b;
while(scanf("%d%d%d",&m,&n,&c)!=EOF)
{
if(!n&&!m&&!c) break;
a=m-7;
if(m<8) a=0;
b=n-7;
if(n<8) b=0;
printf("%d\n",c?(a*b+1)/2:a*b/2); //不管黑白,一律除以2..右下角是白色的多加个1.
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator