From 5aff1f3cc95d86d57c8ba3abbd2b97648e67e8e7 Mon Sep 17 00:00:00 2001 From: githubgood Date: Tue, 15 Apr 2014 10:21:39 +0800 Subject: [PATCH] 1178 --- 1178 | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 1178 diff --git a/1178 b/1178 new file mode 100644 index 0000000..96f86e0 --- /dev/null +++ b/1178 @@ -0,0 +1,57 @@ +#include +#include +#include +#include +using namespace std; +struct info +{ + int a; + int b; +}; +bool cmp(const info &x,const info &y) +{ + if(x.a*x.a+x.b*x.b==y.a*y.a+y.b*y.b) + return x.b>y.b; + else + return x.a*x.a+x.b*x.bv; + info in; + int m,p,q; + while(cin>>m) + { + getchar(); + while(m--) + { + gets(a); + s=a; + if(s=="Pop") + { + if(v.size()==0) + { + cout<<"empty"<