当时晚上打CF时候比较晚,加上是集训期间的室友都没有晚上刷题的习惯,感觉这场CF很不在状态.A题写复杂WA了一发后去厕所洗了个脸冷静了下,换个简单写法,可是用cin加了ios::sync_with_stdio(false)还是WA了,真无语.B题读半天题,读懂后轻松A了,看了下比赛时间就快结束了,把C题读了一遍后,感觉能做,最后还是选择了睡觉23333..................

A题大意:
平平平 增平减 ,缺任一都可,判断是否为这样的数列

#include<stdio.h>
#include<cmath>
#include<string.h>
#include<iostream>
#include<algorithm>
#define INF 0x3f3f3f3f
using namespace std;
#define maxn 1005
#define inf 0x3f3f3f3f
int main()
{
int n,a[maxn];
while(~scanf("%d",&n))
{
for(int i=1;i<=n;i++) scanf("%d",&a[i]);
a[n+1]=inf;
int p=2;
while(a[p]>a[p-1]) p++;
while(a[p]==a[p-1]) p++;
while(a[p]<a[p-1]) p++;
if(p>n) printf("YES\n");
else printf("NO\n");
}
return 0;
}

B题大意:
就是题目意思不好理解而已QAQ

给出三个字符串,其中第一和第二字符串长度都为26,在第三个字符串每个字符
若在第一个字符串找到相同的英文字母,则将第二个字符串中对应的英文字母打
印(注意大小写即可),若无对应,则将直接打印TwT

#include<stdio.h>
#include<cmath>
#include<cstring>
#include<stdlib.h>
#include<iostream>
#include<algorithm>
#define INF 0x3f3f3f3f
using namespace std;
#define maxn 1005
char a[maxn],b[maxn],c[maxn];
int main()
{
while(~scanf("%s%s%s",a,b,c))
{
int len1=strlen(a),len2=strlen(c),p;
for(int i=0;i<len2;i++)
{
if(c[i]>='a'&&c[i]<='z')
{
for(int j=0;j<len1;j++)
if(a[j]==c[i]) {p=j;break;}
printf("%c",b[p]);
}
else if(c[i]>='A'&&c[i]<='Z')
{
for(int j=0;j<len1;j++)
if(a[j]==c[i]+32) {p=j;break;}
printf("%c",b[p]-32);
}
else printf("%c",c[i]);
}
printf("\n");
}
return 0;
}

  

Codeforces Round #424 (Div. 2, rated, based on VK Cup Finals)A B题的更多相关文章

  1. Codeforces Round #424 (Div. 2, rated, based on VK Cup Finals)

    http://codeforces.com/contest/831 A. Unimodal Array time limit per test 1 second memory limit per te ...

  2. Codeforces Round #424 (Div. 2, rated, based on VK Cup Finals) Problem C (Codeforces 831C) - 暴力 - 二分法

    Polycarp watched TV-show where k jury members one by one rated a participant by adding him a certain ...

  3. Codeforces Round #424 (Div. 2, rated, based on VK Cup Finals)A,B,C

    A:链接:http://codeforces.com/contest/831/problem/A 解题思路: 从前往后分别统计递增,相等,递减序列的长度,如果最后长度和原序列长度相等那么就输出yes: ...

  4. Codeforces Round #424 (Div. 2, rated, based on VK Cup Finals) Problem F (Codeforces 831F) - 数论 - 暴力

    题目传送门 传送门I 传送门II 传送门III 题目大意 求一个满足$d\sum_{i = 1}^{n} \left \lceil \frac{a_i}{d} \right \rceil - \sum ...

  5. Codeforces Round #424 (Div. 2, rated, based on VK Cup Finals) Problem D (Codeforces 831D) - 贪心 - 二分答案 - 动态规划

    There are n people and k keys on a straight line. Every person wants to get to the office which is l ...

  6. Codeforces Round #424 (Div. 2, rated, based on VK Cup Finals) Problem E (Codeforces 831E) - 线段树 - 树状数组

    Vasily has a deck of cards consisting of n cards. There is an integer on each of the cards, this int ...

  7. Codeforces Round #424 (Div. 2, rated, based on VK Cup Finals) Problem A - B

    Array of integers is unimodal, if: it is strictly increasing in the beginning; after that it is cons ...

  8. Codeforces Round #424 (Div. 2, rated, based on VK Cup Finals) A 水 B stl C stl D 暴力 E 树状数组

    A. Unimodal Array time limit per test 1 second memory limit per test 256 megabytes input standard in ...

  9. Codeforces Round #424 (Div. 2, rated, based on VK Cup Finals) - D

    题目链接:http://codeforces.com/contest/831/problem/D 题意:在一个一维坐标里,有n个人,k把钥匙(钥匙出现的位置不会重复并且对应位置只有一把钥匙),和一个终 ...

随机推荐

  1. 【java8】慎用java8的foreach循环

    虽然java8出来很久了,但是之前用的一直也不多,最近正好学习了java8,推荐一本书还是不错的<写给大忙人看的javase8>.因为学习了Java8,所以只要能用到的地方都会去用,尤其是 ...

  2. java编程之泛型

    java泛型实现了"参数化类型"的概念,所谓"参数化类型"是指将操作的数据类型指定为一个参数,这点在容器中用的最多,例如:List<String> ...

  3. NopCommerce(3.9)作业调度插件

    NopCommerce(3.9)作业调度插件视频教程录制完成,下面是插件源码下载地址和插件视频教程下载地址:插件下载地址: http://www.nopcommerce.com/p/2752/jobs ...

  4. 第39篇 免费博客github Pages绑定域名

    原文地址:http://blog.laofu.online/2017/06/02/how-bind-domain/ 网站已经有了,需要对网站来绑定一个自己的个性域名,本人是买了一个阿里云的域名,也就是 ...

  5. 点评阿里JAVA手册之MySQL数据库 (建表规约、索引规约、SQL语句、ORM映射)

    下载原版阿里JAVA开发手册  [阿里巴巴Java开发手册v1.2.0] 本文主要是对照阿里开发手册,注释自己在工作中运用情况. 本文内容:MySQL数据库 (建表规约.索引规约.SQL语句.ORM映 ...

  6. cursor 属性

    鼠标 样式 default 默认光标(通常是一个箭头) auto 默认.浏览器设置的光标. crosshair 光标呈现为十字线. pointer 光标呈现为指示链接的指针(一只手) move 此光标 ...

  7. 生成JSON数据--官方方法

    官方生成方法: 1)需要什么就给什么,要属性就给属性,要对象就给对象,要集合就给集合 2)添加都是使用put()方法 要求: 1.生成如下JSON数据: {"age":4,&quo ...

  8. 推荐五款Android 应用的自动化测试工具

    如今自动化测试已经应用到每天的测试中.这不足为奇,因为自动化测试在测试过程中节约了时间,还能避免包括人为因素造成的测试错误和遗漏. 自动化测试工具选择很多.一些是开源的,一些非常贵.一些自动化工具是几 ...

  9. 加载jquery插件注意了

    1.尽量放在</body>之前,不要放在</head>标签之前,如果执意要放也要放在css之后,例如: <link href="style.css" ...

  10. docker- 构建 oracle2c-r2(12.2.0.1) 的镜像

    需求 由于公司要数据库需要使用新的oracle版本(12c-r2 ->12.2.0.1),需要从之前的oracle11g迁移到12c.所以,我们今天就先来介绍一下如何构建oracle12c的镜像 ...