Submission #65249856


Source Code Expand

#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=(a),__=(b);i<=__;i++)
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
typedef long long ll;
using namespace std;
string a,b;
signed main()
{
    cin>>a>>b;
    rep(i,0,a.length()-b.length())
    {
        if(a[i]=='?' || a[i]==b[0])
        {
            int flag=1;
            rep(j,0,b.length()-1)
            {
                if(a[i+j]=='?' || a[i+j]==b[j])
                {
                    flag=1;
                }
                else{
                    flag=0;
                    break;
                }
            }
            if(flag==1)
            {
                cout<<"Yes"<<endl;
                return 0;
            }
        }
    }
    cout<<"No";
    return 0;
}

Submission Info

Submission Time
Task B - Four Hidden
User maskiey
Language C++ 20 (gcc 12.2)
Score 250
Code Size 796 Byte
Status AC
Exec Time 1 ms
Memory 3660 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 250 / 250
Status
AC × 3
AC × 25
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, 02_handmade_01.txt, 02_handmade_02.txt
Case Name Status Exec Time Memory
00_sample_01.txt AC 1 ms 3496 KiB
00_sample_02.txt AC 1 ms 3516 KiB
00_sample_03.txt AC 1 ms 3452 KiB
01_random_01.txt AC 1 ms 3464 KiB
01_random_02.txt AC 1 ms 3640 KiB
01_random_03.txt AC 1 ms 3468 KiB
01_random_04.txt AC 1 ms 3516 KiB
01_random_05.txt AC 1 ms 3468 KiB
01_random_06.txt AC 1 ms 3660 KiB
01_random_07.txt AC 1 ms 3424 KiB
01_random_08.txt AC 1 ms 3572 KiB
01_random_09.txt AC 1 ms 3464 KiB
01_random_10.txt AC 1 ms 3492 KiB
01_random_11.txt AC 1 ms 3512 KiB
01_random_12.txt AC 1 ms 3496 KiB
01_random_13.txt AC 1 ms 3420 KiB
01_random_14.txt AC 1 ms 3472 KiB
01_random_15.txt AC 1 ms 3640 KiB
01_random_16.txt AC 1 ms 3660 KiB
01_random_17.txt AC 1 ms 3556 KiB
01_random_18.txt AC 1 ms 3512 KiB
01_random_19.txt AC 1 ms 3448 KiB
01_random_20.txt AC 1 ms 3424 KiB
02_handmade_01.txt AC 1 ms 3520 KiB
02_handmade_02.txt AC 1 ms 3632 KiB