1.Link:

http://poj.org/problem?id=3030

2.Content:

Nasty Hacks
Time Limit: 1000MS   Memory Limit: 65536K
Total Submissions: 12350   Accepted: 8537

Description

You are the CEO of Nasty Hacks Inc., a company that creates small pieces of malicious software which teenagers may use to fool their friends. The company has just finished their first product and it is time to sell it. You want to make as much money as possible and consider advertising in order to increase sales. You get an analyst to predict the expected revenue, both with and without advertising. You now 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, re and c. The first, r, is the expected revenue if you do not advertise, the second, e, is the expected revenue if you do advertise, and the third, c, is the cost of advertising. You can assume that the input will follow these restrictions: −106 ≤ re ≤ 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 most profitable to advertise or not, or whether it does not make any difference.

Sample Input

3
0 100 70
100 130 30
-100 -70 40

Sample Output

advertise
does not matter
do not advertise

Source

3.Method:

4.Code:

 #include<iostream>
using namespace std;
int main()
{
int i,n;
int r,e,c;
int result;
cin>>n;
for(i=;i<n;i++)
{
cin>>r>>e>>c;
result=e-c-r;
if(result>) cout<<"advertise"<<endl;
else if(result<) cout<<"do not advertise"<<endl;
else cout<<"does not matter"<<endl;
}
//system("pause");
return ; }

5.Reference:

Poj 3030 Nasty Hacks的更多相关文章

  1. HDOJ 2317. Nasty Hacks 模拟水题

    Nasty Hacks Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Tota ...

  2. HDOJ(HDU) 2317 Nasty Hacks(比较、)

    Problem Description You are the CEO of Nasty Hacks Inc., a company that creates small pieces of mali ...

  3. Nasty Hacks <入门练手题>

    Nasty Hacks Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total S ...

  4. HDU 2317 Nasty Hacks

    Nasty Hacks Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Tota ...

  5. 【转】POJ百道水题列表

    以下是poj百道水题,新手可以考虑从这里刷起 搜索1002 Fire Net1004 Anagrams by Stack1005 Jugs1008 Gnome Tetravex1091 Knight ...

  6. POJ解题经验交流

    感谢范意凯.陈申奥.庞可.杭业晟.王飞飏.周俊豪.沈逸轩等同学的收集整理.   题号:1003 Hangover求1/2+1/3+...1/n的和,问需多少项的和能超过给定的值 类似于Zerojudg ...

  7. 算法之路 level 01 problem set

    2992.357000 1000 A+B Problem1214.840000 1002 487-32791070.603000 1004 Financial Management880.192000 ...

  8. hdu2317Nasty Hacks

    Problem Description You are the CEO of Nasty Hacks Inc., a company that creates small pieces of mali ...

  9. dir命令只显示文件名

    dir /b 就是ls -f的效果 1057 -- FILE MAPPING_web_archive.7z 2007 多校模拟 - Google Search_web_archive.7z 2083 ...

随机推荐

  1. JAVA的StringBuffer类

    StringBuffer类和String一样,也用来代表字符串,只是由于StringBuffer的内部实现方式和String不同,所以StringBuffer在进行字符串处理时,不生成新的对象,在内存 ...

  2. dup和dup2函数

    下面两个函数都可用来复制一个现存的文件描述符: #include<unistd.h> int dup(int filedes); int dup2(int filedes,int file ...

  3. JavaScript 中 typeof 知多少?

    typeof运算符介绍:typeof 是一个一元运算,放在一个运算数之前,运算数可以是任意类型.它返回值是一个字符串,该字符串说明运算数的类型. 你知道下面typeof运算的结果吗? typeof(1 ...

  4. 信号之sleep函数

    #include <unistd.h> unsigned int sleep(unsigned int seconds); 返回值:0或未休眠够的秒数 此函数使调用进程被挂起,直到满足以下 ...

  5. 真机下, 如何在File Explorer里看data下的数据?

    首先手机得Root , 你如果想单个单个的看, root explorer可以设置Permission Other下的两个权限点上就ok了. 如果想看到所有的, 即子目录也可以看到, 只需要adb r ...

  6. 如何用eclispe远程调试tomcat--转载

    原文地址:http://jingyan.baidu.com/article/0320e2c1f4ef6b1b87507b06.html tomcat是一种非常常见的java web应用服务器,有时候服 ...

  7. 小白日记42:kali渗透测试之Web渗透-SQL盲注

    SQL盲注 [SQL注入介绍] SQL盲注:不显示数据库内建的报错信息[内建的报错信息帮助开发人员发现和修复问题],但由于报错信息中提供了关于系统的大量有用信息.当程序员隐藏了数据库内建报错信息,替换 ...

  8. PHP.1-网站开发概述

    网站开发概述 网站开发从本质来说,就是软件开发 1.B/S软件体系统结构 BS:浏览器与服务器的结构[降低客户端电脑的负荷,减轻维护成本,对CS的改进,可随时随地进行业务处理] #对美工要求比较高,注 ...

  9. Sequence用堆排序

    Description Given m sequences, each contains n non-negative integer. Now we may select one number fr ...

  10. Visual Studio Team Foundation Server 2015(TFS 秘钥、序列号)

    Visual Studio Team Foundation Server 2015 序列号:PTBNK-HVGCM-HB2GW-MXWMH-T3BJQ