897A. Scarborough Fair# 斯卡布罗集市(模拟)
生活随笔
收集整理的這篇文章主要介紹了
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-1;i<r;i++) if(s[i]==in) s[i] = out;}cout<<s;return 0; }?
轉載于:https://www.cnblogs.com/hello-OK/p/8052086.html
總結
以上是生活随笔為你收集整理的897A. Scarborough Fair# 斯卡布罗集市(模拟)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: .Net Core建站(1):EF Co
- 下一篇: 安装MariaDB和Apache