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 ...
随机推荐
- 三报文握手 四报文握手 TCP运输连接管理
三报文握手 四报文握手 TCP运输连接管理
- debug_backtrace
<?php one(); function one() { two(); } function two() { three(); } function three() { print_r( de ...
- C#开发问题汇总
问题1:HTTP 错误 500.21 - Internal Server Error处理程序“NickLeeCallbackHandler”在其模块列表中有一个错误模块“ManagedPipeline ...
- Windows Server 2012 R2服务器部署Tomcat JDK、安装Mysql以及将Java项目部署到CVM
我们平时所调试的Java Web 项目需要在本地Eclipse或者MyEclipse当中开发调试,并且部署到Tomcat上来测试,比如说笔者这里用的eclipse添加tomcat服务器, 但是这里发布 ...
- 解读socketserver源码
解读python中SocketServer源码 再看继承 真正的大餐来之前,还是来点儿开胃菜!回顾一下关于类的继承的知识: 我们先看上面的代码,这是一个简单的类继承,我们可以看到父类Base和子 ...
- mysql--实现oracle的row_number() over功能
有时候我们想要得到每个分组的前几条记录,这个时候oracle中row_number函数使用非常方便,但可惜mysql没有.网上搜了些实现方法. 表flow_task有phaseno(序列号),obje ...
- DS1-13
#include <stdio.h> #define MAXSIZE 10000 int Max3(int A, int B, int C); int DivideAndConquer(i ...
- setup FTP server on CentOS 7
Setup FTP Server on CentOS 7 Install vsftpd vsftpd (Very Secure File Transport Protocol Daemon) is a ...
- parcel 在js中导入 html 文件
parcel不支持将html文件导入为字符串,如果您对parcel使用熟练,直接使用 parcel-plugin-phtml 插件即可,此插件使用 .phtml 后缀 为什么用parcel? 因为从我 ...
- vue2.x入坑总结—回顾对比angularJS/React的一统
从感性的角度讲,我是不屑于用VUE,觉得react套件用起来更顺手,但是vue现在越来火,所以也不得入vue(杂烩汤)的坑.vue/anguarJS/React,三者对关系现在就是: https:// ...