采用分治思想 #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; double a,b,c,d; double f(double x) { return ...
分类:
其他好文 时间:
2020-07-17 13:39:43
阅读次数:
71
1、流程控制 通过控制代码的执行顺序来实现我们完成的功能,js中流程控制有三种结构 顺序结构:按照代码的先后顺序,依次执行 分支结构:根据不同的条件执行不同的代码,如:if和switch... ...case语句 循环结构:while、do.. ...while、for、break、continue ...
分类:
Web程序 时间:
2020-07-17 13:35:06
阅读次数:
81
error while loading shared libraries: libnuma.so.1: cannot open shared object file: No such file or directory 在CentOS 7.6 操作系统的机器上安装 MySQL 过程中,执行安装命令报 ...
分类:
其他好文 时间:
2020-07-17 13:34:29
阅读次数:
60
本题考察的是回溯算法,可以使用DFS解决问题。 C++版本 #include <iostream> #include <vector> using namespace std; int getDigitSum(int num){ int sum = 0; while(num > 0){ sum += ...
分类:
其他好文 时间:
2020-07-17 11:28:13
阅读次数:
48
开始复健。 用了不方便的算面积的方法,讨论了好多,还调了一个多小时- - 发现 double 和 longdouble 的四舍五入是随机的,有时候舍5有时候入5。 #include<cstdio> #include<algorithm> #include<cmath> using namespace ...
分类:
其他好文 时间:
2020-07-17 09:24:11
阅读次数:
120
package LeetCode_279 import java.util.* import kotlin.collections.HashSet /** * 279. Perfect Squares * https://leetcode.com/problems/perfect-squares/d ...
分类:
其他好文 时间:
2020-07-17 01:15:12
阅读次数:
72
利用二分图没有奇环的性质 DFS: class Solution { private: static constexpr int UNCOLORED = 0; static constexpr int RED = 1; static constexpr int GREEN = 2; vector<i ...
分类:
其他好文 时间:
2020-07-16 21:49:52
阅读次数:
71
7.15 dp专题 T1.sum 小Z爱求和 https://www.luogu.com.cn/problem/T138967 无脑暴力骗20... 正解 n2 个元素,挨个统计是 O( n2 ) ,所以统计每个点的贡献 复杂度降到O(n) 对于每个点,他可能贡献的区间是 L= pre(k-1) 前 ...
分类:
其他好文 时间:
2020-07-16 21:46:57
阅读次数:
58
1、算术运算符 算数运算符 说明 例子 + 加法 10 + 3 = 13 - 减法 10 - 3 = 7 * 乘法 10 * 3 = 30 / 除法 12 / 3 = 4 % 求余(求模) 10 % 3 = 1 ++ 自增1 int i = 0;i++ -- 自减1 int i = 0;i-- 注意 ...
分类:
编程语言 时间:
2020-07-16 21:34:12
阅读次数:
94
Java-byte转换 1 import org.springframework.stereotype.Component; 2 import org.springframework.util.StringUtils; 3 4 import java.io.*; 5 6 /** 7 * byte和各 ...
分类:
编程语言 时间:
2020-07-16 21:22:56
阅读次数:
81