Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
19739 Al. 判断子序列 C++ 编译错误 0 MS 0 KB 344 2023-03-19 10:42:36

Tests(0/0):


#include<bits/stdc++.h> using namespace std; const int N=1e5+10; int a[N],b[N]; int mian(){ int n,m,j=0; cin>>n>>m; for(int i=0;i<n;i++)scanf("%d",&a[i]); for(int i=0;i<m;i++)scanf("%d",&b[i]); for(int i=0;i<n;i++){ while(j<n&&a[j]==b[i]){ j++; i++; } } if(j==n)cout<<"Yes"; else cout<<"No"; return 0; }


测评信息: