제출 #925360

#제출 시각아이디문제언어결과실행 시간메모리
925360De3b0oCrossing (JOI21_crossing)C++14
0 / 100
47 ms2280 KiB
#include<bits/stdc++.h> #define ll long long #define F first #define S second #define in insert #define er erase #define pb push_back #define ppb pop_back() #define ph push #define pp pop() #define d3 ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define cans cout << ans << "\n"; #define yes cout << "YES" << "\n"; #define no cout << "NO" << "\n"; #define pll pair<ll,ll> #define lin cout << "\n"; #define sqr 340 #define mod 1000000007 using namespace std; string sa , sb , sc; void check(string t) { ll n = t.size(); bool l = 1; for(int i = 0 ; n>i ; i++) if(sa[i]==sb[i]&&sa[i]==sc[i]&&sa[i]!=t[i]) l=0; if(l) yes else no } int main() { d3 ll n; cin >> n; cin >> sa >> sb >> sc; ll q; cin >> q; string t; cin >> t; check(t); while(q--) { ll l , r; char c; cin >> l >> r >> c; for(int i = l-1 ; r>i ; i++) t[i]=c; check(t); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...