Source Code
//in the name of Allah

#include<bits/stdc++.h>

#define ll long long
#define pb push_back
#define mp make_pair
#define fr first
#define sc second
#define pii pair<int,int>
#define pll pair<ll,ll>
#define SPEED ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define sz size()
#define all(x) x.begin(),x.end()
#define OO 1e16
#define R return
#define Test int TT;cin>>TT;for(int T=1;T<=TT;T++)

using namespace std;
const ll N = 200010,Mod = 1e9 + 7;
ll n,m,a[N];
string s;


int main()
{
    SPEED;
    cin >> s;
    string t = "atypical";
    int j = 0;
    for(int i=0;i<s.sz;i++)
    {
        s[i] = (char)tolower(s[i]);

        if(s[i] == t[j])
        {
            j++;
            if(j >= t.sz)
                break;
        }
    }
    cout << (j >= (int)t.sz ? "YES" : "NO") << endl;
    R 0;
}
Copy
We Love Atypical yaman_alwaza
GNU G++17
1 ms
624 KB
Wrong Answer