紫书第五章习题
文章平均质量分 79
Dilly__dally
这个作者很懒,什么都没留下…
展开
-
紫书UVA 10815
set的用法#include<iostream>#include<set>#include<string>#include<sstream>using namespace std;set<string>dict;int main(){ string s,buf; while(cin>>s) { for(...原创 2018-04-10 20:51:01 · 132 阅读 · 0 评论 -
紫书UVA 156
map的用法#include<iostream>#include<string>#include<vector>#include<map>#include<cstdio>#include<algorithm>using namespace std;map<string,int>cnt;vector&原创 2018-04-11 19:21:41 · 110 阅读 · 0 评论 -
紫书UVA 12096
STL综合运用(set_union和set_intersection)/*InputAn integer 0 ≤ T ≤ 5 on the first line gives the cardinality of the set of test cases. The first line of eachtest case contains the number of operations 0 ≤...原创 2018-04-11 19:47:33 · 156 阅读 · 0 评论 -
紫书 UVA540
栈的应用,注意q2[i]全部出列后q也要pop。/*InputThe input file will contain one or more test cases. Each test case begins with the number of teamst (1 ≤ t ≤ 1000). Then t team descriptions follow, each one consistin...原创 2018-04-11 20:34:32 · 175 阅读 · 0 评论 -
紫书UVA 136
水题。/*Ugly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, ...shows the first 11 ugly numbers. By convention, 1 is included.Write a progra...原创 2018-04-11 20:48:18 · 102 阅读 · 0 评论