密文搜索
本文最后更新于 1830 天前,其中的信息可能已经有所发展或是发生改变。
#include<iostream>
using namespace std;
int main(){
	char arr[1000000];
	cout<<"please input"<<endl; 
	cin>>arr;
	char temp[8];
	int n,sum1=0;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>temp;
		char temp1[8][2];
		for(int k=0;k<8;k++){
				temp1[k][0]=temp[k];
				temp1[k][1]='0';
			}
		int j=0;
		while(arr[j+7]!='\0'){
			int sum=0;
			for(int k=0;k<8;k++){
				
				temp1[k][1]='0';
			}
			for(int k=0;k<8;k++){
				for(int q=0;q<8;q++){
					if(arr[j+k]==temp1[q][0]&&temp1[q][1]=='0'){
						sum++;
						temp1[q][1]='1';
						cout<<"arr[j+k] j+k="<<j+k<<arr[j+k]<<"temp1[q][0] q="<<temp1[q][0]<<endl;
						break;
					} 
				} 
			}
			if(sum==8){
				sum1++;
				cout<<"j="<<j<<endl;
			}
			j++;
			cout<<"count_j="<<j<<endl;
		}		
	}
	cout<<sum1;
	return 0;
} 

作者:Yuyy
博客:https://yuyy.info
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇