Educational Codeforces Round 58 (Rated for Div. 2) 题目总链接:https://codeforces.com/contest/1101 A. Minimum Integer 题意: 多组数据,给你三个数l,r,d,要求在区间[l,r]之外找一个最小的 ...
分类:
其他好文 时间:
2019-01-13 15:26:27
阅读次数:
170
感慨 这次比较昏迷最近算法有点飘,都在玩pygame。。。做出第一题让人hack了,第二题还昏迷想错了 A Minimum Integer(数学) 水题,上来就能做出来但是让人hack成了tle,所以要思考一下具体的过程 原本我是认为直接把d进行累加看什么时候不在那个segment内也就是那个范围之 ...
分类:
其他好文 时间:
2019-01-13 00:15:42
阅读次数:
195
You are given qq queries in the following form: Given three integers lili, riri and didi, find minimum positive integer xixi such that it is divisible ...
分类:
其他好文 时间:
2019-01-12 14:17:46
阅读次数:
221
C题卡了一个小时, 又被教育场教育了... A. Minimum Integer 大意:求不在$[l,r]$范围内的最小被$d$整除的数 模拟 B. Accordion 大意: 给定字符串, 可以删除任意字符, 求最长的的手风琴, 手风琴类似于$[::],[:|:],[:||:],[:|||:]$ ...
分类:
其他好文 时间:
2019-01-12 12:14:41
阅读次数:
256
<!doctype html><html> <head> <meta charset="UTF-8"> <title></title> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1, ...
分类:
其他好文 时间:
2019-01-11 13:11:59
阅读次数:
233
Given a Binary Search Tree (BST) with the root node root, return the minimum difference between the values of any two different nodes in the tree. Exa ...
分类:
其他好文 时间:
2019-01-10 17:45:12
阅读次数:
115
# 创建列表 # 定义# 直接定义nums = [1,2,3,4,5] # 通过range函数构造,python2 和python3 版本之间的差异;# python3 用的时候才会去构造nums = range(1,101) # 列表嵌套# 注意和C语言中数组的区别,是否可以存放不同的数据类型nu ...
分类:
编程语言 时间:
2019-01-10 10:47:57
阅读次数:
227
An integer interval [a, b] (for integers a < b) is a set of all consecutive integers from a to b, including a and b. Find the minimum size of a set S ...
分类:
其他好文 时间:
2019-01-09 23:36:44
阅读次数:
333
0 1背包问题 问题:有n个物品,第i个物品价值为vi,重量为wi,其中vi和wi均为非负数,背包的容量为W,W为非负数。现需要考虑如何选择装入背包的物品,使装入背包的物品总价值最大。 针对这个经典的动态规划问题,先建立一个实例,如下表格: | 物体编号i | 1 | 2 | 3 | 4 | 5 | ...
分类:
其他好文 时间:
2019-01-09 21:49:19
阅读次数:
205
Given two strings A and B, find the minimum number of times A has to be repeated such that B is a substring of it. If no such solution, return 1. For ...
分类:
其他好文 时间:
2019-01-09 18:37:36
阅读次数:
162