Codeforces 1173A Nauuo and Votes
题目链接:http://codeforces.com/problemset/problem/1173/A
思路:模拟。
AC代码:
1 #include<bits/stdc++.h>
2 using namespace std;
3 int main()
4 {
5 int x,y,z;
6 while(cin >> x >> y >> z)
7 {
8 if(x == y)
9 {
10 if(z == 0) cout << 0 << endl;
11 else cout << "?" << endl;
12 }
13 else if(x > y)
14 {
15 if(x - y > z) cout << "+" << endl;
16 else cout << "?" << endl;
17 }
18 else
19 {
20 if(y - x > z) cout << "-" << endl;
21 else cout << "?" << endl;
22 }
23 }
24 return 0;
25 }
转载于//www.cnblogs.com/Carered/p/11182374.html
还没有评论,来说两句吧...