POJ 3030. Nasty Hacks Simulated water problem

Source: Internet
Author: User

Nasty Hacks
Time Limit: 1000MS Memory Limit: 65536K
Total Submissions: 13136 Accepted: 9077

Description


You are the CEO of Nasty Hacks Inc., a company, creates small pieces of malicious software which teenagers fool their friends. The company had just finished their first product and it was time to sell it. You want to make as much money as possible and consider advertising in order to increase sales. You get a analyst to predict the expected revenue, both with and without advertising. You are want to make a decision as to whether you should advertise or not, given the expected revenues.

Input

The input consists of n cases, and the first line consists of one positive integer giving N. The next n lines each contain 3 integers, r, e and C. The first, R, is the expected revenue if-do not-advertise, the second, e, is the expected revenue if You do advertise, and the third, C, are the cost of advertising. Can assume that the input would follow these restrictions:−106≤ R, e ≤106 and 0≤ C ≤106 .

Output

Output one line for each test case: ' Advertise ', ' do not advertise ' or ' does not matter ', presenting whether it is the most PR Ofitable to advertise or not, or whether it does do any difference.

Sample Input

30 100 70100 130 30-100-70 40

Sample Output

Advertisedoes not Matterdo not advertise

Source

Nordic 2006 Source: >      This is a simple simulated water problem, the same topic has hdoj 2317, POJ 3030.
The main idea is to say, let's make a decision, or advertise. Give 3 numbers, R,e,c, where R represents the expected benefit of not advertising, E represents the expected gain of advertising, and C represents the cost of advertising. It would be nice to compare the proceeds (advertising revenue-advertising costs) with the benefits of not advertising.
1#include <iostream>2 using namespacestd;3 intMain ()4 {5     intN, R, E, C;6Cin>>N;7      while(n--)8     {9Cin>>r>>e>>C;Ten         if(r<e-c) cout<<"Advertise"<<Endl; One         Else if(r>e-c) cout<<"Do not advertise"<<Endl; A         Elsecout<<"does not matter"<<Endl; -     } -     return 0; the}
by Black Storm (using for Notes)

POJ 3030. Nasty Hacks simulated water problem

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.