Educational Codeforces Round 48 (Rated for Div. 2)
http://codeforces.com/contest/1016
A.
没想到这个也会TLE,太粗心了
B.
暴力就好了,多情况讨论又出错...
为什么我做了那么多讨论,原因是没注意这个: 标记 最后一个字符,同时注意 l+m-3.
特殊情况就
vis 0000011111111111112
s1 abaccabaacabacabacca 红色的地方是 l 和 r ,为了防止在 l 处计数多了就得 l + m - 3
s2 abacca
- we[s+m-1]++;
 - we[r-1]-we[l+m-3]
 
string类的find()函数总结
string::size_type pos=;
while((pos=s1.find(s2,pos))!=string::npos)
{
vis[pos+]=pos+;
pos++;
}
Educational Codeforces Round 48 (Rated for Div. 2)的更多相关文章
- Educational Codeforces Round 48 (Rated for Div. 2) CD题解
		
Educational Codeforces Round 48 (Rated for Div. 2) C. Vasya And The Mushrooms 题目链接:https://codeforce ...
 - Educational Codeforces Round 48 (Rated for Div. 2) B 1016B Segment Occurrences (前缀和)
		
B. Segment Occurrences time limit per test 2 seconds memory limit per test 256 megabytes input stand ...
 - Educational Codeforces Round 48 (Rated for Div. 2)异或思维
		
题:https://codeforces.com/contest/1016/problem/D 题意:有一个 n * m 的矩阵, 现在给你 n 个数, 第 i 个数 a[ i ] 代表 i 这一行所 ...
 - Educational Codeforces Round 48 (Rated for Div. 2)——A. Death Note ##
		
A. Death Note time limit per test 2 seconds memory limit per test 256 megabytes input standard input ...
 - Educational Codeforces Round 48 (Rated for Div. 2)G. Appropriate Team
		
题意:求满足条件的(i,j)对数:\(gcd(v,a_i)=x,lcm(v,a_j)=y\) 题解:\(x|a_i,a_j|y\),\(x|y\),考虑质因子p,假设a_i中p次数为a,x中次数为b, ...
 - Educational Codeforces Round 48 (Rated for Div. 2) D 1016D Vasya And The Matrix (构造)
		
D. Vasya And The Matrix time limit per test 2 seconds memory limit per test 256 megabytes input stan ...
 - 【Educational Codeforces Round 48 (Rated for Div. 2) C】 Vasya And The Mushrooms
		
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 显然在没有一直往右走然后走到头再往上走一格再往左走到头之前. 肯定是一直在蛇形走位.. 这个蛇形走位的答案贡献可以预处理出来.很容易 ...
 - 【Educational Codeforces Round 48 (Rated for Div. 2) D】Vasya And The Matrix
		
[链接] 我是链接,点我呀:) [题意] 告诉你每一行.每一列的异或和. 让你求出一个符合要求的原矩阵. [题解] 显然应该有 a1^a2^....^an = b1^b2^....^bn 也即两边同时 ...
 - [Educational Codeforces Round 81 (Rated for Div. 2)]E. Permutation Separation(线段树,思维,前缀和)
		
[Educational Codeforces Round 81 (Rated for Div. 2)]E. Permutation Separation(线段树,思维,前缀和) E. Permuta ...
 
随机推荐
- Yocto和Android编译命令的简化和自动完成的实现
			
简化编译命令 无论是在Android编译系统中,还是在Yocto编译系统中,要编译一个目标,输入命令都有点费事. Yocto系统: source setup-environment $FOLDER b ...
 - JavaWeb的学习路线
			
JavaWeb的学习路线 一.BS结构 B/S结构(Browser/Server,浏览器/服务器模式),是WEB兴起后的一种网络结构模式,WEB浏览器是客户端最主要的应用软件.这种模式统一了客户端,将 ...
 - numpy(四)
			
逻辑符 : == != < > <= >= x=np.array([1,3,5]) x<3 array([True,False,,False]) (2*x) == ...
 - Timestamp “时间戳” - 术语
			
A timestamp is a sequence of characters or encoded information identifying when a certain event occu ...
 - Freemaker Replace函数的正则表达式运用
			
replace(param1,param2,param3) param1 正则表达式:param2 将匹配的字符替换成指定字符:param3 模式 param3 参数如下 模式 i r m ...
 - Ipython使用指南
			
一.简介 2001年,Fernando Perez为了得到一个更为高效的交互式Python解释器而启动的一个项目,IPython不仅仅是一个加强版的shell,他可以直接进行绘图操作的GUI控制台,一 ...
 - C++实验二——函数重载、函数模板、简单类的定义和实现
			
一.实验过程 函数重载编程练习 实验要求:编写重载函数add(),实现对int型,double型,complex型数据的加法.在main函数中定义不同类型的数据,调用测试. 代码实现: 先是简单的体验 ...
 - window系统下搭建本地的NuGet Server
			
1. NuGet.Config文件所在的目录: C:\Users\xxx\AppData\Roaming\NuGet 2.将nupkg为结尾的文件放在 项目的Packages目录下.(注意是和web. ...
 - 获取Button脚本挂载的事件名
			
(function(){ var Super = function(){}; Super.prototype = cc.Button.prototype; //实例化原型 Super.prototyp ...
 - egg.js异步请求数据
			
之前已经简单的使用egg-init初始化项目,并创建控制器controller和服务service 在实际项目中, service主要负责数据的请求,并处理(http请求) controll主要负责获 ...