1 条题解
-
0Guest LV 0 MOD
-
0
#include <iostream> #include <cstdio> #include <map> #include <cstring> using namespace std; map<string, int> book; int n, bnlen; char ins[10], bookname[205]; int main() { cin >> n; while (n--) { scanf("%s", ins); gets(bookname); if (ins[0] == 'a') { book[bookname] = 1; } else { //if(book.count(bookname)){ if (book.find(bookname) != book.end()) { cout << "yes" << endl; } else { cout << "no" << endl; } } } }
- 1
信息
- ID
- 1510
- 难度
- 9
- 分类
- (无)
- 标签
- 递交数
- 1
- 已通过
- 1
- 通过率
- 100%
- 上传者