
uva
文章平均质量分 66
Strive_Buff
面向未来,才能创造未来。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
uva 156 Ananagrams
题目大意: 输入一些单词,找出所有满足条件的单词,该单词不能通过重排,得到输入文本的另一个单词,在判断满足条件时,不区分大小写,但在输出时保留输入的大小写,按字典序排序 解体思路: 把所有单词保存,在重排后的单词保存在map中,如果map中原来有就键就是0,最后在vector中保存的单词在map中如果有就保存在新的vector中,,最后排序输出 #inc原创 2016-09-26 20:08:06 · 353 阅读 · 0 评论 -
J-Osu! Master(2015-ICPC-北京站)
题目大意:题目连接 按照输入的看最后有多少个Shock 解体思路: 根据C B S 维护x #include #include #include #include #include using namespace std; int main() { char ch; int a; int ans; int t; int p; // freopen("t.txt","r",std原创 2016-10-14 21:40:53 · 635 阅读 · 0 评论 -
uva 136 Ugly Numbers(priority_queue的使用)
题目链接:here 就是保存除了不能被2 3 5 以外的素数整除的数 #include #include #include #include #include #include using namespace std; const int maxn = 1000+10; int main(){ int t; int x=1; //freopen("0原创 2016-09-28 16:26:20 · 386 阅读 · 0 评论 -
uva 540 Team Queue(queue与STL其他容器的综合运用)
题目链接:here 思路还是很简单的,,用map[a][i] 表示编号为a 的人在i的队伍里面,然后用队列表示每个队伍; #include #include #include #include #include #include using namespace std; const int maxn = 1000+10; int main(){ int t;原创 2016-09-28 16:19:42 · 508 阅读 · 0 评论 -
uva 12096 The SetStack Computer(STL)
题目大意: PUSH:向栈中放一个空集合。 DUP:复制栈顶集合。 UNION:取栈顶的两个集合,取并集后放回。 INTERSECT:取栈顶的两个集合,取交集后放回。 ADD:取栈顶两个集合,将第一个集合作为元素放到第二个集合中,并将第二个集合放回栈。 解体思路: 用每个数字代表不同的集合,用放入容器中的顺序代表集合的数字 #include原创 2016-09-27 16:30:57 · 454 阅读 · 0 评论 -
uva 201 Squares
题目大意: 有n行n列(2 解题思路: 模拟,用两个数组模拟行和列,统计时枚举定点扫描 #include #include #include #include #include #include using namespace std; int H[10][10]; int V[10][10]; int main() { int n,m,x,y,T = 0;原创 2016-09-22 17:11:32 · 685 阅读 · 0 评论 -
UVA 1590 IP Networks
题目大意: 给你几个IP求给出ip范围内的最小的ip,(ip范围,可以用一个网络地址和一个子网掩码描述一个ip,其中子网掩码包含32个二进制,前32-n位为1,后n位为0,网络地址的前32-n位任意,后n位为0,所有前32-n位和网络地址相同的ip都属于此网络) 题目连接here 解题思路: ip的四个部分分别处理,每一部分找出最大值的最小值,然后判断是其二进制最后几位不同,得出子网掩码;原创 2016-09-24 13:23:34 · 1105 阅读 · 1 评论 -
uva 815 Flooded!
题目大意: 有n*m(1 解题思路: 题目挺简单的但是一开始没弄还wa了几发,还是太弱了,把输入的内阁格子排序,从小到大算加上水的高度以后比下一块高不高 #include #include #include using namespace std; double p[30*30+10]; int main(){ int n,m; int q=1; // freopen(原创 2016-09-24 20:54:32 · 597 阅读 · 0 评论 -
uva 12108 Extraordinarily Tired Students(特别困的学生)
题目大意: 课堂上有n(ni个学生清醒Ai分钟后睡Bi分钟,然后重复(1 解题思路: 模拟整个过程直到全部清醒或者时间足够长,用Ci表示在周期中的状态时间 #include #include using namespace std; const int maxn=15; int a[maxn],b[maxn],c[maxn]; int main(){ int n; in原创 2016-09-25 11:06:27 · 746 阅读 · 0 评论 -
uva 101 The Blocks Problem
题目大意: 从左到右有n割木块,编号为0~n-1,要求模拟一下四种操作(下面a,b都是木块编号) move a onto b:把a和b上方的木块全部归位然后把a摞在b上面, move a over b:把a上方的木块全部归位,然后把a放在b所在的木块堆的顶部 pile a onto b:把b上方的木块全部归位,然后把a及上面的木块整体摞在b上面 pile a over b:把a原创 2016-09-26 19:53:07 · 504 阅读 · 0 评论 -
uva 10815 Andy's First Dictionary
题目大意: 输入一个文本,找出所有不同的单词按照字典序排序; 解题思路: 把所有单词放在set中,输出,要去掉不是单词的多余的变成空格 #include #include #include #include using namespace std; set dir; int main(){ string s,buf; while(cin>>s){ for原创 2016-09-26 20:01:54 · 351 阅读 · 0 评论 -
UVA 11624 Fire! ([kuangbin带你飞]专题一 简单搜索)
题目:题目 大意:在迷宫中,人J逃出去,,,出区域就算,迷宫中还有火,火会像四周蔓延,人不能走火易经到达的位置,求最短多长时间能出来 解体思路:用两次bfs,第一次记录火到每个地点的时间,第二次求人道每个地方的时间,但是要求,人到的哪个位置的时间i火要早 #include #include #include #include #include #include using names原创 2016-10-17 08:34:08 · 440 阅读 · 0 评论