上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 45 下一页
该文被密码保护。 阅读全文
posted @ 2018-06-01 12:52 楼主好菜啊 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 题意: 给你 n 张卡片,总共可以消耗的法力值,求最多可以造成多少伤害, 卡片分为2种,一种是魔法卡,使用后可以使所有的连环卡的费用全部减1,另一种是连环卡,因魔法卡的使用可以使其费用减1,问最终最多可以造成多少的伤害 思路分析 : 比赛的时候大脑短路了,基本不愿意去想东西了,导致题目没有出来,这个 阅读全文
posted @ 2018-06-01 12:33 楼主好菜啊 阅读(242) 评论(0) 推荐(0) 编辑
摘要: 题意:01给出一个数n,现在要将它分为m个数,这m个数相加起来必须等于n,并且要使得这m个数的或值最小。 思路分析: 一个简单的贪心,从高位到低位,判断当前位可否为 1 ,若可以,则将所有的数的这一位全部都变成 1 代码示例: 阅读全文
posted @ 2018-05-17 18:31 楼主好菜啊 阅读(156) 评论(0) 推荐(0) 编辑
摘要: A musical melody is represented as a sequence of N (1<=N<=20000)notes that are integers in the range 1..88, each representing a key on the piano. It i 阅读全文
posted @ 2018-05-16 23:21 楼主好菜啊 阅读(336) 评论(0) 推荐(0) 编辑
摘要: 推荐博客:https://www.cnblogs.com/zinthos/p/3899725.html 所谓的后缀数组,就是将字符串的 n 个后缀全部取出来,采用字典序的排序方式,将排序好的后缀开头位置顺次放进数组中。 在后缀数组中,有几个关键的变量 1 . SA 数组,若 sa[ i ] = j 阅读全文
posted @ 2018-05-16 22:52 楼主好菜啊 阅读(176) 评论(0) 推荐(0) 编辑
摘要: For an array b of length m we define the function f as where ⊕ is bitwise exclusive OR. For example, f(1,2,4,8)=f(1⊕2,2⊕4,4⊕8)=f(3,6,12)=f(3⊕6,6⊕12)=f 阅读全文
posted @ 2018-05-16 19:17 楼主好菜啊 阅读(479) 评论(0) 推荐(0) 编辑
摘要: You are given several queries. Each query consists of three integers p, q and b. You need to answer whether the result of p/q in notation with base b 阅读全文
posted @ 2018-05-16 18:44 楼主好菜啊 阅读(616) 评论(0) 推荐(0) 编辑
摘要: Suppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a street or a 阅读全文
posted @ 2018-05-12 22:26 楼主好菜啊 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 链接:https://www.nowcoder.com/acm/contest/112/D来源:牛客网 题目描述 一个只含数字的字符串,q次操作,每次操作将第i位数字改为x,每次操作后,统计长度在[l, r]之间且首数字大于尾数字的子串的个数。 输入描述: 第一行一个只含数字的字符串;第二行3个整数 阅读全文
posted @ 2018-05-12 17:20 楼主好菜啊 阅读(218) 评论(0) 推荐(0) 编辑
摘要: Nim is a two-player mathematic game of strategy in which players take turns removing objects from distinct heaps. On each turn, a player must remove a 阅读全文
posted @ 2018-05-10 10:05 楼主好菜啊 阅读(305) 评论(0) 推荐(0) 编辑
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 45 下一页