国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

1035. Password (20)

2019-11-14 10:46:05
字體:
來源:轉載
供稿:網友

注意參數傳遞要引用

#include<iostream>#include<algorithm>#include<vector>#include<map> #include<string>#include<set>using namespace std;struct rec{	string name;	string pw;}; vector<rec> mod_rec;bool ismod(string &s){ 	bool flag = true;	for(int i = 0; i < s.size(); i++){		if(s[i] == '1'){			s[i] = '@';			flag = false;		}		else if(s[i] == '0'){			s[i] = '%';			flag = false;		}		else if(s[i] == 'l'){			s[i] = 'L';			flag = false;		}		else if(s[i] == 'O'){			s[i] = 'o';			flag = false;		}	}	if(flag == true) return true;	else return false;}int main(){	int n;	cin>>n;	for(int i = 0; i < n; i++){		rec a;		cin>>a.name>>a.pw;		if(!ismod(a.pw)){			mod_rec.push_back(a);		}	}	int count = mod_rec.size();	if(count == 0){		if(n == 1){			PRintf("There is %d account and no account is modified",n);		}		else{			printf("There are %d accounts and no account is modified",n);		}	}	else{		cout<<count<<endl;		for(int i = 0; i < mod_rec.size(); i++){			printf("%s %s/n",mod_rec[i].name.c_str(),mod_rec[i].pw.c_str());		}	}	return 0;} 


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 大竹县| 西畴县| 遂昌县| 新余市| 达尔| 鄯善县| 山阳县| 武邑县| 巨鹿县| 黔西县| 万山特区| 阿拉善盟| 砀山县| 嵊州市| 巴东县| 井冈山市| 离岛区| 特克斯县| 邛崃市| 新巴尔虎左旗| 米泉市| 民和| 甘南县| 安平县| 南乐县| 乃东县| 鹤壁市| 湘潭县| 筠连县| 德阳市| 绥化市| 宝山区| 虞城县| 常州市| 定结县| 格尔木市| 苍南县| 固镇县| 瑞昌市| 辰溪县| 百色市|