Submission #65264342


Source Code Expand

// created:  2025-04-27 20:35:53
#include<cstdio>
#include<cctype>
#include<cstring>
#include<algorithm>
#define F(i,l,r) for(int i=(l),i##_end=(r);i<i##_end;++i)
#define I128 //||is_same<T,__int128_t>::value||is_same<T,__uint128_t>::value
using namespace std;
template<typename T>constexpr bool is_integral_128=(bool)is_integral<T>::value I128;
template<typename T>struct read_dec1{enable_if_t<is_integral_128<T>,T> &x;};
constexpr struct read_dec1_conv{template<typename T>read_dec1<T> operator+(T &x)const{return read_dec1<T>{x};}}D;
template<typename T>enable_if_t<is_integral_128<T>,void> readmain(T &x)
{
	bool neg=false;int c=getchar();
	for(;!isdigit(c);c=getchar())if(c=='-')neg=true;
	for(x=0;isdigit(c);c=getchar())x=(T)(10*x+(c-'0'));
	if(neg)x=-x;
}
template<typename T>void readmain(read_dec1<T> &y){readmain(y.x);--y.x;}
template<typename T>T& read(T &&x){readmain(x);return x;}
template<typename T,typename ...Tr>void read(T &&x,Tr&&... r){readmain(x);read(r...);}
constexpr int N=25;
char t[N],u[N];
int main()
{
	scanf("%s%s",t,u);
	int n=(int)strlen(t),m=(int)strlen(u);
	F(i,0,n-m+1)
	{
		bool ok=true;
		F(j,0,m)ok=ok&&(t[i+j]=='?'||t[i+j]==u[j]);
		if(ok)return puts("Yes"),0;
	}
	puts("No");
	return 0;
}

Submission Info

Submission Time
Task B - Four Hidden
User liuhengxi
Language C++ 17 (gcc 12.2)
Score 250
Code Size 1264 Byte
Status AC
Exec Time 1 ms
Memory 1644 KiB

Compile Error

Main.cpp: In function ‘int main()’:
Main.cpp:26:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   26 |         scanf("%s%s",t,u);
      |         ~~~~~^~~~~~~~~~~~

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 1512 KiB
00_sample_02.txt AC 1 ms 1624 KiB
00_sample_03.txt AC 0 ms 1624 KiB
01_random_01.txt AC 0 ms 1500 KiB
01_random_02.txt AC 0 ms 1616 KiB
01_random_03.txt AC 0 ms 1536 KiB
01_random_04.txt AC 0 ms 1584 KiB
01_random_05.txt AC 0 ms 1620 KiB
01_random_06.txt AC 1 ms 1588 KiB
01_random_07.txt AC 0 ms 1532 KiB
01_random_08.txt AC 1 ms 1628 KiB
01_random_09.txt AC 0 ms 1584 KiB
01_random_10.txt AC 1 ms 1512 KiB
01_random_11.txt AC 0 ms 1500 KiB
01_random_12.txt AC 0 ms 1624 KiB
01_random_13.txt AC 0 ms 1612 KiB
01_random_14.txt AC 0 ms 1620 KiB
01_random_15.txt AC 1 ms 1616 KiB
01_random_16.txt AC 1 ms 1616 KiB
01_random_17.txt AC 1 ms 1576 KiB
01_random_18.txt AC 1 ms 1644 KiB
01_random_19.txt AC 0 ms 1580 KiB
01_random_20.txt AC 0 ms 1564 KiB
02_handmade_01.txt AC 0 ms 1628 KiB
02_handmade_02.txt AC 0 ms 1624 KiB