题目出处: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# 斯卡布罗集市(模拟)的更多相关文章

  1. yzoj P2344 斯卡布罗集市 题解

    共t条街对于每一条街上有n个店铺(n可能不相同),每次只能选两端第一个营业的店铺采购,采购第i个店铺会获得幸福度ai,采购完后,这个店铺和它相邻的店铺便会关门,问最大幸福度? 考场想了一下dp,一开始 ...

  2. codeforces 897A Scarborough Fair 暴力签到

    codeforces 897A Scarborough Fair 题目链接: http://codeforces.com/problemset/problem/897/A 思路: 暴力大法好 代码: ...

  3. 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 ...

  4. 英语音乐---一、Scarborough Fair

    英语音乐---一.Scarborough Fair 一.总结 一句话总结:斯卡布罗集市 <斯卡布罗集市>诉说了一个缠绵凄美的爱情故事:一个参军的男青年远离自己相爱的姑娘在战争中不幸遇难,但 ...

  5. 龙珠超·布罗利【MGRT&幻之】【720P】剧场版

    [上传]龙珠超·布罗利[MGRT&幻之][720P]剧场版 这是一个,全新的“赛亚人”故事.“力量大会”之后,和平的地球.悟空了解到宇宙中还存在着自己未曾见过的强者,于是每天都为了变得更强而不 ...

  6. 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 ...

  7. Scarborough Fair 绝美天籁

    很少见的男声唱法,而且还古色古香: https://www.youtube.com/watch?v=sgbo2QWLBzI https://www.youtube.com/watch?v=-BakWV ...

  8. 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 ...

  9. 罗大佑 光阴的故事 ZT 欧美经典歌曲100首(1-50)

    老俞 my idol ———————————————————————————————— 罗大佑 光阴的故事 歌曲光阴的故事为2008年入库,是罗大佑在2000-1-1发行的专辑<情歌精选> ...

随机推荐

  1. sql同时删除多个表的数据

    DELETE语句中指定多个表,根据多个表中的特定条件,从一个表或多个表中删除行. 不过,您不能在一个多表DELETE语句中使用ORDER BY或LIMIT. DELETE t1, t2 FROM t1 ...

  2. 使用navicat连接mysql8.0.12版本 出现client does not support。。。解决办法

    navicat版本的问题 出现连接失败的原因:mysql8 之前的版本中加密规则是mysql_native_password,而在mysql8之后,加密规则是caching_sha2_password ...

  3. web嵌入到原生的app里需要注意的事项

    1.https://www.cnblogs.com/shimily/articles/7943370.html 2.https://www.cnblogs.com/stoneniqiu/p/60771 ...

  4. PAT Advanced 1111 Online Map (30) [Dijkstra算法 + DFS]

    题目 Input our current position and a destination, an online map can recommend several paths. Now your ...

  5. LinkedList源码阅读笔记

    LinkedList LinkedList是双向链表,不循环(1.6之前循环),继承AbstractSequentialList类,实现了List, Deque, Cloneable接口. 链表的特点 ...

  6. 12 react 基础 的 css 过渡动画 及 动画效果 及 使用 react-transition-group 实现动画

    一. 过渡动画 # index.js import React from 'react';import ReactDOM from 'react-dom';import App from './app ...

  7. Java IO流操作 (II)

    缓冲流 /* * BufferedWriter:将文本写入字符输出流,缓冲各个字符,从而提供单个字符.数组和字符串的高效写入. * BufferedReader:从字符输入流中读取文本,缓冲各个字符, ...

  8. transform—3D立方体

    1.思路分析 第一步:首先需要一个大盒子,承载立方体的六个面: 第二步:立方体的六个面需要3D转化在特定的位置,拼接成一个立方体: 第三步:设置动画: 2.代码实现 第一步:创建div并且设置样式: ...

  9. python 用 pycharm 光速下载各种包

    https://blog.csdn.net/z1178517021/article/details/80200999 就是这么简单

  10. Window Mysql5.7免安装版配置

    1.下载mysql 5.7 32位:https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.19-win32.zip 5.7 64位:https ...