Two pipes A and B can fill a tank with water in 30 minutes and 45 minutes respectively. The water pipe C can empty the tank in 36 minutes. First A and B are opened . After 12 minutes C is opened. Total time (in minutes) in which the tank will be filled up is:
1). 30
2). 12
3). 36
4). 24