| 20 | return 0; |
| 21 | } |
| 22 | void solve() |
| 23 | { |
| 24 | long long int typesOfFood, shops, price, people, max=0, temp; |
| 25 | cin>>typesOfFood; |
| 26 | for(int i=0;i<typesOfFood;i++) |
| 27 | { |
| 28 | cin>>shops>>people>>price; |
| 29 | temp = people/(shops+1)*price;//shops +1 because a new shop will be created by chef |
| 30 | if(temp>max)//Because we need to maximise profit |
| 31 | max=temp; |
| 32 | } |
| 33 | cout<<max<<"\n"; |
| 34 | } |