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. C#获取QQ旋风的下载记录

    /* * 用户:从前的我 * 日期:2015/8/26 */ using System; using System.IO; namespace GetXf { class Program { publ ...

  2. 使用Spring JDBCTemplate简化JDBC的操作

    使用Spring JDBCTemplate简化JDBC的操作 接触过JAVA WEB开发的朋友肯定都知道Hibernate框架,虽然不否定它的强大之处,但个人对它一直无感,总感觉不够灵活,太过臃肿了. ...

  3. web前端中实现多标签页切换的效果

    在这里,实现多标签页效果的方法有两个,一个是基于DOM的,另一个是基于jquery的,此次我写的是一个对于一个电话套餐的不同,显示不同的标签页 方法一: 首先,我们要把页面的大体框架和样式写出来,ht ...

  4. x^2+y^2=N的整数解?

    本文系转载:http://blog.sina.com.cn/s/blog_a661ecd50101cv41.html 我们先研究这个问题的一部分:哪些素数是两平方数之和?为什么我们先研究素数,有个很重 ...

  5. js前台获取list的demo

    后台 bannerlist=homePageService.searchBanner(bannerVO); // 注意这里的Gson的构建方式为GsonBuilder,区别于test1中的Gson g ...

  6. Measuring Lengths in Baden

    Description Measuring Lengths in Baden time limit per test: 2 seconds memory limit per test: 256 meg ...

  7. PHP标记

    1. xml风格 <?php echo 'ok'; ?> 推荐风格 2. 简短风格 <? echo 'ok'; ?> 限制条件:在配置文件中启用short_open_tag选项 ...

  8. 在wpf中如何让MediaElement的视频循环播放

    原文:在wpf中如何让MediaElement的视频循环播放 MediaElement原始的播放是只播放一遍:如何设置让MediaElement播放 的视频或者音频循环播放,解决如下: 修改Media ...

  9. SDL显示内存中的图像

    <textarea readonly="readonly" name="code" class="c++"> #include ...

  10. magento后台登陆后,没任何提示,又跳转到登陆页面

    这个问题通常是cookie配置的问题.需要去将core_config_data中web/cookie/cookie_path.web/cookie/cookie_domain设为null