Problem 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, r, e 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 ≤ 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 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
#include<iostream>
#include<cstring>
#include<cstdio>
#include<cmath> using namespace std; int main()
{
int n;
cin>>n;
int i,j,k;
for(i = ;i<n;i++)
{
int a,b,c;
cin>>a>>b>>c;
if(a>b-c)
{
cout<<"do not advertise"<<endl;
}
else if(a == b-c)
{
cout<<"does not matter"<<endl;
}
else
{
cout<<"advertise"<<endl;
}
}
return ;
}

hdu2317Nasty Hacks的更多相关文章

  1. HDOJ 2317. Nasty Hacks 模拟水题

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

  2. CSS 代码技巧与维护 ★ Mozilla Hacks – the Web developer blog

    原文链接:https://hacks.mozilla.org/2016/05/css-coding-techniques/ 译文链接 :http://www.zcfy.cc/article/css-c ...

  3. 转:【总结】浏览器CSS Hacks汇总,浏览器兼容方式CSS Hacks

    [总结]浏览器CSS Hacks汇总   浏览器兼容可以说是前端开发所要面对的第一个挑战,目前我的电脑上已经安装了6种浏览器(基于IE内核的不算,如Maxthon等). CSS hacks利用浏览器的 ...

  4. D3D9 GPU Hacks (转载)

    D3D9 GPU Hacks I’ve been trying to catch up what hacks GPU vendors have exposed in Direct3D9, and tu ...

  5. Bit Twiddling Hacks

    http://graphics.stanford.edu/~seander/bithacks.html Bit Twiddling Hacks By Sean Eron Andersonseander ...

  6. Poj 3030 Nasty Hacks

    1.Link: http://poj.org/problem?id=3030 2.Content: Nasty Hacks Time Limit: 1000MS   Memory Limit: 655 ...

  7. 浏览器的CSS Hacks

    LZ注:此文原作者是:Paul Irish(Google的前端开发工程师),本文是原文的部分译文. 我不再使用CSS Hacks了,相反的是,我将使用IE的条件判断将类应用到body标签.   但是, ...

  8. 一些浏览器HACKS

    1.选择器HACKS /*IE6及以下*/            *html #uno{...} /*IE7*/                    *:first-child+html #dos{ ...

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

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

随机推荐

  1. RDLC添加链接

    <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdan ...

  2. 使用Apache JMeter进行SQL优化性能测试

    一. 前言 最近在公司里做性能测试,对于一张大概400万数据的表,进行全表扫描往往会比较费时,更不要说有若干这样的表格级联进行检索了.为了能够在不影响生产环境的前提下进行SQL的性能优化,需要首先利用 ...

  3. C#遍历数组

    Eg: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ...

  4. 安装setuptools和pip

    什么是setuptool和pip python的强大在于它有许许多多的包,当我们要用到这些包时,一个一个的从官网下载安装就太麻烦了,setuptools和pip就提供了下载安装第三方包的功能.pip是 ...

  5. 梯田(dfs)

    梯田 Time Limit: 2000 ms   Memory Limit: 256 MBTotal Submission: 26   Submission Accepted: 5   Descrip ...

  6. 海量数据处理利器greenplum——初识

    简介及适用场景 如果想在数据仓库中快速查询结果,可以使用greenplum. Greenplum数据库也简称GPDB.它拥有丰富的特性: 第一,完善的标准支持:GPDB完全支持ANSI SQL 200 ...

  7. 开机时候系统总是提醒Android系统更新

    今天刷了个android的rom,平常没有经常刷机,对这个也不是特别了解. 但是刷完开机,显示系统升级,一开始都是18个app,后来捣鼓了几次,安装了几个常用的软件,居开机的时候,升级的app需要90 ...

  8. 启动Activity,传递参数最佳实践

    优化后的好处不言而喻,OtherActivity中所需要的参数都在方法参数中体现,减少了交流询问的成本. (1)MainActivity.java OtherActivity.openActivity ...

  9. C 语言---漂亮的宏定义

    写好C 语言,漂亮的宏定义很重要,使用宏定义可以防止出错,提高可移植性,可读性,方便性等等.下面列举一些成熟软件中常用得宏定义. 1.防止一个头文件被重复包含 #ifndef COMDEF_H #de ...

  10. logstash grok 解析Nginx

    log_format main '$remote_addr [$time_local] "$request" ' '$request_body $status $body_byte ...