807A Is it rated?
来源:互联网 发布:淘宝怎么1元秒杀 编辑:程序博客网 时间:2024/06/04 18:12
#include<iostream>#include<vector>#include<string>#include<set>#include<map>#include<algorithm>#include<queue>#include<list>#include<stack>#include<cstdio>#include<fstream>#include<numeric>#include<functional>#include<utility>#include<memory>#include<iomanip>using namespace std;int n;typedef struct person{int before;int after;}person;int main(){while (cin >> n){vector<person> arr;bool rated = false, unrated = false, maybe = false;for (int i = 0; i < n; i++){person temp;cin >> temp.before >> temp.after;if (temp.before != temp.after) rated = true;arr.push_back(temp);}if (rated){cout << "rated" << endl;continue;}int min_num = arr[0].before;for (int i = 1; i < n; i++){if (arr[i].before > min_num){unrated = true;}else{min_num = arr[i].before;}}if (unrated){cout << "unrated" << endl;continue;}else{cout << "maybe" << endl;}}return 0;}
阅读全文
0 0
- 807A Is it rated?
- codeforces 807A Is it rated?
- Codeforces807 A. Is it rated?
- CF#807 A. Is it rated?(水题)
- 小白题解 Codeforces 807A Is it rated?
- 0526 CF#807A&G2n#F Is it rated
- Codeforces Round #412 A. Is it rated?
- Is It A Tree?
- Is it a tree?
- Is It A Tree?
- Is It A Tree?
- Is It A Tree?
- is it a prime
- Is It A Tree?
- Is It A Tree?
- Is It A Tree?
- Is It A Tree?
- Is It A Tree?
- Slim中使用Controller
- Valgrind总结(1) —— 概述
- jsp^jstl&el
- POJ2549_Sumsets_
- 【数据结构】中的计数排序(CountSort)
- 807A Is it rated?
- POJ 1276 Cash Machine 笔记
- pycaffe的使用一
- 杂篇之3-C++的输入与输出
- 事务&MVC&反射
- 【matlab】三维图画法-以卫星测高波形数据为例
- Android——UI(二):Paint的基本使用
- 大数据征信应用与启示 ——以美国互联网金融公司 ZestFinance为例
- 虚函数 纯虚函数 虚继承资料整理