UVA 11369 - Shopaholic

Problem PDF

Solution:

#include
#include
#include
#include
#include
#include
#include
#include
#include
#include 
#include 
#include
#define ll long long
#define sc scanf
#define pf printf
#define Pi 2*acos(0.0)
using namespace std;
long long big(int a,int b )
{
return a>b;
}
int main()
{
    ll a[50000],t,n;
    sc("%lld",&t);
    while(t--)
    {
        sc("%lld",&n);
        for(int i=0;i
https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/11369/11369.cpp