Submission #881312

#TimeUsernameProblemLanguageResultExecution timeMemory
881312DanetCrossing (JOI21_crossing)C++14
26 / 100
1698 ms7344 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...