Submission #65249126


Source Code Expand

#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    string s,t;
    cin >> s >> t;
    for(int i=0;i<=s.size()-t.size();i++){
        int f=1;
        for(int j=0;j<t.size();j++){
            if(s[i+j]=='?'||s[i+j]==t[j]) continue;
            f=0; break;
        }
        if(f) return !puts("Yes");
    }
    puts("No");
}

Submission Info

Submission Time
Task B - Four Hidden
User HumanThe1st
Language C++ 17 (gcc 12.2)
Score 250
Code Size 444 Byte
Status AC
Exec Time 4 ms
Memory 3668 KiB

Compile Error

Main.cpp: In function ‘int main()’:
Main.cpp:10:18: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   10 |     for(int i=0;i<=s.size()-t.size();i++){
      |                 ~^~~~~~~~~~~~~~~~~~~
Main.cpp:12:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   12 |         for(int j=0;j<t.size();j++){
      |                     ~^~~~~~~~~

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 2 ms 3488 KiB
00_sample_02.txt AC 2 ms 3512 KiB
00_sample_03.txt AC 2 ms 3388 KiB
01_random_01.txt AC 2 ms 3460 KiB
01_random_02.txt AC 2 ms 3536 KiB
01_random_03.txt AC 2 ms 3444 KiB
01_random_04.txt AC 2 ms 3516 KiB
01_random_05.txt AC 1 ms 3536 KiB
01_random_06.txt AC 1 ms 3668 KiB
01_random_07.txt AC 1 ms 3516 KiB
01_random_08.txt AC 1 ms 3668 KiB
01_random_09.txt AC 2 ms 3668 KiB
01_random_10.txt AC 2 ms 3460 KiB
01_random_11.txt AC 2 ms 3588 KiB
01_random_12.txt AC 2 ms 3512 KiB
01_random_13.txt AC 2 ms 3516 KiB
01_random_14.txt AC 2 ms 3540 KiB
01_random_15.txt AC 2 ms 3452 KiB
01_random_16.txt AC 2 ms 3496 KiB
01_random_17.txt AC 2 ms 3584 KiB
01_random_18.txt AC 4 ms 3460 KiB
01_random_19.txt AC 2 ms 3440 KiB
01_random_20.txt AC 2 ms 3464 KiB
02_handmade_01.txt AC 1 ms 3460 KiB
02_handmade_02.txt AC 1 ms 3448 KiB