码迷,mamicode.com
首页 >  
搜索关键字:hdu 4722 good number    ( 58673个结果
[CF1398C] Good Subarrays
[CF1398C] Good Subarrays Description 求子串中所有元素的和等于它的长度的子串的数量 Solution 前缀和一下,即 s(r)-s(l)=r-l, s(r)-r=s(l)-l 所以统计出 s(i)-i=k 的数量,然后算答案即可 #include <bits/st ...
分类:其他好文   时间:2021-02-22 12:50:38    阅读次数:0
LeetCode - Make The String Great
Given a string s of lower and upper case English letters. A good string is a string which doesn't have two adjacent characters s[i] and s[i + 1] where ...
分类:其他好文   时间:2021-02-22 12:38:24    阅读次数:0
--环比去年,row_number() over()取最新版本
--环比去年 and substr(last_sum.dbilldate,1,4) = to_char(add_months(to_date(substr(tmp.dbilldate,1,7),'yyyy-mm'),-12),'yyyy') row_number() over()取最新版本 sele ...
分类:其他好文   时间:2021-02-22 12:25:28    阅读次数:0
HDU 2089 不要62
状态表示: dp[len][sta]表示当前第len位,上一位为last的情况下满足条件的数的个数。 int f[15][10]; int a[15]; int l,r; int dfs(int len,int last,bool limit) { if(!len) return 1; if(!li ...
分类:其他好文   时间:2021-02-22 12:12:38    阅读次数:0
leetcode 743 网络延迟时间 Dijkstra算法
JAVA 暴力解法: public final int networkDelayTime(int[][] times, int n, int k) { Map<Integer, List<Integer[]>> map = new HashMap<Integer, List<Integer[]>>( ...
分类:编程语言   时间:2021-02-22 12:12:04    阅读次数:0
比较php和golang执行速度
统计1-2000000中的素数 php采用的是最版的php7.4 golang采用的是最新版的1.16,开启4个协程 <?php $startTime = time(); $number = 2000000; $primeNumbers = []; for ($i=1;$i<$number;$i++ ...
分类:Web程序   时间:2021-02-22 11:53:43    阅读次数:0
4_2:简单数据类型 和 复杂数据类型
知识梳理 简单类型与复杂类型 堆和栈 简单类型的内存分配 复杂类型的内存分配简单类型传参复杂类型传参 一 数据类型分类 1)基本概念 //1 简单数据类型:也称 值类型 又称 基本数据类型string number Boolean undefined nullnull 返回的是对象比较特殊 //2 ...
分类:其他好文   时间:2021-02-22 11:45:01    阅读次数:0
typeScript中的变量数据类型
盘点typeScript中的变量数据类型: 1.布尔类型 var isShowComma:boolean=true; 2.字符串类型 var name:string="小舞"; 3.数值类型 var num:number=12345; 4.数组类型 写法一: var arr:number[]=[1, ...
分类:其他好文   时间:2021-02-20 12:45:51    阅读次数:0
995. Minimum Number of K Consecutive Bit Flips (2021/2/18每日一题)
995. Minimum Number of K Consecutive Bit Flips In an array A containing only 0s and 1s, a K-bit flip consists of choosing a (contiguous) subarray of l ...
分类:其他好文   时间:2021-02-20 12:13:50    阅读次数:0
LeetCode - Unique Binary Search Trees
Given an integer n, return the number of structurally unique BST's (binary search trees) which has exactly n nodes of unique values from 1 to n. Examp ...
分类:其他好文   时间:2021-02-20 12:13:36    阅读次数:0
58673条   上一页 1 ... 20 21 22 23 24 ... 5868 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!