1084. Broken Keyboard (20)
来源:互联网 发布:半自动咖啡机 知乎 编辑:程序博客网 时间:2024/06/06 21:01
浪费一个数组空间来存储是否已被输出
#include<cctype>#include<iostream>#include<string>#include<set>using namespace std;int main(){ int visited[1000] = {}; string a, b; getline(cin, a); getline(cin, b); set<char> q;//存储输出的字符 for (auto x : b) q.insert(toupper(x)); for (auto x : a)//对第一行的字符串进行逐个解析 if (q.find(toupper(x)) == q.end() && visited[toupper(x)]==0) { printf("%c",toupper(x)); visited[toupper(x)] = 1; } cout << endl;}
0 0
- 1084. Broken Keyboard (20)
- 1084. Broken Keyboard (20)
- 1084. Broken Keyboard (20)
- 1084. Broken Keyboard (20)
- 1084. Broken Keyboard (20)
- 1084. Broken Keyboard (20)
- 1084. Broken Keyboard (20)
- 1084. Broken Keyboard (20)
- 1084. Broken Keyboard (20)
- 1084. Broken Keyboard (20)
- 1084. Broken Keyboard (20)
- 1084. Broken Keyboard (20)
- 1084. Broken Keyboard (20)
- 1084. Broken Keyboard (20)
- 1084. Broken Keyboard (20)
- 1084. Broken Keyboard (20)
- 1084. Broken Keyboard (20)
- 1084. Broken Keyboard (20)
- 小米魅族系统遇到的6.0权限不弹窗问题
- 使用forever运行nodejs应用
- openssl关于des算法
- Spark立体全方位表鉴权
- 网络流(EK)
- 1084. Broken Keyboard (20)
- Docker入门实战
- 三极管之——PNP与NPN
- Oracle 数据表空间建立 以及最高权限给予 测试本地
- 将PCIE接口抽象成网络接口
- 哈希背诵用模板
- 【scrapy】scrapy按分类爬取豆瓣电影基础信息
- 【HPUoj】Bet(数论)
- 原码、反码与补码及其意义