上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 59 下一页
摘要: D. Cow and Snacks 题意:有n种小吃,m个人,每个人有两种喜欢的小吃,当一个人遇到两种自己都喜欢的小吃,可以都吃掉,问在最优的吃小吃顺序下,不能吃到自己喜欢的小吃的人数最少是多少? 题解:把n种小吃当作n个点,m个人当作m条边,每个连通图里面第一个吃的人,一定是可以吃两种自己喜欢的小 阅读全文
posted @ 2019-09-25 20:59 知道了呀~ 阅读(430) 评论(0) 推荐(0)
摘要: D. Restore Permutation 题意:给定n个数a[i],a[ i ]表示在【b[1],b[i-1]】这些数中比 b[i]小的数的和,要你构造这样的b[i]序列 题解:利用树状数组 求比b[i]小的数的和,在从大到小二分枚举最大的一个数x,使得左边小于x的所有数的和小于等于a[i],v 阅读全文
posted @ 2019-09-24 21:16 知道了呀~ 阅读(243) 评论(0) 推荐(0)
摘要: C. Magic Grid time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Let us define a magic grid 阅读全文
posted @ 2019-09-23 21:40 知道了呀~ 阅读(471) 评论(0) 推荐(0)
摘要: B. Uniqueness time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output B. Uniqueness time limit p 阅读全文
posted @ 2019-09-23 20:53 知道了呀~ 阅读(303) 评论(0) 推荐(0)
摘要: 以下转载自:https://www.cnblogs.com/wkfvawl/p/9445376.html 1.前言 首先我们要明白树状数组是一种数据结构,利用树状数组可以以空间换取时间,这一点和之前的线段树一样,但是树状数组访问会更快,效率更高,树状数组不同于线段数的一点就是这棵树的构成。 二叉树或 阅读全文
posted @ 2019-09-23 16:57 知道了呀~ 阅读(288) 评论(0) 推荐(0)
摘要: Stars Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15951 Accepted Submission(s): 5945 Problem 阅读全文
posted @ 2019-09-23 16:51 知道了呀~ 阅读(240) 评论(0) 推荐(0)
摘要: 1、python输入的数据默认都是字符型,因此在条件判断的时候要特别注意 2、print('\n')会输出两个换行,print(end='\n')输出一个换行 阅读全文
posted @ 2019-09-22 20:37 知道了呀~ 阅读(188) 评论(0) 推荐(0)
摘要: 使用之前要先导入函数库 import numpy as np 数组名=np.zeros(数组大小,数据类型) 初始化为0值,这里的数据类型只能是数值类型,字符类型不能用 一、一维数组 二、二维数组 阅读全文
posted @ 2019-09-22 16:33 知道了呀~ 阅读(481) 评论(0) 推荐(0)
摘要: Cow Sorting Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4766 Accepted Submission(s): 1727 Pro 阅读全文
posted @ 2019-09-20 19:47 知道了呀~ 阅读(254) 评论(0) 推荐(0)
摘要: 注意:print()输出一行到最后会默认输出一个回车换行 阅读全文
posted @ 2019-09-19 17:15 知道了呀~ 阅读(1338) 评论(0) 推荐(0)
上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 59 下一页