随笔分类 - 紫书第五章习题
摘要:水题。/*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 fir...
阅读全文
摘要:栈的应用,注意q2[i]全部出列后q也要pop。/*InputThe input file will contain one or more test cases. Each test case begins with the number of teamst (1 ...
阅读全文
摘要:STL综合运用(set_union和set_intersection)/*InputAn integer 0 ≤ T ≤ 5 on the first line gives the cardinality of the set of test cases. The f...
阅读全文
摘要:map的用法#include#include#include#include#include#includeusing namespace std;mapcnt;vector words;string repr(const string &s){ string ...
阅读全文
摘要:set的用法#include#include#include#includeusing namespace std;setdict;int main(){ string s,buf; while(cin>>s) { for(int i=0;i>buf) { d...
阅读全文