STL
mil_mail
爱自己,才能爱别人。
展开
-
HDU 1075 What Are You Talking About
用map做的, #include #include #include #include using namespace std; map m; int main() { string mar,earth,s; cin>>s; while(cin>>earth) { if(earth=="END") break; cin>>mar;原创 2013-06-30 11:18:41 · 455 阅读 · 0 评论 -
HDU 1880 魔咒词典
用两个map,一个用来存意思--魔咒,一个用来存魔咒--意思; 我用c++提交,结果超内存,后来用G++提交,就过了…… #include #include #include using namespace std; int main() { int i,j,n; string st,str; map m; map mm; while(1) {原创 2013-06-30 16:24:50 · 570 阅读 · 0 评论 -
HDU 1263 水果
开始的时候没有将每次用完map后清空,导致一直wrong answer……T_T…… #include #include #include #include using namespace std; int main() { // freopen("t.txt","r",stdin); int i,n,k,t; string fruit,place;原创 2013-06-30 17:41:34 · 535 阅读 · 0 评论 -
C++ STL next_permutation
/*next_permutation()返回的是布尔类型*/ #include #include #include using namespace std; int main() { string str; cin>>str; sort(str.begin(),str.end()); cout<<str<<endl; while(next_p原创 2013-08-25 18:09:24 · 396 阅读 · 0 评论