博客园 首页 私信博主 显示目录 隐藏目录 管理

随笔分类 -  刷题进行时

摘要:A role-playing game (RPG and sometimes roleplaying game) is a game in which players assume the roles of characters in a fictional setting. Players tak 阅读全文
posted @ 2019-08-20 19:40 Brave_WTZ 阅读(200) 评论(0) 推荐(0)
摘要:题意:应该比较好理解 分析:这道题可以有两种方法:一种就是简单dp;还有一种就是直接查找。 第一种方法:我们假设dp[i][j]代表从i->j位置满足等间距的数目的个数,那么我们可以在i之前设置位置l,来寻找a[j]-a[i[==a[i]-a[l]; AC代码: 第二种方法:看了dalao的代码,感 阅读全文
posted @ 2019-08-18 15:40 Brave_WTZ 阅读(140) 评论(0) 推荐(0)
摘要:分析:比较容易想到的是用两个容器分别存放需要'1'变为'0'的值以及需要'0'变为'1'的值,1->0需要从大到小排序,0->1的需要从小到大排序进行贪心选择 但是如果存在这样的位置(变化前后都为1),我们就要枚举一开始把哪些这样的位置进行转换,显然是价值越大的越优先转换,因为这样代价小。 阅读全文
posted @ 2019-08-18 10:24 Brave_WTZ 阅读(240) 评论(0) 推荐(0)
摘要:先了解一下KM算法: 在满天飞的KM讲解中,感觉这篇博客讲的是真的好!!! 转自https://www.cnblogs.com/logosG/p/logos.html 如果每个员工做每件工作的效率各不相同,我们如何得到一个最优匹配使得整个公司的工作效率最大呢? 这种问题被称为带权二分图的最优匹配问题 阅读全文
posted @ 2019-08-16 20:33 Brave_WTZ 阅读(1931) 评论(0) 推荐(0)
摘要:After this year’s college-entrance exam, the teacher did a survey in his class on students’ score. There are n students in the class. The students did 阅读全文
posted @ 2019-08-16 16:42 Brave_WTZ 阅读(228) 评论(0) 推荐(0)
摘要:RPG girls今天和大家一起去游乐场玩,终于可以坐上梦寐以求的过山车了。可是,过山车的每一排只有两个座位,而且还有条不成文的规矩,就是每个女生必须找个个男生做partner和她同坐。但是,每个女孩都有各自的想法,举个例子把,Rabbit只愿意和XHD或PQK做partner,Grass只愿意和l 阅读全文
posted @ 2019-08-16 16:11 Brave_WTZ 阅读(226) 评论(0) 推荐(0)
摘要:A password locker with N digits, each digit can be rotated to 0-9 circularly. You can rotate 1-3 consecutive digits up or down in one step. For exampl 阅读全文
posted @ 2019-08-16 15:11 Brave_WTZ 阅读(199) 评论(0) 推荐(0)
摘要:Alice and Bob are the topmost hunters in the forest, so no preys can escape from them. However, they both think that its hunting skill is better than 阅读全文
posted @ 2019-08-16 14:03 Brave_WTZ 阅读(194) 评论(0) 推荐(0)
摘要:mmm is learning division, she's so proud of herself that she can figure out the sum of all the divisors of numbers no larger than 100 within one day! 阅读全文
posted @ 2019-08-16 14:00 Brave_WTZ 阅读(222) 评论(0) 推荐(0)
摘要:You are given a 4 × 4 grid, which consists of 15 number cells and an empty cell. All numbers are unique and ranged from 1 to 15. In this board, the ce 阅读全文
posted @ 2019-08-15 19:53 Brave_WTZ 阅读(329) 评论(0) 推荐(0)
摘要:In the course of the last few weeks, Binary Casino has been afflicted by a local crime wave which is primarily focused on casinos in the neighborhood. 阅读全文
posted @ 2019-08-15 19:25 Brave_WTZ 阅读(460) 评论(0) 推荐(0)
摘要:You are given a complete graph with N vertices, numbered from 1 to N. The weight of the edge between vertex x and vertex y (1<=x, y<=N, x!=y) is simpl 阅读全文
posted @ 2019-08-15 19:18 Brave_WTZ 阅读(175) 评论(0) 推荐(0)
摘要:首先介绍什么是组合游戏在竞赛中,组合游戏的题目一般有以下特点 题目描述一般为AA AA,BB BB 2人做游戏AA AA BB BB交替进行某种游戏规定的操作,每操作一次,选手可以在有限的操作(操作必须合法)集合中任选一种。对于游戏的任何一种可能的局面,合法的操作集合只取决于这个局面本身,不取决于其 阅读全文
posted @ 2019-08-15 17:22 Brave_WTZ 阅读(234) 评论(0) 推荐(0)
摘要:F. Shovels Shop time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output F. Shovels Shop time lim 阅读全文
posted @ 2019-04-21 17:05 Brave_WTZ 阅读(329) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 #define ll long long 8 #define mod 1000000007 9 int t; 10 11 int main(){ 12 scanf("%d",&t); 13 w... 阅读全文
posted @ 2019-04-02 00:00 Brave_WTZ 阅读(299) 评论(0) 推荐(0)
摘要:There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he c 阅读全文
posted @ 2019-03-31 18:52 Brave_WTZ 阅读(139) 评论(0) 推荐(0)
摘要:A group of cows grabbed a truck and ventured on an expedition deep into the jungle. Being rather poor drivers, the cows unfortunately managed to run o 阅读全文
posted @ 2019-03-30 21:43 Brave_WTZ 阅读(209) 评论(0) 推荐(0)
摘要:LIS的nlogn的优化:LIS的优化说白了其实是贪心算法,比如说让你求一个最长上升子序列把,一起走一遍。 比如说(4, 2, 3, 1, 2,3,5)这个序列,求他的最长上升子序列,那么来看,如果求最长的上升序列,那么按照贪心,应该最可能的让该序列的元素整体变小,以便可以加入更多的元素。现在开辟一 阅读全文
posted @ 2019-03-29 23:17 Brave_WTZ 阅读(653) 评论(0) 推荐(0)
摘要:Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this 阅读全文
posted @ 2019-03-29 23:01 Brave_WTZ 阅读(197) 评论(0) 推荐(0)
摘要:Farmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needs N (1 ≤ N ≤ 20,000) planks of 阅读全文
posted @ 2019-03-28 20:22 Brave_WTZ 阅读(210) 评论(0) 推荐(0)