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

Re:1000 题新解

Posted by xinzhaoyang at 2018-08-06 10:23:07 on Problem 1000
In Reply To:1000 题新解 Posted by:xinzhaoyang at 2018-08-06 10:22:53
> #include <cstdio>
> #define abs(a) ((a)>(0)?(a):(-a))
> #define except(a,b) a/b
> #define ride(a,b) a*b
> #define reduce(a,b) a-b
> #define add(a,b) a+b
> #define Max(a,b) ((a)>(b)?(a):(b))
> #define Min(a,b) ((a)<(b)?(a):(b))
> using namespace std;
> int a,b,c,d,e;
> 
> void out()
> {
> 	printf("%d %d %d %d %d\n",a,b,c,d,e);
> }
> 
> int main()
> {
> 	scanf("%d %d",&a,&b);
> 	c=Max(a,b);
> 	d=Min(a,b);
> 	c=reduce(c,d);
> 	e=reduce(c,Max(a,b));
> 	c=ride(e,d);
> 	c=abs(c);
> 	d=ride(Max(a,b),Max(a,b));
> 	c=add(c,d);
> 	e=ride(2*a,b);
> 	e=add(c,e);
> 	d=add(a,b);
> 	e=except(e,d);
> 	printf("%d\n",e);
> }

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