原文链接:传送 1 #include"algorithm" 2 #include"iostream" 3 #include"cmath" 4 using namespace std; 5 long long x,y,z,ans; 6 int main(){ 7 while(cin>>x>>y>>z) ...
分类:
其他好文 时间:
2020-01-21 17:58:14
阅读次数:
45
题目地址 https://leetcode.com/problems/perfect squares/ 题目大意 给定正整数 n ,找到若干个完全平方数(比如 )使得它们的和等于 n 。你需要让组成和的完全平方数的个数最少。 解题思路 动态规划思想,dp[i]表示i的问题解, 对i开方,得到最大的平 ...
分类:
其他好文 时间:
2020-01-21 17:56:39
阅读次数:
59
0. 1. strcpy() function #include <string.h> char* strcpy(char* destination, const char* source); 2. Allocating Memory dynamically: (1) void* malloc(in ...
分类:
其他好文 时间:
2020-01-21 13:36:25
阅读次数:
85
题面:https://codeforces.com/contest/1288/problem/C 题目大意: 给定n和m,有两个数组,两个数组的长度都等于m 数组内每个元素都在1到n中 对于两个数组对应的位置i,必须满足a[i]<=b[i] a数组必须是不下降的序列 b数组必须是不上升的序列 求有多 ...
分类:
其他好文 时间:
2020-01-21 13:30:13
阅读次数:
58
1/#include <fstream> std::ifstream::pos_type filesize(const char* filename) { std::ifstream in(filename, std::ifstream::ate | std::ifstream::binary); ...
分类:
编程语言 时间:
2020-01-21 10:34:42
阅读次数:
144
通过vs2019的.net core3.1 的项目试错,我发现的相关proto rpc的规则是rpc 方法名称(输入消息) returns(输出类型)上面公式全部不能省略,并且 输入输出消息 全部只能是1可以计为方便记忆 可以表达 为下面这个样子:rpc RemoteCallName(InputMe ...
分类:
其他好文 时间:
2020-01-21 00:33:09
阅读次数:
105
前端常用库 发送短信验证码倒计时60秒 带ajax验证原文链接:http://www.cnblogs.com/steed zgf/archive/2012/02/03/2336984.html <!doctype html <head <script src="http://libs.baidu.c ...
分类:
其他好文 时间:
2020-01-20 23:04:31
阅读次数:
128
AcWing 826单链表 https://www.acwing.com/problem/content/828/ 实现一个单链表,链表初始为空,支持三种操作: (1) 向链表头插入一个数; (2) 删除第k个插入的数后面的数; (3) 在第k个插入的数后插入一个数 现在要对该链表进行M次操作,进行 ...
分类:
编程语言 时间:
2020-01-20 22:52:41
阅读次数:
68
二分是一个常用的小技巧,可以将原本O(n)的复杂度降为O(log n)。但是二分也有局限性,只能在一个单调有序的集合中使用,所以,对于一道题目,我们要先判断它是否具有可二分性,然后再进行二分。 1.二分查找 思路: 在一个不严格单调的有序集合中,我们如果要查找一个元素的位置,可以用l来存储下界,用r ...
分类:
其他好文 时间:
2020-01-20 22:30:35
阅读次数:
110
485 最大连续1的个数 给定一个二进制数组, 计算其中最大连续1的个数。 示例 1: 注意: 1. 输入的数组只包含 0 和1。 2. 输入数组的长度是正整数,且不超过 10,000。 来源:力扣(LeetCode) 链接:https://leetcode cn.com/problems/max ...
分类:
其他好文 时间:
2020-01-20 22:28:59
阅读次数:
77