From cbb857dbde6d849dd3cc692969da3a96dac499a9 Mon Sep 17 00:00:00 2001 From: Poornapragna Mathh <54894632+poornapragna877@users.noreply.github.com> Date: Thu, 1 Oct 2020 09:10:07 +0530 Subject: [PATCH] Update 160.cxx updated 160.cxx made handy with macro --- 160.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/160.cxx b/160.cxx index 7765331..60a1c55 100644 --- a/160.cxx +++ b/160.cxx @@ -24,14 +24,15 @@ #include using namespace std; +#define fo(x,n) for(int x = 0; x < n; x++) int main() { int n,i,sum=0,t=0,c=0; cin >> n; int a[n]; - for(i=0;i> a[i]; - sum=sum+a[i]; + sum+=a[i]; } sort(a,a+n); for(i=n-1;t<=(sum/2);i--){