UVa 10050

From Algorithmist
Jump to navigation Jump to search

10050 - Hartals[edit]


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


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


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[edit]


solution by erfanashorion[edit]

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