标签:代码 std for ret targe def get 链接 while
题目链接: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 }
Codeforces 1173A Nauuo and Votes
标签:代码 std for ret targe def get 链接 while
原文地址:https://www.cnblogs.com/Carered/p/11182374.html