随笔分类 - OJ---HDU
摘要:However, all efforts to decode their messages have failed so far because, as luck would have it, they have stumbled upon a race of stuttering aliens!
阅读全文
摘要:The shorter, the simpler. With this problem, you should be convinced of this truth. You are given an array AA of NN postive integers, and MM queries i
阅读全文
摘要:One day I was shopping in the supermarket. There was a cashier counting coins seriously when a little kid running and singing "门前大桥下游过一群鸭,快来快来 数一数,二四六
阅读全文
摘要:Some people believe that there are three cycles in a person's life that start the day he or she is born. These three cycles are the physical, emotiona
阅读全文
摘要:Problem Description Although winter is far away, squirrels have to work day and night to save beans. They need plenty of food to get through those lon
阅读全文
摘要:There is a very simple and interesting one-person game. You have 3 dice, namely Die1, Die2 and Die3. Die1 has K1 faces. Die2 has K2 faces. Die3 has K3
阅读全文
摘要:Akemi Homura is a Mahou Shoujo (Puella Magi/Magical Girl). Homura wants to help her friend Madoka save the world. But because of the plot of the Boss
阅读全文
摘要:When wake up, lxhgww find himself in a huge maze. The maze consisted by N rooms and tunnels connecting these rooms. Each pair of rooms is connected by
阅读全文
摘要:题意: 给出一个矩阵,初始每个位置上的值都为0,然后有两种操作 一种是更改某个位置上的值 另一种是求某个位置附近曼哈顿距离不大于K的所有位置的值的总和 技巧: 坐标旋转,使得操作之后菱形变成方方正正的矩形,(即“曼哈顿距离”转化为“切比雪夫距离”)方便使用树状数组进行计算。 利用哈希进行离散,节约空
阅读全文
摘要:Problem Description Jimmy wants to make a special necklace for his girlfriend. He bought many beads with various sizes, and no two beads are with the
阅读全文
摘要:Give you a sequence and ask you the kth big number of a inteval. InputThe first line is the number of the test cases. For each test case, the first li
阅读全文
摘要:Problem Description Chinese always have the railway tickets problem because of its' huge amount of passangers and stations. Now goverment need you to
阅读全文
摘要:Problem Description In middle school, teachers used to encourage us to pick up pretty sentences so that we could apply those sentences in our own arti
阅读全文
摘要:Problem Description 035 now faced a tough problem,his english teacher gives him a string,which consists with n lower case letter,he must figure out ho
阅读全文
摘要:Problem Description Given a string S. K-string is the sub-string of S and it appear in the S at least K times.It means there are at least K different
阅读全文
摘要:Problem Description Tom is a commander, his task is destroying his enemy’s transportation system.Let’s represent his enemy’s transportation system as
阅读全文
摘要:Problem Description Farmer John's farm has N barns, and there are some cows that live in each barn. The cows like to drop around, so John wants to bui
阅读全文
摘要:2-satisfiability,我们一般将其缩写为 2-sat。 了解全名有助于我们对这个算法的理解。 百度翻译:‘satisfiability’ “可满足性,适定性”。 “合取范式可满足性问题(简称SAT问题)是一个NP完全问题。” “合取范式可满足性问题(简称SAT问题)是一个NP完全问题。”
阅读全文
摘要:Problem Description 医学界发现的新病毒因其蔓延速度和Internet上传播的"红色病毒"不相上下,被称为"红色病毒",经研究发现,该病毒及其变种的DNA的一条单链中,胞嘧啶,腺嘧啶均是成对出现的。现在有一长度为N的字符串,满足一下条件:(1) 字符串仅由A,B,C,D四个字母组成
阅读全文
摘要:转自PomeCat: “DP的斜率优化——对不必要的状态量进行抛弃,对不优的状态量进行搁置,使得在常数时间内找到最优解成为可能。斜率优化依靠的是数形结合的思想,通过将每个阶段和状态的答案反映在坐标系上寻找解答的单调性,来在一个单调的答案(下标)队列中O(1)得到最优解。” https://wenku
阅读全文

浙公网安备 33010602011771号