随笔分类 -  紫书-第六章

摘要:The Falling Leaves UVA - 699 Each year, fall in the North Central region is accompanied by the brilliant colors of the leaves on the trees, followed q 阅读全文
posted @ 2019-06-24 13:52 zuiaimiusi 阅读(230) 评论(0) 推荐(0)
摘要:Play on Words UVA - 10129 Some of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solve it to open that doo 阅读全文
posted @ 2019-06-23 13:29 zuiaimiusi 阅读(222) 评论(0) 推荐(0)
摘要:Ordering Tasks UVA - 10305 John has n tasks to do. Unfortunately, the tasks are not independent and the execution of one task is only possible if othe 阅读全文
posted @ 2019-06-22 22:57 zuiaimiusi 阅读(136) 评论(0) 推荐(0)
摘要:https://vjudge.net/problem/UVA-572 The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvCompworkswith 阅读全文
posted @ 2019-06-22 17:01 zuiaimiusi 阅读(147) 评论(0) 推荐(0)
摘要:Trees on the level UVA - 122 Trees are fundamental in many branches of computer science (Pun definitely intended). Current stateof-the art parallel co 阅读全文
posted @ 2019-06-08 19:34 zuiaimiusi 阅读(209) 评论(0) 推荐(0)
摘要:Dropping Balls UVA - 679 思路:和之前做的开关灯的题类似 只需要看小球的编号奇偶。 找规律就行,一直想推导出这个规律满足所有情况,但是没有想出来怎么推。 阅读全文
posted @ 2019-06-08 12:28 zuiaimiusi 阅读(174) 评论(0) 推荐(0)
摘要:Broken Keyboard (a.k.a. Beiju Text) UVA - 11988 用stl的链表做的,模拟链表的方法暂时没学会,先给自己挖个坑,以后来填。 注意点: 1.一定要及时更新it的位置it=s.insert(it,ch);,如果写成s.insert(it,ch);,it的位置 阅读全文
posted @ 2019-05-19 22:47 zuiaimiusi 阅读(167) 评论(0) 推荐(0)
摘要:https://vjudge.net/problem/UVA-442 思路: 1)当遇到左括号将字母进栈,遇到右括号将字母出栈。 2) isalpha() 判断一个字符是否是字母 int isalpha ( int c ); 标准 ASCII 编码共包含了 128 个字符,不同的字符属于不同的分类, 阅读全文
posted @ 2019-04-07 22:49 zuiaimiusi 阅读(195) 评论(0) 推荐(0)
摘要:https://vjudge.net/problem/UVA-514 1)栈的应用 用A来代表车厢序号,B代表target数组用来表示列车出站的序号顺序。B用来表示已经驶进B的车辆数。用stack<int>s表示C。 1.A中首元素==B首元素,A直接驶入B; 2.A中首元素!=B首元素,栈首元素= 阅读全文
posted @ 2019-04-07 21:28 zuiaimiusi 阅读(170) 评论(0) 推荐(0)