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. ListHelper

    using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data; ...

  2. 0119——UITextField

    1.默认文本  _loginTextField.placeholder = @"QQ号/手机"; 2.设置边框 _loginTextField.borderStyle = UITe ...

  3. struts2的工作机制

    struts2的工作机制 原文:http://eoasis.iteye.com/blog/642586 概述 本章讲述Struts2的工作原理. 读者如果曾经学习过Struts1.x或者有过Strut ...

  4. Centos安装php提示virtual memory exhausted: Cannot allocate memory

    由于内存不够,需要在php配置的时候./configure最后添加上 --disable-fileinfo >>./configure --prefix= ...........   -- ...

  5. 12个非常有用的JavaScript小技巧

    在这篇文章中将给大家分享12个有关于JavaScript的小技巧.这些小技巧可能在你的实际工作中或许能帮助你解决一些问题. 使用!!操作符转换布尔值 有时候我们需要对一个变量查检其是否存在或者检查值是 ...

  6. php正则验证sql方注入

    <?php function inject_check($Sql_Str) {//自动过滤Sql的注入语句. $check=preg_match('/select|insert|update|d ...

  7. Redis 入门之编译安装

    Redis是一个开源的使用ANSI C语言编写.支持网络.可基于内存亦可持久化的日志型.Key-Value数据库,并提供多种语言的API.从2010年3月15日起,Redis的开发工作由VMware主 ...

  8. query通用开源框架

    Jquery通用开源框架之[ejq.js] 简介 ejq是一款非常小巧的JS工具库,未压缩才50K,在jquery的基础上对jquery缺失部分作了很好的弥补作用. 优点: 1.具有内置的模板解析引擎 ...

  9. mysql 执行reset master 风险

    reset master 会把mysql实例上的所以二进制日志删除,并且日志序列从1开始:这样会引起两个问题. 001.问题一 slave 由于找不到下一个要执行的事件所以会报错.进一步master- ...

  10. WPF笔记(1.1 WPF基础)——Hello,WPF!

    原文:WPF笔记(1.1 WPF基础)--Hello,WPF! Example 1-1. Minimal C# WPF application// MyApp.csusing System;using ...