A. Nauuo and Votes

题目链接:http://codeforces.com/contest/1173/problem/A

题目

Nauuo is a girl who loves writing comments.

One day, she posted a comment on Codeforces, wondering whether she would get upvotes or downvotes.

It's known that there were xpersons who would upvote, yy  y persons who would downvote, and there were also another z persons who would vote, but you don't know whether they would upvote or downvote. Note that each of the x+y+z people would vote exactly one time.

There are three different results: if there are more people upvote than downvote, the result will be "+"; if there are more people downvote than upvote, the result will be "-"; otherwise the result will be "0".

Because of the z z   unknown persons, the result may be uncertain (i.e. there are more than one possible results). More formally, the result is uncertain if and only if there exist two different situations of how the z  z    persons vote, that the results are different in the two situations.

Tell Nauuo the result or report that the result is uncertain.

Input

The only line contains three integers x,y,z(0=<x,y,z<=100) x, corresponding to the number of persons who would upvote, downvote or unknown.

Output

If there is only one possible result, print the result : "+", "-" or "0".

Otherwise, print "?" to report that the result is uncertain.

Example

intput

3 7 0

output

-

题意

There are there numbers  , they are x , y and z.   you can give z to x and y,

if x are the most ,you can output "+",

if y are the most ,you can output "-",

if you are not sure which are the most,you should output "?".

思路

it's a easy problem,you can compare  a and b+c,b and a+c.

#include<bits/stdc++.h>
using namespace std;
int main()
{ int a,b,c;
while(cin>>a>>b>>c)
{
if(a==b&&c==)
cout<<<<endl;
else if(a>b+c)
cout<<"+"<<endl;
else if(b>a+c)
cout<<"-"<<endl;
else
cout<<"?"<<endl;
}
return ;
}

Codeforces Round #564 (Div. 2)A的更多相关文章

  1. Codeforces Round #564 (Div. 1)

    Codeforces Round #564 (Div. 1) A Nauuo and Cards 首先如果牌库中最后的牌是\(1,2,\cdots, k\),那么就模拟一下能不能每次打出第\(k+i\ ...

  2. Codeforces Round #564 (Div. 2) C. Nauuo and Cards

    链接:https://codeforces.com/contest/1173/problem/C 题意: Nauuo is a girl who loves playing cards. One da ...

  3. Codeforces Round #564 (Div. 2) B. Nauuo and Chess

    链接:https://codeforces.com/contest/1173/problem/B 题意: Nauuo is a girl who loves playing chess. One da ...

  4. Codeforces Round #564 (Div. 2) A. Nauuo and Votes

    链接:https://codeforces.com/contest/1173/problem/A 题意: Nauuo is a girl who loves writing comments. One ...

  5. Codeforces Round #564 (Div. 2)B

    B. Nauuo and Chess 题目链接:http://codeforces.com/contest/1173/problem/B 题目 Nauuo is a girl who loves pl ...

  6. Codeforces Round #564 (Div. 2) D. Nauuo and Circle(树形DP)

    D. Nauuo and Circle •参考资料 [1]:https://www.cnblogs.com/wyxdrqc/p/10990378.html •题意 给出你一个包含 n 个点的树,这 n ...

  7. Codeforces Round #564 (Div. 2)

    传送门 参考资料 [1]: the Chinese Editoria A. Nauuo and Votes •题意 x个人投赞同票,y人投反对票,z人不确定: 这 z 个人由你来决定是投赞同票还是反对 ...

  8. Codeforces Round #366 (Div. 2) ABC

    Codeforces Round #366 (Div. 2) A I hate that I love that I hate it水题 #I hate that I love that I hate ...

  9. Codeforces Round #354 (Div. 2) ABCD

    Codeforces Round #354 (Div. 2) Problems     # Name     A Nicholas and Permutation standard input/out ...

随机推荐

  1. C++继承经典样例

    c++继承经典样例 #include <iostream.h> class Base { private:         int b_number; public:         Ba ...

  2. OpenGL(十二) 纹理映射(贴图)

    OpenGL绘制纹理的步骤: 1. 开启纹理功能 使用glEnable(GL_TEXTURE_2D)开启2D纹理功能,使用glDisable(GL_TEXTURE_2D)关闭纹理,默认情况下纹理是关闭 ...

  3. 嵌入式Linux开发环境的搭建

    一个.制造u-boot.bin文件:    tar xjf u-boot-1.1.6.tar.bz2    cd u-boot-1.1.6    patch -p1 < ../u-boot-1. ...

  4. Entity framework 配置文件,实现类,测试类

    配置文件信息App.config: 数据库IP地址为192.168.2.186 ,数据库名为 Eleven-Six , 用户名 123456,密码654321 <?xml version=&qu ...

  5. 简化连接Buffer对象的过程

    上述一大段代码仅只完成了一件事情,就是连接多个Buffer对象,而这种场景需求将会在多个地方发生,所以,采用一种更优雅的方式来完成该过程是必要的.笔者基于以上的代码封装出一个bufferhelper模 ...

  6. glibc_error reporting

    很多GNU C库里的函数都会侦测并报告错误条件.我们的程序需要检测这些错误条件.比如:我们打开一个输入文件时需要判断该文件是否正确的打开.如果没有正确打开,我们需要打印错误或者采取其他正确的方式.为了 ...

  7. [WPF]获取控件间的相对位置

    原文:[WPF]获取控件间的相对位置 [WPF]获取控件间的相对位置                             周银辉 我们知道WPF有着比较灵活的布局方式,关于某个控件的坐标,Canv ...

  8. PySide——Python图形化界面入门教程(一)

    PySide——Python图形化界面入门教程(一) ——基本部件和HelloWorld 翻译自:http://pythoncentral.io/intro-to-pysidepyqt-basic-w ...

  9. Win8Metro(C#)数字图像处理--2.12Sobel边缘检测

    原文:Win8Metro(C#)数字图像处理--2.12Sobel边缘检测  [函数名称] 图像Sobel边缘检测函数SobelEdgeProcess(WriteableBitmap src) [ ...

  10. LINE_NO in format of XXXX example -> Line 10 is 0010

    select case when length(line_no) = 1 then to_char(line_no) when length(line_no) = 2 then '00' || lin ...