码迷,mamicode.com
首页 >  
搜索关键字:si    ( 1824个结果
LeetCode209. 长度最小的子数组
方法一 暴力枚举所有可能的子数组,也就是枚举子数组的所有开始下标和结束下标,计算子数组的和,如果子数组的和小于等于s,就更新最小长度。 class Solution { public: int minSubArrayLen(int s, vector<int>& nums) { if(nums.si ...
分类:编程语言   时间:2020-06-28 20:34:15    阅读次数:50
常用单位和公式
(1)电子伏特简称电子伏,符号为eV,为能量单位,代表一带电荷量$1.602176634\times10^{-19}$库伦的电子在真空中通过1伏特电位差所产生的动能。电子伏与SI制的能量单位焦耳(J)的换算关系是: $$1eV=1.602176634\times10^{-19}J$$ (2)普朗克常 ...
分类:其他好文   时间:2020-06-26 16:31:47    阅读次数:88
PTA 乙级 1002 写出这个数 (20分)
1 #include<stdio.h> 2 3 int main(){ 4 char str[10][5] = {"ling","yi","er","san","si","wu","liu","qi","ba","jiu"}; 5 char num[100]; 6 int sum = 0, i = ...
分类:其他好文   时间:2020-06-25 09:41:49    阅读次数:63
HTML 转 TXT PHP 函数
这个函数我没试过 不知道好不好用 function htmltotxt($document){ $search = array('@<script[^>]*?>.*?</script>@si', // Strip out javascript '@<[\\/\\!]*?[^<>]*?>@si', / ...
分类:Web程序   时间:2020-06-22 15:44:24    阅读次数:64
leetcode 368. Largest Divisible Subset
Given a set of distinct positive integers, find the largest subset such that every pair (Si, Sj) of elements in this subset satisfies: Si % Sj = 0 or ...
分类:其他好文   时间:2020-06-21 22:53:58    阅读次数:60
C# linq group by 异常 -----MySqlException: Unknown column 'GroupBy1.K1' in 'field list'
使用Linq group by 查询 一般我们都会这样写Linq:var result = (from si in model.table group si by si.NumCores into grp orderby grp.Key select new CoreCount { Cores = ...
分类:数据库   时间:2020-06-21 10:10:46    阅读次数:100
Java中计算两个日期相差几天
public class Test {public void dateDiff(String startTime, String endTime, String format) {//按照传入的格式生成一个simpledateformate对象SimpleDateFormat sd = new Si ...
分类:编程语言   时间:2020-06-20 14:07:00    阅读次数:66
性能监控
CPU:top top -H -p PIDprintf %x PPIDjstack pid | grep UPID vmstat 1procs memory swap-- io -system-- cpu r b swpd free buff cache si so bi bo in cs us s ...
分类:其他好文   时间:2020-06-20 10:36:52    阅读次数:63
算法冒泡排序(一个简单的排序)
冒泡排序是一个比较简单的排序 但我觉得冒泡排序有一个小点(因为有些同学都不加) 冒泡排序可以设置一个flag来判断是否排完序,如果一遍排下来没有进行交换,就算是排完了,就不需要之后的循环,可以直接break。 代码: void pop(int *arr,int size){ for(int i=si ...
分类:编程语言   时间:2020-06-19 21:04:22    阅读次数:59
41. 缺失的第一个正数(On)
41. 缺失的第一个正数 思路:利用去重排序,从1找出对应关系,不同即退出循环 class Solution { public: int firstMissingPositive(vector<int>& nums) { if(nums.size()==0) return 1; if(nums.si ...
分类:其他好文   时间:2020-06-15 14:13:42    阅读次数:83
1824条   上一页 1 ... 4 5 6 7 8 ... 183 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!