Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

发一个ws代码

Posted by angela_channg at 2011-03-23 21:52:59 on Problem 2411
In Reply To:25行代码流出 Posted by:Sayakiss at 2010-08-09 18:51:37
#define P 3.1415926535898
#define F(x) x*x
main(){int i,j,n,m;double s,t;while (scanf("%d%d",&n,&m),n){if (n*m%2){puts("0");continue;}t=pow(2,n*m/2);s=1;n++;m++;for (i=1;i<n;i++)for (j=1;j<m;j++)s*=F(cos(i*P/n))+F(cos(j*P/m));s=pow(s,.25);printf("%.0lf\n",s*t);}}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator