码迷,mamicode.com
首页 >  
搜索关键字:max sum plus plus    ( 46271个结果
[Luogu] CF557C Arthur and Table
\(Link\) Description 有一张桌子,有$n$个腿。第$i$根腿的长度是$l_i$?。 现在要拿掉一些腿,使得桌子稳定,拿掉第$i$根腿需要$d_i$的能量。 稳定的条件是,假如拿掉若干条腿之后,桌子还有$k$个腿,那么长度最长的腿的数目要超过一半。比如桌子有$5$根腿,那么至少要有 ...
分类:其他好文   时间:2020-11-17 12:51:13    阅读次数:9
联赛模拟测试32
T2 第一二个测试点直接 \(O(nm)\) 暴力就可以了吧。但是需要注意 1e4 * 1e4 要卡常, T 掉的大概吧 max 函数手写一下,写成 #define max(a,b) (a>b?a:b)就可以了 for(int i=1;i<=q;++i){ x=read();ans=0; for(i ...
分类:其他好文   时间:2020-11-17 12:35:39    阅读次数:8
漫画:如何在数组中找到和为 “特定值” 的两个数?
漫画:如何在数组中找到和为“特定值”的两个数?—————第二天—————什么意思呢?我们来举个例子,给定下面这样一个整型数组(题目假定数组不存在重复元素):我们随意选择一个特定值,比如13,要求找出两数之和等于13的全部组合。由于12+1=13,6+7=13,所以最终的输出结果(输出的是下标)如下:【1,6】【2,7】小灰想表达的思路,是直接遍历整个数组,每遍历到一个元素,就和其他元素相加,看看和
分类:编程语言   时间:2020-11-17 12:10:26    阅读次数:7
【Mysql】 Mysql 统计数据库大小及信息
使用以下命令查询指定数据库容量大小: where table_schema='mysql' #mysql是数据库名称,将mysql修改自己想要查询的数据库即可。 select table_schema as '数据库', sum(table_rows) as '记录数', sum(truncate( ...
分类:数据库   时间:2020-11-16 13:27:08    阅读次数:15
ftp容器搭建
一个做ftp的docker-compose文件 version: "2.0" services: ftp-server: image: fauria/vsftpd container_name: ftp-test1 ports: - "2340:20" - "2341:21" - "21100-21 ...
分类:其他好文   时间:2020-11-16 13:26:52    阅读次数:6
Mybatis plus 报错Invalid bound statement (not found) 终极解决办法
我产生的错误原因是写的mapper继承BaseMapper没有添加泛型: 点进去: 为了解决这个bug,网上很多人也提出了解决办法:1.检查xml文件的namespace是否正确 2.Mapper.java的方法在Mapper.xml中没有,然后执行Mapper的方法会报此 3.xxxMapper. ...
分类:其他好文   时间:2020-11-16 13:19:11    阅读次数:4
SpringBoot2整合Swagger2-plus
一.整合swagger2 1. 加依赖 <!-- 引入swagger2 --> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger-ui</artifactId> <version>2.9.2</ver ...
分类:编程语言   时间:2020-11-16 12:58:29    阅读次数:17
python内置函数
#内置函数:print , sum, max , min , pow, sorted#数值操作print(sum([1, 2, 3])) #6print(max([2, 3, 1])) #3print(min([1, 2, 3])) #1print(abs(-2)) #2 abs绝对值print(r ...
分类:编程语言   时间:2020-11-13 13:22:06    阅读次数:37
leetcode 1283. Find the Smallest Divisor Given a Threshold
Given an array of integers nums and an integer threshold, we will choose a positive integer divisor and divide all the array by it and sum the result ...
分类:其他好文   时间:2020-11-13 13:21:44    阅读次数:33
【leetcode】二进制矩阵中的特殊位置
int numSpecial(int** mat, int matSize, int* matColSize){ int i,j,k,n,sum=0; int rows[100]={0}; int cols[100]={0}; for(i=0; i<matSize; i++) { for(j=0; ...
分类:其他好文   时间:2020-11-13 13:09:28    阅读次数:9
46271条   上一页 1 ... 79 80 81 82 83 ... 4628 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!