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 ...
随机推荐
- java实现数据库连接的工具类
第一种 (带事务) package com.china.util; import java.sql.Connection; import java.sql.DriverManager; import ...
- Codeforces Round #401 (Div. 1) C(set+树状数组)
题意: 给出一个序列,给出一个k,要求给出一个划分方案,使得连续区间内不同的数不超过k个,问划分的最少区间个数,输出时将k=1~n的答案都输出 比赛的时候想的有点偏,然后写了个nlog^2n的做法,T ...
- [codeforces] 17E Palisection
原题 题目要求相交的回文串对数,这显然非常难,但是要有一种正难则反的心态,求不出来相交的,求出来不相交的不就好了! 对于每以位置i结尾的字符串,在他后面与他不相交的就是以这个位置为结尾的个数和以这个位 ...
- [Leetcode] Remove duplicates from sorted list 从已排序的链表中删除重复元素
Given a sorted linked list, delete all duplicates such that each element appear only once. For examp ...
- [Leetcode] Binary tree maximum path sum求二叉树最大路径和
Given a binary tree, find the maximum path sum. The path may start and end at any node in the tree. ...
- Phaser的timer用法
1. 延迟timer,相当于setTimeout game.time.events.add(Phaser.Timer.SECOND*5,this.delayOver,this); 2. 循环timer ...
- 解决IE下页面空白或者报错:[vuex] vuex requires a Promise polyfill in this browser
[vuex] vuex requires a Promise polyfill in this browser 上述错误的原因是不支持 Promise 方法,导致页面出现空白无法加载. 解决方法如下: ...
- 防恶意解析,禁止用IP访问网站的Apache设置
一般来说,网站可以用域名和IP来访问.你的网站可以通过IP直接访问,本来这没什么问题,但是会有些隐患: 由于搜索引擎也会收录你的IP地址的页面,所以同一个页面搜索引擎会重复收录,造成页面的权重不如单个 ...
- 7月21号day13总结
今天学习过程和小结 学习了hive中的数据类型以及hive的简单查询, 学习了sqoop version用sqoop导入导出数据. 主要用于在Hadoop(Hive)与传统的数据库(mysql.pos ...
- white-space——处理元素内的空白
定义和用法 white-space 属性设置如何处理元素内的空白.这个属性声明建立布局过程中如何处理元素中的空白符.值 pre-wrap 和 pre-line 是 CSS 2.1 中新增的. 默认 ...