本来兴致勃勃的想乘着这一次上紫,于是很早很早的到了机房

但是好像并没有什么用,反而rating-=47

Codeforces Round #438(Div.1+Div.2)

今天就这样匆匆的总结一下,心情不好qaq

首先是 A.Bark to Unlock

启示:(1)不能直接把char数组进行比较!!!

(2)读题要读清,不能漏读条件!!!

 #include<bits/stdc++.h>
using namespace std;
int bo[][],n;
string s,t;
int main(){
cin>>s;
scanf("%d",&n); cin>>t;
bo[][t[]-'a']=; bo[][t[]-'a']=;
if (bo[][s[]-'a']&&bo[][s[]-'a']||bo[][s[]-'a']&&bo[][s[]-'a']){
printf("YES"); return ;
}
for (int i=;i<=n;++i){
cin>>t;
if (s==t){
printf("YES"); return ;
}
bo[][t[]-'a']=; bo[][t[]-'a']=;
if (bo[][s[]-'a']&&bo[][s[]-'a']){
printf("YES"); return ;
}
}
printf("NO");
}

然后是 B. Race Against Time

总之我的做法时先把时针,分针,秒针在秒意义下的位置,进行排序

然后把t1和t2也转化成相同状态,最后判断t1和t2分别在哪个位置

大概就是这样

 #include<bits/stdc++.h>
using namespace std;
int h,m,s,t1,t2,s1,s2,s3,a1,a2;
int main(){
cin>>h>>m>>s>>t1>>t2;
s1=*(h%)+*m+s; s2=*m+*s; s3=*s;
a1=*(t1%); a2=*(t2%);
if(s1>s2)swap(s1,s2); if(s2>s3)swap(s2,s3); if(s1>s2)swap(s1,s2);
if(a1>a2)swap(a1,a2); bool bo=;
if(s1<=a1&&a2<=s2|| s2<=a1&&a2<=s3)bo=;
if(a2<=s1||a1>=s3)bo=; if(a1<=s1&&a2>=s3)bo=;
if(bo) puts("YES"); else puts("NO");
}

最后只希望今天的CF我的rating不会掉吧,上紫我的水平可能还不够吧

Codeforces Round #438 (Div.1+Div.2) 总结的更多相关文章

  1. Educational Codeforces Round 60 (Rated for Div. 2) - C. Magic Ship

    Problem   Educational Codeforces Round 60 (Rated for Div. 2) - C. Magic Ship Time Limit: 2000 mSec P ...

  2. Educational Codeforces Round 60 (Rated for Div. 2) - D. Magic Gems(动态规划+矩阵快速幂)

    Problem   Educational Codeforces Round 60 (Rated for Div. 2) - D. Magic Gems Time Limit: 3000 mSec P ...

  3. Educational Codeforces Round 43 (Rated for Div. 2)

    Educational Codeforces Round 43 (Rated for Div. 2) https://codeforces.com/contest/976 A #include< ...

  4. Educational Codeforces Round 35 (Rated for Div. 2)

    Educational Codeforces Round 35 (Rated for Div. 2) https://codeforces.com/contest/911 A 模拟 #include& ...

  5. Codeforces Educational Codeforces Round 44 (Rated for Div. 2) F. Isomorphic Strings

    Codeforces Educational Codeforces Round 44 (Rated for Div. 2) F. Isomorphic Strings 题目连接: http://cod ...

  6. Codeforces Educational Codeforces Round 44 (Rated for Div. 2) E. Pencils and Boxes

    Codeforces Educational Codeforces Round 44 (Rated for Div. 2) E. Pencils and Boxes 题目连接: http://code ...

  7. Educational Codeforces Round 63 (Rated for Div. 2) 题解

    Educational Codeforces Round 63 (Rated for Div. 2)题解 题目链接 A. Reverse a Substring 给出一个字符串,现在可以对这个字符串进 ...

  8. Educational Codeforces Round 39 (Rated for Div. 2) G

    Educational Codeforces Round 39 (Rated for Div. 2) G 题意: 给一个序列\(a_i(1 <= a_i <= 10^{9}),2 < ...

  9. Educational Codeforces Round 48 (Rated for Div. 2) CD题解

    Educational Codeforces Round 48 (Rated for Div. 2) C. Vasya And The Mushrooms 题目链接:https://codeforce ...

随机推荐

  1. 创建dml触发器

    -实现删除学生信息时把该学生的成绩记录全部清空 --判断触发器是否存在 if exists(select * from sysobjects where name = 'delete_student' ...

  2. SQLite 的使用

    private void button1_Click(object sender, EventArgs e) { //查询数据库内容并绑定 string sql= "select* from ...

  3. apicloud常用分享方法

    app中经常会有分享的功能,不管是分享商品还是文字还是图片或者是发送给微信好友扣扣好友,一下做一总结. 分享的样式(分享所有的样式模块):MNActionButton. 在apicloud 中添加这个 ...

  4. Apex语言(四)选择(决策)结构

    1.选择结构 选择结构是当满足某个条件或不满足某个条件时,需要进行决策以控制执行的流程. 2.if语句 if语句由布尔表达式后跟一个或多个语句组成. [格式] if(条件表达式){ 语句: } [流程 ...

  5. BZOJ 3531: [Sdoi2014]旅行 权值线段树 + 树链剖分

    Description S国有N个城市,编号从1到N.城市间用N-1条双向道路连接,满足 从一个城市出发可以到达其它所有城市.每个城市信仰不同的宗教,如飞天面条神教.隐形独角兽教.绝地教都是常见的信仰 ...

  6. kernel学习单

    lock (spin_lock, mutex, rw_mutex/spinlock) waitqueue, tasklet, softIRQ, hardIRQ basic struct (atomic ...

  7. 【JavaScript高级进阶】JavaScript变量/函数提升的细节总结

    // 测试1 console.log('----------test1--------------'); console.log(global); // undefined var global = ...

  8. [51Nod 1218] 最长递增子序列 V2 (LIS)

    传送门 Description 数组A包含N个整数.设S为A的子序列且S中的元素是递增的,则S为A的递增子序列.如果S的长度是所有递增子序列中最长的,则称S为A的最长递增子序列(LIS).A的LIS可 ...

  9. Linux之浅谈VIM常见用法及原理图

    本次归纳以强大的VIM文本处理工具常见用法去展开论述. 文本编辑种类:       行编辑器:sed       全屏编辑器:nano,vi        vim - Vi改进 其他编辑器:     ...

  10. Ubuntu Server下docker实战 02: docker进阶配置

    在上一篇文章里<Ubuntu Server下docker实战 01: 安装docker>,我们已经把docker安装起来了,并运行了一个hello-world 这一篇,我们继续讲进阶配置. ...