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

但是好像并没有什么用,反而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. CNN结构:用于检测的CNN结构进化-分离式方法

    前言: 原文链接:基于CNN的目标检测发展过程       文章有大量修改,如有不适,请移步原文. 参考文章:图像的全局特征--用于目标检测 目标的检测和定位中一个很困难的问题是,如何从数以万计的候选 ...

  2. semiautomatic annotated tools

    在进行实验图像取样时,可能会用到大量的标签样本,拍摄大量图片进行手工标注要消耗大量时间,半自动化的标注工具可以节省一些时间. 原文链接:http://blog.sina.com.cn/s/blog_6 ...

  3. Delphi 不用标题栏移动窗体

    procedure TxxxxForm.FormMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: I ...

  4. HDU_1517_博弈(巧妙规律)

    A Multiplication Game Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Ot ...

  5. Bem命名

    BEM思想 1. 什么是BEM: BEM:(Block块,Element元素,Modifier修饰符)一种命名规范, 其核心思想是将页面拆分成一个个独立的富有语义的块(blocks),从而使得团队在开 ...

  6. javaee utf-8文件的转换

    package Zy; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.Fil ...

  7. eas启动服务器时非法组件

    EAS实例启动报系统中存在非法组件,实例启动失败:   组件检查机制,要求除了 $EAS_HOME eas\server\lib: $EAS_HOME \eas\server\deploy\files ...

  8. FusionCharts,双折线图和双柱状图

    一个电商项目中,用到了"双柱状图",对比 当前库存和累计库存. 网上找了好几个贴子,才找到具体用法. 代码整理下,以备不时之需. 效果图-双折线图 效果图-双柱状图 <%@ ...

  9. laravel5 文件上传

    <!DOCTYPE html><html lang="zh-CN"><head> {{--设置字符编码--}} <meta charset ...

  10. BZOJ 2085 luogu P3502 [POI2010]Hamsters (KMP、Floyd、倍增)

    数组开小毁一生-- 题目链接: https://www.lydsy.com/JudgeOnline/problem.php?id=2085 这题在洛谷上有个条件是"互不包含",其实 ...