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. 使用HttpClient发送GET请求

    HttpRequestMessage http_req_msg = new HttpRequestMessage(); http_req_msg.Method = HttpMethod.Get; ht ...

  2. Memcached内存管理模型分析

    Memcached 是一个高性能的分布式内存对象缓存系统,它通过在内存中缓存数据和对象来减少读取数据库的次数,从而减轻RDBMS的负担,提高服务的速度.提升可扩展性.本文将基于memcached1.4 ...

  3. 关于DCLP实现的单例模式的一些想法

    关于DCLP实现的单例模式的一些想法 我之前写过单例的文章( http://www.cnblogs.com/mkdym/p/4908644.html ),但是现在又有了一些想法,不想再在原来那篇文章上 ...

  4. TexturePacker文件的反向解析-TextureUnpacker

    最近在使用cocos2d-x做开发,其中会用到TexturePacker工具打包纹理文件,但是有时候想从打包好的.plist和.png大图文件反向生成原始的小图文件,TexturePacker好像没有 ...

  5. C++学习笔录4

    1.容器=数据结构+算法.相当于是为复杂的数据设计一种专门用于存放该数据的东西.用于开发中传递复杂的数据. 2.模版函数只能写在头文件中.不能单独做声明. 3.STL容器类分为三类: (1).顺序容器 ...

  6. 教师投票系统(JSP+MySQL)

    display.jsp <%@ page language="java" import="java.sql.*" pageEncoding="g ...

  7. zongjie

    $msg = $_GET['msg'];$startDate = $_POST['startDate'];$endDate = $_POST['endDate'];$quickdate = $_POS ...

  8. 轻量jquery框架之--组件交互基础设计

    概要 组件交互基础,即考虑在JQUERY对象下($)下扩展所有组件都需要用到的通用api,如ajax入口.对表单的操作.html片段加载.通用的配合datagrid通用的curd客户端对象等. 扩展a ...

  9. CSS布局部分知识总结

    一 切图 通过一个周的切图练习,我发现只有亲自动手后才能通过问题不断加深技术,要熟练掌握HTML页面编写时候时PHOTOSHOP操作. 以下一些知识点在网络布局时也是很重要的. 1.ul标签在谷歌.火 ...

  10. php error_log 详解

    定义和用法 error_log() 函数向服务器错误记录.文件或远程目标发送一个错误. 成功,返回 true,否则返回 false. error_log(error,type,destination, ...