UVa 10050 - Hartals

Summary
Simulate the hartal strikes given the number of days, the number of political parties, and the hartal parameter of each party.

Explanation

 * Simulate each party and count the number of strikes over the number of days excluding friday and saturday.

Optimizations
For each party if h(i) is divisible by another h(j) discard that h(i). '''Another Tricks: Just Count the columns which has atleast one hartal. The hartal days are multiplier of hartal parameters. '''

Solution by shawon
http://shawonruet.blogspot.com/2016/07/uva-10050-hartals.html

solution by erfanashorion
download c++ solution on:(http://s2.picofile.com/file/7122018816/10050.cpp.html) my email:erfanashorion@gmail.com