Skip to content

Instantly share code, notes, and snippets.

'''
https://www.codechef.com/MALI2017/problems/MAXCOST
Sample Input1:
5
1
3
1
5
2
'''
Note: you must have following dependencies to run this program
If you have pip installed, you can easily install some libraries
like beautifulsoup4, lxml which are required for this program.
sudo pip install beautifulsoup4
sudo pip install lxml
lxml is a parser and beautiful soup uses that parser to parse webpages.
/*
*
* If you want you can combine both in single
* function so that you can reduce some code.
* I have done it as per my requirements.
* Never mind about Hash map and all other stuff.
* input parameter contains result string from trailers Request from api
* and passed to it.
*
*/