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. HDU1013_Digital Roots【大数】【水题】

    Digital Roots Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) To ...

  2. OpenStack Magnum 项目简单介绍

    背景 Magnum 项目是 2014 年 11 月增加 OpenStack 的年轻项目,由 Rackspace主导发起,其定位是提供容器即服务(Container as a Service)的 API ...

  3. [连载]JavaScript讲义(04)--- 函数和闭包

    watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvamFja2ZydWVk/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA ...

  4. HDU3572 Task Schedule 【最大流】

    Task Schedule Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) To ...

  5. 获取文件属性信息之stat、fstat和lstat

    UNIX文件系统是目录和文件组成的一种层次结构.目录(directory)是一个包含许多目录项的文件,在逻辑上,可以认为每个目录项都包含一个文件名,同时还包含说明该文件属性的信息.文件属性是指文件类型 ...

  6. qt里标识操作系统的宏

    qt文件里的 windows的宏是Q_WS_WIN32/*   The window system, must be one of: (Q_WS_x) MACX     - Mac OS X      ...

  7. Helpers\Number

    Helpers\Number This helper has 2 methods for converting a number format and to get a percentage. Num ...

  8. python学习笔记概述

    第一次接触python是因为一个项目需要做自动化测试,因为各种限制没有使用QTP,选择了开源的比较流行的selenium,但如果只是靠selenium进行录制脚本.修改脚本这个很多时候没办法满足需求, ...

  9. myEclipse6.5与数据库(SQL Server2008)连接遇到的问题(自己总结的干货)<用SSH框架的时候,用servlet+javabean+jsp的时候>

    昨天因为学习SSH框架的搭建,时隔一年又重新遇到了myEclipse连接数据库的问题.废话不多说,上干货 (以下全部按照我遇到的问题的顺序,也就是没有顺序,就是任性) 请注意:这是在myEclipse ...

  10. C#编程实现DNS Client和Server(转)

    我们大多数人使用DNS主要是用于域名解析,近期有个特殊的需求:通过DNS协议传递特殊数据.翻遍互联网,最终找到了一个强大的C# DNS工具库  ARSoft.Tools.Net library ,感谢 ...