답안 #926088

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
926088 2024-02-12T14:39:21 Z De3b0o Crossing (JOI21_crossing) C++14
0 / 100
40 ms 2388 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;
string s1 , s2 , s3;

void check(string t)
{
    if(t==sa||t==sb||t==sc||t==s1||t==s2||t==s3)
        yes
    else
        no
}

int main()
{
    d3
    ll n;
    cin >> n;
    cin >> sa >> sb >> sc;
    for(int i = 0 ; n>i ; i++)
    {
        if(sa[i]==sb[i])
            s1+=sa[i];
        else
            s1+=char(226-int(sa[i]+sb[i]));
    }
    for(int i = 0 ; n>i ; i++)
    {
        if(sa[i]==sc[i])
            s2+=sa[i];
        else
            s2+=char(226-int(sa[i]+sc[i]));
    }

    for(int i = 0 ; n>i ; i++)
    {
        if(sb[i]==sc[i])
            s3+=sb[i];
        else
            s3+=char(226-int(sc[i]+sb[i]));
    }
    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 40 ms 2388 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 40 ms 2388 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 40 ms 2388 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 40 ms 2388 KB Output isn't correct
2 Halted 0 ms 0 KB -