897A. Scarborough Fair# 斯卡布罗集市(模拟)
题目出处:http://codeforces.com/problemset/problem/897/A
题目大意:将某个范围内的某个字符换成另外一个字符
#include<iostream>
using namespace std;
int main(){
int n,m;
cin>>n>>m;
string s;
cin>>s;
while(m--){
int l,r;
char in,out;
cin>>l>>r>>in>>out;
for(int i=l-;i<r;i++) if(s[i]==in) s[i] = out;
}
cout<<s;
return ;
}
897A. Scarborough Fair# 斯卡布罗集市(模拟)的更多相关文章
- yzoj P2344 斯卡布罗集市 题解
共t条街对于每一条街上有n个店铺(n可能不相同),每次只能选两端第一个营业的店铺采购,采购第i个店铺会获得幸福度ai,采购完后,这个店铺和它相邻的店铺便会关门,问最大幸福度? 考场想了一下dp,一开始 ...
- codeforces 897A Scarborough Fair 暴力签到
codeforces 897A Scarborough Fair 题目链接: http://codeforces.com/problemset/problem/897/A 思路: 暴力大法好 代码: ...
- Codeforces Round #449 (Div. 2)-897A.Scarborough Fair(字符替换水题) 897B.Chtholly's request(处理前一半) 897C.Nephren gives a riddle(递归)
A. Scarborough Fair time limit per test 2 seconds memory limit per test 256 megabytes input standard ...
- 英语音乐---一、Scarborough Fair
英语音乐---一.Scarborough Fair 一.总结 一句话总结:斯卡布罗集市 <斯卡布罗集市>诉说了一个缠绵凄美的爱情故事:一个参军的男青年远离自己相爱的姑娘在战争中不幸遇难,但 ...
- 龙珠超·布罗利【MGRT&幻之】【720P】剧场版
[上传]龙珠超·布罗利[MGRT&幻之][720P]剧场版 这是一个,全新的“赛亚人”故事.“力量大会”之后,和平的地球.悟空了解到宇宙中还存在着自己未曾见过的强者,于是每天都为了变得更强而不 ...
- Codeforces Round #449 (Div. 2) A. Scarborough Fair【多次区间修改字符串】
A. Scarborough Fair time limit per test 2 seconds memory limit per test 256 megabytes input standard ...
- Scarborough Fair 绝美天籁
很少见的男声唱法,而且还古色古香: https://www.youtube.com/watch?v=sgbo2QWLBzI https://www.youtube.com/watch?v=-BakWV ...
- Python matplotlib numpy 曼德尔布罗特集合 曼德尔布罗特 B.Madelbrot
import numpy as np import matplotlib.pyplot as plt def mandelbrot(h,w,maxit=20): y,x = np.ogrid[-1.4 ...
- 罗大佑 光阴的故事 ZT 欧美经典歌曲100首(1-50)
老俞 my idol ———————————————————————————————— 罗大佑 光阴的故事 歌曲光阴的故事为2008年入库,是罗大佑在2000-1-1发行的专辑<情歌精选> ...
随机推荐
- 四、CI框架之通过URL路径访问C中的函数
一.在C中写一个test001函数 二.在路径http://127.0.0.1/CodeIgniter-3.1.10/index.php/welcome/test001中访问 不忘初心,如果您认为这篇 ...
- 数组空值empty
Array构造函数只带一个数字参数时(否则是作为填充),该参数会被作为数组的预设长度,而非填充一个元素,因此数组内是空单元 如果一个数组中存在一个空单元,即length的值大于实际单元数,这样的数组称 ...
- JAVA函数库
1. 文件相关 1.1 判断目录是否存在 public static boolean dictionaryExist(String path) { File file = new File(path) ...
- 1.softmax初探
1.softmax初探在机器学习尤其是深度学习中,softmax是个非常常用而且比较重要的函数,尤其在多分类的场景中使用广泛.他把一些输入映射为0-1之间的实数,并且归一化保证和为1,因此多分类的概率 ...
- nginx重写常用写法
1.将http协议重写成https协议: (用户用http进行访问,但后端是https),则可添加80 http端口监听,然后进行https rewrite; server { listen ...
- Go get unrecognized import path "gopkg.in/yaml.v2"
安装gin: go get -u github.com/gin-gonic/gin 出现错误: package gopkg.in/yaml.v2: unrecognized import path & ...
- 基于python的爬虫流程图(精简版)
网址: https://www.processon.com/view/link/5e1148b8e4b07db4cfa9cf34 如果链接失效,请及时反馈(在评论区评论),博主会及时更新
- VNC viewer 无法打开oracle 11g图形界面方案
VNC viewer 无法打开oracle 11g图形界面方案 1.检查交换空间失败 检查交换空间:可用的交换空间为35MB,所需的交换空间为150MB.未通过 创建swapfile: root权限下 ...
- PAT Advanced 1053 Path of Equal Weight (30) [树的遍历]
题目 Given a non-empty tree with root R, and with weight Wi assigned to each tree node Ti. The weight ...
- [极客大挑战 2019]Secret File
0x00知识点 没有过滤file 使用php的file伪协议去读取文件 ?file=php://filter/convert.base64-encode/resource=flag.php 0x01解 ...