题目出处: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. mybatis的插入数据后的主键获取

    为什么要在插入数据后获取主键:当有一个订单表和订单详情表,当插入订单表的数据后,需要在订单详情表插入该订单的具体购物情况,订单详情表需要的一个列是订单表的主键或者订单ID.(通俗讲:A表的主键是B表的 ...

  2. WEB一周总结(1)待补充

    1.网页设计作业--小组介绍 图片来自https://weibo.com/hxLMo?sudaref=www.baidu.com&display=0&retcode=6102 2.WE ...

  3. 基于百度语音识别API的Python语音识别小程序

    一.功能概述 实现语音为文字,可以扩展到多种场景进行工作,这里只实现其基本的语言接收及转换功能. 在语言录入时,根据语言内容的多少与停顿时间,自动截取音频进行转换. 工作示例: 二.软件环境 操作系统 ...

  4. java基础二 分支循环

    分支循环:    if...    if...else...    if...else if...    if...else if...else...    switch...case...defau ...

  5. h5-全屏插件

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  6. Maven:Failed to read artifact descriptor for xxx

    Maven多模块项目jar包引用问题: Failed to execute goal on project xxx-service: Could not resolve dependencies fo ...

  7. Springboot过滤器注解简笔

    对多个过滤的注解      @WebFilter(filterName="FirstFilter",urlPatterns={"*.do","*.js ...

  8. Java连载70-冒泡算法、选择算法

    一.冒泡排序 1.也就是依次选出最大的放在最后面 package com.bjpowernode.java_learning; ​ public class D70_1_BubbleSort { pu ...

  9. 编译seastar

    1. 下载代码 git clone https://github.com/scylladb/seastar.git cd seastar git submodule update --init --r ...

  10. os简介

    1. 操作系统(Operation System,OS) 操作系统作为接口的示意图  没有安装操作系统的计算机,通常被称为 裸机 如果想在 裸机 上运行自己所编写的程序,就必须用机器语言书写程序 如 ...