2012年5月10日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4079比大小的题。。。没用条件给一堆。。。View Code #include <iostream>#include <map>#include <string>#include <algorithm>using namespace std;typedef struct L{ int start,during;}L;L phone[11000];int main(){ int n,m,i,j; int start,during; int ans; while(s 阅读全文
posted @ 2012-05-10 18:05 LegendaryAC 阅读(247) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1027求数列n的第m个排列,STL中next_permutation的应用。相对应的还有prev_permutation。View Code #include #include #include #include using namespace std;int main(){ int n,m,i; int s[1100]; while(~scanf("%d%d",&n,&m)) { for(i=1;iusing namespace std ;int n,m ;int vi. 阅读全文
posted @ 2012-05-10 17:08 LegendaryAC 阅读(194) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1263STL中map的练习View Code #include <iostream>#include <map>#include <string>using namespace std;int main(){ int n,m,k,i; int f=0; scanf("%d",&n); while(n--) { if(!f)f++; else putchar('\n'); map <string ,map<string, 阅读全文
posted @ 2012-05-10 16:35 LegendaryAC 阅读(257) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1075趁着HDOJ活了赶快交一个、、、刚开始学习STL的应用,这个代码学习自sx老祖。。。View Code #include <stdio.h> #include <iostream> #include <string> #include <map>using namespace std; int main(){ int i; char str[3001]; map <string,string> M; string str1,str2; cin 阅读全文
posted @ 2012-05-10 12:46 LegendaryAC 阅读(227) 评论(0) 推荐(0) 编辑