897A. Scarborough Fair# 斯卡布罗集市(模拟)
生活随笔
收集整理的這篇文章主要介紹了
897A. Scarborough Fair# 斯卡布罗集市(模拟)
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
題目出處:http://codeforces.com/problemset/problem/897/A
題目大意:將某個(gè)范圍內(nèi)的某個(gè)字符換成另外一個(gè)字符
#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-1;i<r;i++) if(s[i]==in) s[i] = out;}cout<<s;return 0; }?
轉(zhuǎn)載于:https://www.cnblogs.com/hello-OK/p/8052086.html
總結(jié)
以上是生活随笔為你收集整理的897A. Scarborough Fair# 斯卡布罗集市(模拟)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: .Net Core建站(1):EF Co
- 下一篇: 安装MariaDB和Apache