| ||||||||||
| 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 | |||||||||
Re: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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator