UVA 11559 - Event Planning

UVA Sep 01, 2020

Problem PDF

Solution:

#include
int main()
{
    long frnd,bud,hotel,week,amount,cost=15000000,b,p,visit,i,j,room;
    while(scanf("%ld%ld%ld%ld",&frnd,&bud,&hotel,&week)==4)
    {
        for(i=0;i=frnd)
                {
                    p=amount*frnd;
                    if(cost>p)
                    cost=p;
                }
            }
        }
            if(cost>bud)
            printf("stay home\n");
            else
            printf("%ld\n",cost);
            cost=15000000;


        }

    return 0;
}
//khub valo laglo problem ta kore........
https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/11559/11559.cpp

Tags

Shipu Ahamed

CSPO® | Partly Product, Project Manager and Partly Software Engineer.

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.