博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Codeforces 832B: Petya and Exam
阅读量:7027 次
发布时间:2019-06-28

本文共 749 字,大约阅读时间需要 2 分钟。

暴力模拟。。好好读题就好了。。羡慕英语好的

#include
using namespace std;typedef long long LL;bool vis[150];string t;string p,p1;int q;bool ok(string t){ if(t.length()
p.length(); l++) if(vis[t[i+l]]) return false; } else return false; } if(t.length()-l+1!=p.length()) return false; return true; }}int main(){ while(cin>>t) { memset(vis,0,sizeof(vis)); p1.clear(); for(int i=0; i
>p; for(int i=0; i
>q; while(q--) { cin>>t; if(ok(t)) puts("YES"); else puts("NO"); } }}

 

转载于:https://www.cnblogs.com/Just--Do--It/p/7236857.html

你可能感兴趣的文章
Node.js process 模块解读
查看>>
Lodash源码分析-compact.js
查看>>
度小满牵手南京银行打造”AI鑫”计划:银行零售业掀起变革运动
查看>>
微信小程序之分享海报生成
查看>>
敏捷AI|NLP技术在宜信业务中的实践「背景篇」
查看>>
布局结束检测工具
查看>>
[MetalKit]21-What's-new-in-graphics-and-games-at-WWDC-2016
查看>>
html2canvas在vue下的巨坑
查看>>
从设计师和开发的角度使用 lottie
查看>>
iOS之自定义tabBar
查看>>
Spring boot学习(三) Spring boot整合mybatis
查看>>
Redux 源码深度解析(附带视频1月14号上传)
查看>>
理解webpack原理,手写一个100行的webpack
查看>>
Node.js & Express 项目基本搭建
查看>>
掌握 MySQL 这 19 个骚操作,效率至少提高3倍
查看>>
【跃迁之路】【744天】程序员高效学习方法论探索系列(实验阶段501-2019.3.6)...
查看>>
用于大数据测试、学习的测试数据
查看>>
Software System Analysis and Design | 1
查看>>
JavaScript函数式编程,真香之组合(一)
查看>>
JavaScript链式调用实例浅析
查看>>