
算法课程作业
深秋无痕ol
多喝开水多看书
展开
-
ZOJ 1406 Jungle Roads
Jungle Roads题目传送门~Time Limit: 2000 msMemory Limit: 65536 KBThe Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads re.原创 2020-06-26 23:30:22 · 336 阅读 · 0 评论 -
ZOJ 2451 Minimizing maximizer(点线段树维护查询+dp思想)
Minimizing maximizer题目传送门~Time Limit: 5000 msMemory Limit: 32768 KBThe company Chris Ltd. is preparing a new sorting hardware called Maximizer. Maximizer has N inputs numbered from 1 to N. Each input represents one integer. Maximizer has one output w原创 2020-06-26 16:36:31 · 1074 阅读 · 1 评论 -
ZOJ 1610 Count the Colors(线段树经典)
Count the ColorsTime Limit: 2000 msMemory Limit: 65536 KBPainting some colored segments on a line, some previously painted segments may be covered by some the subsequent ones.Your task is counting the segments of different colors you can see at last.原创 2020-06-22 15:49:42 · 527 阅读 · 0 评论 -
ZOJ 1805 Squadtrees(四分树难题)
Squadtrees题目传送门~Time Limit: 5000 msMemory Limit: 32768 KBQuadtrees are data structures used to store digital images. For our purposes, the images will be simple bitmaps, where every pixel is either a 1 (black) or a 0 (white). A quadtree representatio原创 2020-06-20 20:58:39 · 952 阅读 · 1 评论 -
ZOJ 1788 Quad Trees (四分树经典)
Quad Trees题目传送门~Time Limit: 2000 msMemory Limit: 65536 KBA binary image, such as the one shown in Figure 2(a), is usually represented as an array of binary entries, i.e., each entry of the array has value 0 or 1. Figure 2(b) shows the array that repr原创 2020-06-20 14:58:15 · 818 阅读 · 0 评论 -
ZOJ 2833 Friendship(并查集)
FriendshipTime Limit: 3000 msMemory Limit: 32768 KBA friend is like a flower, a rose to be exact, Or maybe like a brand new gate that never comes unlatched. A friend is like an owl, both beautiful and wise. Or perhaps a friend is like原创 2020-06-18 12:20:07 · 450 阅读 · 0 评论 -
ZOJ 1789 The Suspects(经典并查集)
The Suspects题目传送门~Time Limit: 2000 msMemory Limit: 65536 KBSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best strateg原创 2020-06-10 11:15:58 · 362 阅读 · 0 评论 -
POJ 2503 Babelfish(map)
Babelfish题目传送门~Time Limit:3000MS Memory Limit:65536K Total Submissions:56564 Accepted:23224 DescriptionYou have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. F...原创 2020-06-07 13:47:56 · 511 阅读 · 0 评论 -
ZOJ1383 Binary Numbers
Binary Numbers题目传送门~Time Limit: 2000 msMemory Limit: 65536 KBGiven a positive integer n, print out the positions of all 1's in its binary representation. The position of the least significant bit is 0.ExampleThe positions of 1's in the binary repr原创 2020-06-06 18:26:58 · 301 阅读 · 0 评论 -
ZOJ 2812 Quicksum
Quicksum题目传送门~Time Limit: 2000 msMemory Limit: 65536 KBA checksum is an algorithm that scans a packet of data and returns a single number. The idea is that if the packet is changed, the checksum will also change, so checksums are often used for detec原创 2020-06-05 19:02:41 · 326 阅读 · 0 评论 -
ZOJ1002 Fire Net
!!!写在前面的话语(泪水):①大家一定要注意if/else嵌套时尽量不要省略大括号呀,哭辽...搞了三个小时没看出来死在哪嘤嘤嘤②用除法定行数记得一定要注意换行位置的分类呀。。。容易死人!!!③感谢今天为我做饭提供做题能量的妈妈,感谢我的狗狗开心,她是最早看出来我不开心安慰我的(其实是自己安慰自己的叭hhhhhhh)。④谢谢今晚将好运赐予我的桐桐,今天晚上搞这个该死的水题惹我的宝贝儿生气了,对不起!!!Fire Net题目传送门Time Limit: 2000 msMemory原创 2020-05-30 23:21:19 · 289 阅读 · 0 评论 -
ZOJ 1091 Knight Moves(BFS)
Knight MovesTime Limit: 2000 msMemory Limit: 65536 KBA friend of you is doing research on theTraveling Knight Problem (TKP)where you are to find the shortest closed tour of knight moves that visits each square of a given set ofnsquares on a chessbo...原创 2020-05-28 19:30:18 · 276 阅读 · 0 评论