AC日记——Is it rated? codeforces 807a
思路:
水题;
代码:
#include <cstdio>
#include <cstring> using namespace std; int n,a[],b[],last=; int main()
{
scanf("%d",&n);
for(int i=;i<=n;i++)
{
scanf("%d%d",&a[i],&b[i]);
if(a[i]!=b[i])
{
printf("rated");
return ;
}
}
for(int i=;i<=n;i++)
{
if(a[i]>a[i-])
{
printf("unrated");
return ;
}
}
printf("maybe");
return ;
}
AC日记——Is it rated? codeforces 807a的更多相关文章
- AC日记——Dynamic Problem Scoring codeforces 807d
Dynamic Problem Scoring 思路: 水题: 代码: #include <cstdio> #include <cstring> #include <io ...
- AC日记——Sign on Fence Codeforces 484e
E. Sign on Fence time limit per test 4 seconds memory limit per test 256 megabytes input standard in ...
- AC日记——Sagheer, the Hausmeister codeforces 812b
812B - Sagheer, the Hausmeister 思路: 搜索: 代码: #include <cstdio> #include <cstring> #includ ...
- AC日记——Sagheer and Crossroads codeforces 812a
812A - Sagheer and Crossroads 思路: 模拟: 代码: #include <cstdio> #include <cstring> #include ...
- Ac日记——Distances to Zero codeforces 803b
803B - Distances to Zero 思路: 水题: 代码: #include <cstdio> #include <cstring> #include <i ...
- AC日记——Mice and Holes codeforces 797f
797F - Mice and Holes 思路: XXYXX: 代码: #include <cmath> #include <cstdio> #include <cst ...
- AC日记——Roma and Poker codeforces 803e
803E - Roma and Poker 思路: 赢或输或者平的序列: 赢和平的差的绝对值不得超过k: 结束时差的绝对值必须为k: 当“?”时可以自己决定为什么状态: 输出最终序列或者NO: dp( ...
- AC日记——Periodic RMQ Problem codeforces 803G
G - Periodic RMQ Problem 思路: 题目给一段序列,然后序列复制很多次: 维护序列很多次后的性质: 线段树动态开点: 来,上代码: #include <cstdio> ...
- AC日记——Andryusha and Socks Codeforces 780a
A. Andryusha and Socks time limit per test 2 seconds memory limit per test 256 megabytes input stand ...
随机推荐
- [剑指Offer] 30.连续子数组的最大和
题目描述 HZ偶尔会拿些专业问题来忽悠那些非计算机专业的同学.今天测试组开完会后,他又发话了:在古老的一维模式识别中,常常需要计算连续子向量的最大和,当向量全为正数的时候,问题很好解决.但是,如果向量 ...
- [剑指Offer] 18.二叉树的镜像
题目描述 操作给定的二叉树,将其变换为源二叉树的镜像. 输入描述: 8 / \ 6 10 / \ / \ 5 7 9 11 镜像二叉树 8 / \ 10 6 / \ / \ 11 9 7 5 [思路1 ...
- 使用JSON数据格式模拟股票实时信息
JQueryStock.html <!DOCTYPE html> <head> <meta charset="UTF-8"> <title ...
- hdu 1285 确定比赛名次 (拓扑)
确定比赛名次 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Subm ...
- NOIP临考经验【转】
NOIP临考经验 1.提前15分钟入场,此时静坐调整心态,适当的深呼吸 2.打开编辑器并调整为自己喜欢的界面 3.熟悉文件目录,写好准确无误的代码模板 4.压缩包或许还不能解压,但是文件名已经可以知道 ...
- fzu 2246(ac 自动机)
fzu 2246(ac 自动机) 题意: 某一天YellowStar学习了AC自动机,可以解决多模式匹配问题.YellowStart当然不会满足于此,它想进行更深入的研究. YellowStart有一 ...
- [Leetcode] Reorder list 重排链表
Given a singly linked list L: L 0→L 1→…→L n-1→L n,reorder it to: L 0→L n →L 1→L n-1→L 2→L n-2→… You ...
- 如何加快JavaScript的加载与执行
JS 有个很无语的阻塞特性,就是当浏览器在执行JS 代码时,不能同时做其他任何事情,无论其代码是内嵌的还是外部的. 浏览器在碰到一个引入外部JS 文件的<script>标签时会停下所有工作 ...
- bzoj 5092 [Lydsy1711月赛]分割序列 贪心高维前缀和
[Lydsy1711月赛]分割序列 Time Limit: 5 Sec Memory Limit: 256 MBSubmit: 213 Solved: 97[Submit][Status][Dis ...
- (转)Django常用命令
转自GoodSpeed,http://www.cnblogs.com/cacique/archive/2012/09/30/2709145.html . . . . .