#include<bits/stdc++.h>#define ll long longusing namespace std;/*题意:给你一串数,让你排序,重点是要使相邻两个数的差值递增。思维题,可以发现从小到大排序后最中间两个数为一组,两边相邻的两个数的差值一定会大于等于中间两数的差值,再往外找 ...
分类:
其他好文 时间:
2020-05-26 23:29:19
阅读次数:
82
package LeetCode_496 /** * 496. Next Greater Element I * https://leetcode.com/problems/next-greater-element-i/description/ * * You are given two array ...
分类:
其他好文 时间:
2020-05-26 22:09:23
阅读次数:
112
Redis是什么 Redis是一款开源的内存数据结构存储,(可在内存中存储结构化的数据),用作数据库,缓存和消息中间件,支持多种数据结构,如:strings,hashes,lists,sets,带有范围查询的sorted sets ,bitmaps,hyperloglogs,带有半径查询的geosp ...
分类:
其他好文 时间:
2020-05-26 01:05:26
阅读次数:
66
H. Binary Median 题意:给定$n$,\(m\),及$n$个二进制数,在由0到$2m-1$这$2m$个二进制数中删掉这$n$个数,求剩余二进制数的中位数。 LL trans(char s[]) { int len = strlen(s); int j=0; LL ans=0; whil ...
分类:
其他好文 时间:
2020-05-26 00:58:54
阅读次数:
103
题面 Time limit per test: 2 seconds Memory limit per test: 256 megabytes Description Consider all binary strings of length m ( 1≤m≤60 ). A binary string ...
分类:
其他好文 时间:
2020-05-25 12:26:07
阅读次数:
95
Python中操作字符串之replace()方法的使用: https://www.jb51.net/article/66360.htm python3排序 sorted(key=lambda): https://www.cnblogs.com/zle1992/p/6271105.html ...
分类:
编程语言 时间:
2020-05-25 10:50:46
阅读次数:
65
链接:https://leetcode-cn.com/problems/add-two-numbers/ 代码: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * L ...
分类:
其他好文 时间:
2020-05-25 00:15:00
阅读次数:
65
Find the sum of all left leaves in a given binary tree. Example: 3 / \ 9 20 / \ 15 7 There are two left leaves in the binary tree, with values 9 and 1 ...
分类:
其他好文 时间:
2020-05-24 11:27:13
阅读次数:
52
Given two lists of closed intervals, each list of intervals is pairwise disjoint and in sorted order. Return the intersection of these two interval li ...
分类:
其他好文 时间:
2020-05-24 09:40:12
阅读次数:
58
博客转自:http://www.lighthouse3d.com/tutorials/glut-tutorial/subwindow-reshape/ The callback for the reshape function needs to do two things: it resizes t ...
分类:
其他好文 时间:
2020-05-23 18:30:51
阅读次数:
61