Submission #52321403


Source Code Expand

#include <bits/stdc++.h>
//#include<ext/pb_ds/assoc_container.hpp>
//#include<ext/pb_ds/tree_policy.hpp>


#define ll long long int
#define ull unsigned ll
#define lld double
#define str_lwr(x) transform(x.begin(),x.end(),x.begin(),::towlower)
#define str_upr(x) transform(x.begin(),x.end(),x.begin(),::towupper)
#define tc ll t;in t;while(t--)


#define vec(b,a,n) vector<b>a(n)
#define mpi(a,b,mp) map<a,b>mp
#define mi(mp) mp.insert
#define vecbool(is_prime,n) vector<bool>is_prime(n+1,true)
#define pb push_back
#define it(a) for(auto it : a)out it<<(char)32;
#define nl out endl
#define vecp(b) vector<pair<ll,ll>>b
#define iit(b) for(auto iit : b)out iit.first<<(char)32<<iit.second<<(char)32;
#define gcd __gcd
#define in cin>>
#define out cout<<
#define loopi(a,b,c) for(ll i=a;i<b;i+=c)
#define loopj(a,b,c) for(ll j=a;j<b;j+=c)
#define loopk(a,b,c) for(ll k=a;k<b;k+=c)
#define rloopi(a,b,c) for(ll i=a;i>=b;i-=c)


#define all(a) a.begin(),a.end()
#define max_value(a) *max_element(a.begin(),a.end())
#define max_index(a) max_element(a.begin(),a.end())-a.begin()
#define min_value(a) *min_element(a.begin(),a.end())
#define min_index(a) min_element(a.begin(),a.end())-a.begin()
#define b_s(a,x) binary_search(a.begin(),a.end(),x)
#define free(a,x1) count(a.begin(),a.end(),x1)
#define nsort(a) sort(a.begin(),a.end())
#define rsort(a) sort(a.rbegin(),a.rend())


#define PM_RIFAT ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);


#define M 1e9+7
//#define ordered_set tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>
//#define ordered_multiset tree<ll,null_type,less_equal<ll>,rb_tree_tag,tree_order_statistics_node_update>
using namespace std;
//using namespace __gnu_pbds;



class solve
{
    private:
    public:
    solve();
};
solve::solve()
{
    string t,s;cin>>s>>t;
    str_upr(s);
    ll cnt=0;
    ll l=0,r=0;
    while(r<s.size())
    {
        if(t[l]==s[r])
        {
            ++cnt;
            ++l;
        }
        if(cnt==2)break;
        ++r;
    }
    if(cnt==2)cout<<"Yes\n";
    else cout<<"No\n";
}



int main()
{
    PM_RIFAT;
    solve ob;
    return 0;
}

Submission Info

Submission Time
Task C - Airport Code
User RIFAT74328
Language C++ 20 (gcc 12.2)
Score 0
Code Size 2225 Byte
Status WA
Exec Time 2 ms
Memory 3692 KiB

Compile Error

Main.cpp: In constructor ‘solve::solve()’:
Main.cpp:66:12: warning: comparison of integer expressions of different signedness: ‘long long int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   66 |     while(r<s.size())
      |           ~^~~~~~~~~

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 3
AC × 44
WA × 4
Set Name Test Cases
Sample 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt
All 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 01_random_16.txt, 01_random_17.txt, 01_random_18.txt, 01_random_19.txt, 01_random_20.txt, 01_random_21.txt, 01_random_22.txt, 01_random_23.txt, 01_random_24.txt, 01_random_25.txt, 01_random_26.txt, 01_random_27.txt, 01_random_28.txt, 01_random_29.txt, 01_random_30.txt, 02_handmade_01.txt, 02_handmade_02.txt, 02_handmade_03.txt, 02_handmade_04.txt, 02_handmade_05.txt, 02_handmade_06.txt, 02_handmade_07.txt, 02_handmade_08.txt, 02_handmade_09.txt, 02_handmade_10.txt, 02_handmade_11.txt, 02_handmade_12.txt, 02_handmade_13.txt, 02_handmade_14.txt, 02_handmade_15.txt
Case Name Status Exec Time Memory
00_sample_01.txt AC 1 ms 3616 KiB
00_sample_02.txt AC 1 ms 3364 KiB
00_sample_03.txt AC 1 ms 3500 KiB
01_random_01.txt AC 1 ms 3496 KiB
01_random_02.txt AC 1 ms 3420 KiB
01_random_03.txt AC 1 ms 3488 KiB
01_random_04.txt AC 1 ms 3564 KiB
01_random_05.txt AC 1 ms 3500 KiB
01_random_06.txt AC 1 ms 3424 KiB
01_random_07.txt WA 1 ms 3428 KiB
01_random_08.txt AC 1 ms 3420 KiB
01_random_09.txt AC 1 ms 3504 KiB
01_random_10.txt AC 1 ms 3500 KiB
01_random_11.txt AC 1 ms 3392 KiB
01_random_12.txt AC 1 ms 3396 KiB
01_random_13.txt AC 1 ms 3360 KiB
01_random_14.txt AC 1 ms 3496 KiB
01_random_15.txt AC 1 ms 3500 KiB
01_random_16.txt AC 1 ms 3488 KiB
01_random_17.txt AC 1 ms 3440 KiB
01_random_18.txt AC 1 ms 3424 KiB
01_random_19.txt AC 1 ms 3496 KiB
01_random_20.txt AC 1 ms 3476 KiB
01_random_21.txt AC 1 ms 3568 KiB
01_random_22.txt AC 1 ms 3428 KiB
01_random_23.txt AC 1 ms 3424 KiB
01_random_24.txt AC 1 ms 3496 KiB
01_random_25.txt AC 1 ms 3356 KiB
01_random_26.txt AC 1 ms 3620 KiB
01_random_27.txt AC 1 ms 3680 KiB
01_random_28.txt AC 1 ms 3616 KiB
01_random_29.txt AC 1 ms 3620 KiB
01_random_30.txt AC 1 ms 3556 KiB
02_handmade_01.txt AC 1 ms 3528 KiB
02_handmade_02.txt AC 1 ms 3628 KiB
02_handmade_03.txt AC 1 ms 3692 KiB
02_handmade_04.txt AC 2 ms 3552 KiB
02_handmade_05.txt WA 1 ms 3420 KiB
02_handmade_06.txt WA 1 ms 3632 KiB
02_handmade_07.txt AC 1 ms 3612 KiB
02_handmade_08.txt AC 1 ms 3628 KiB
02_handmade_09.txt WA 1 ms 3636 KiB
02_handmade_10.txt AC 1 ms 3556 KiB
02_handmade_11.txt AC 1 ms 3628 KiB
02_handmade_12.txt AC 1 ms 3424 KiB
02_handmade_13.txt AC 1 ms 3428 KiB
02_handmade_14.txt AC 1 ms 3616 KiB
02_handmade_15.txt AC 1 ms 3544 KiB