
STL
coderyzh
这个作者很懒,什么都没留下…
展开
-
UVA 10815 Andy's First Dictionary (STL_set)
题目传送门 题意:输入一个文本内容,将每个单词按照字典顺序输出,必须是小写字母。 题解: 刚学会的重定向,交上去忘记注释了,WA了一发。 isalpha()函数:判断字符是否为英文字母,若为英文字母,返回非0(小写字母为2,大写字母为1)。若不是字母,返回0。 tolower()函数:将字母转化为小写字母。 c++中,stringstream ss(str);表达的是什么意思??str...原创 2019-03-31 14:20:55 · 126 阅读 · 0 评论 -
UVa 101 The Blocks Problem (STL+模拟)
题目传送门 题意(紫书P110): 输入n,得到编号为0~n-1的木块,分别摆放在顺序排列编号为0~n-1的位置。现对这些木块进行操作,操作分为四种。 1、move a onto b:把木块a、b上的木块放回各自的原位,再把a放到b上; 2、move a over b:把a上的木块放回各自的原位,再把a发到含b的堆上; 3、pile a onto b:把b上的木块放回各自的原位,再把a连...原创 2019-03-27 22:01:50 · 157 阅读 · 0 评论 -
Codeforces 1157E Minimum Array
题目传送门 multiset容器和set不同的就是不去重。代码易懂。 s.erase(a);其中a是地址,而不是对应的数据。 #include<bits/stdc++.h> //#include<set> using namespace std; int a[200010],b[200010]; multiset<int>s; int main() { ...原创 2019-04-29 11:22:50 · 200 阅读 · 0 评论