stl
small__snail__5
如果有一天您来到了这里请留下您的痕迹,欢迎各种评论,一同进步。
我愿意做一只小蜗牛,不艳羡别人的速度,而独享自己的慢慢旅程,总有一天,我也可以骄傲的告诉所有人,我虽然慢,但是我不曾放弃,人生总要坚持点什么。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
codeforce 4C
/*通过计数很简单的模拟stl*/#include #include #include #include #include using namespace std;int main(){ int n; while(cin >> n){ map mp; for(int i = 0; i < n; i++){原创 2017-04-13 17:32:33 · 393 阅读 · 0 评论 -
poj1068 Parencodings
//题意:输入t代表几组样例,n代表有几个右括号,n个数中第一个数代表第一个右括号前面有几个左括号,一次类推,题目问?在当前的括号里包括当前的括号共有几对括号//思路:1、首先将原来的括号川抽象为01数列,这里左括号为1,右括号为0,在输入每个数字的时候就很好的转化好这个川;2、建立映射关系,也就是说将当前这个右括号的下标与他对应的左括号的下标用map对应起来;3、用链表建立指向关系和值,每次判断...原创 2018-04-22 15:15:24 · 238 阅读 · 0 评论 -
poj3295 Tautology
//题意:p,q,r,s,t分别带别可0可1的数字,A(w,x),N,E(w,x),C(w,x),K(w,x),分别代表逻辑运算分别为或、非、是否相等、非w或x、与;当然这里的w,x只是举例实则是pqrst,然后目的给你一个传操作若是永真式输出一个tautology,否则输出not//思路:自己构造一个栈,因为每种操作数都是在操作符后面的,从右向左入栈方便操作简单具体见代码(【注意】有个很奇怪的地...原创 2018-04-16 17:20:06 · 300 阅读 · 0 评论 -
hdu2051(stack)
Give you a number on base ten,you should output it on base two.(0 < n < 1000)Input For each case there is a postive number n on base ten, end of file. Output For each case output a number on bas原创 2017-05-04 10:02:07 · 470 阅读 · 0 评论 -
hdu1022(stack)
As the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by train(because the trains in the Ignatius Train Station is the fastest all over t原创 2017-05-04 09:35:56 · 707 阅读 · 0 评论 -
hdu1896(优先队列)
Because of the wrong status of the bicycle, Sempr begin to walk east to west every morning and walk back every evening. Walking may cause a little tired, so Sempr always play some games this time.原创 2017-05-03 23:24:18 · 689 阅读 · 0 评论 -
Aizu 2780 Best Matched Pair
/*此题是一个序列中任意两个数相乘,除了自己和自己以外得到的最大的数且该数字是类似于“1234”连续上升的*/#include #include #include #include #include #include using namespace std;int num[1010];int main(){ int n; while(scanf("%d",原创 2017-04-20 21:45:19 · 284 阅读 · 0 评论 -
poj2503(stl, map ,sscanf)
#include #include #include #include #include using namespace std;int main(){ char c1[30], c2[30], c3[30]; string ss; maps; while(gets(c1)){ if(strlen(c1) == 0) break;原创 2017-04-15 21:37:17 · 294 阅读 · 0 评论 -
Lowest Unique Price (第六届省赛)map
/*此题一定是一个大模拟map*/#include #include #include #include #include using namespace std;int main(){ int t; scanf("%d", &t); while(t--){ map s; s.clear(); int原创 2017-04-30 15:49:59 · 303 阅读 · 0 评论 -
hdu1263(map(自己定义的数据结构的map))
/*在自己定义的一个结构体中的map的运用和调用*/#include #include #include #include #include using namespace std;struct myst{ map mp;//由于输出的原意需要自己定义};int main(){ int t, n; scanf("%d", &t); map原创 2017-04-29 13:05:51 · 441 阅读 · 0 评论 -
hdu1075(map)
/*相当于你输入的串有个对照表,若该船和对照表中的串相同,那么输出对照表中的串*/#include #include #include #include #include using namespace std;char c[3010];map mp;int main(){ string s1, s2; cin >> s1; while(cin原创 2017-04-29 09:36:08 · 346 阅读 · 0 评论 -
poj2632 Crashing Robots
//题意:题意很简单给一个坐标图,k代表样例个数,b,a代表举行长宽,n,m代表机器人数,指令数,n个表示机器人初始位置,m条指令,m条指令中F:直行,L:向左转(注意只是改变朝向,坐标不变)R:向右转(改变朝向,坐标不变)输出有三种情况:1.机器人可能走出这个表格撞墙;2.机器人撞到另一个机器人这两种情况;【注意:按照给的坐标的顺序就是机器人的编号】3.OK;是哪种情况就输出那种情况。【思路很简...原创 2018-04-24 17:20:32 · 234 阅读 · 0 评论
分享