This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O3")
#define tof_io ios_base::sync_with_stdio(false);cin.tie(0) , cout.tie(0);
#define double long double
//#define int long long
#define pb push_back
#define all(x) x.begin(),x.end()
#define endl '\n'
const int mod = 1e9+7; //998244353
const long long inf = 1e18;
const int N = 200000 + 23;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
int l[N];
int r[N];
char c[N];
void cm(string a , string b)
{
if(a == b) cout << "Yes";
else cout << "No";
cout << endl;
}
int32_t main()
{
int n;
cin >> n;
string a ;
cin >> a >> a >> a;
int q;
cin >> q;
string t;
cin >> t;
cm(a, t);
int i = 0;
while(q--)
{
cin >> l[i] >> r[i];
cin >> c[i];
fill(t.begin() + l[i] - 1, t.begin() + r[i] , c[i]);
if(a == t) cout << "Yes";
else cout << "No";
cout << endl;
i++;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |