help,求条!
  • 板块灌水区
  • 楼主__Whitecat__
  • 当前回复3
  • 已保存回复4
  • 发布时间2024/8/11 17:09
  • 上次更新2024/8/11 18:55:34
查看原帖
help,求条!
1104590
__Whitecat__楼主2024/8/11 17:09

题目题目

错误代码:

#include<bits/stdc++.h>
using namespace std;
int main(){
	int n,k;
	string h[10];
	char a[100];
	for(int i=1;i<=n;i++){
		cin>>h[i];
	}
	for(int i=1;i<=k;i++){
		cin>>a[i];
	}
	for(int i=1;i<=n;i++){
		for(int j=1;j<=k;j++){
			for(int p=0;p<h[i].size();p++){
				string rtt=h[i]; 
				if(rtt[p]==a[j]){
					cout<<h[i]<<endl;	
					break;
				}
			}
		}
	}
} 

求条!

2024/8/11 17:09
加载中...