답안 #925360

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
925360 2024-02-11T13:38:03 Z De3b0o Crossing (JOI21_crossing) C++14
0 / 100
47 ms 2280 KB
#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);
    }
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 47 ms 2280 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 47 ms 2280 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 47 ms 2280 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 47 ms 2280 KB Output isn't correct
2 Halted 0 ms 0 KB -