#pragma warning (disable : 4996) #include<iostream> #include<algorithm> //#include<unordered_map> #include<fstream> #include<iomanip> #include<string> ...
分类:
其他好文 时间:
2020-07-29 09:54:50
阅读次数:
66
HDU 6608 题意:给以你一个质数,求小于它的最大质数的阶乘。 分析:Miller-Rabin快速判断素性,找到这个最大素数。此外,加上威尔逊定理推式子就好了。威尔逊定理描述的内容是对于一个正素数p: ? \((k-1)!modk$\)= k-1$ 有了这个定理,我们就可以很容易得到小于k最大素 ...
分类:
其他好文 时间:
2020-07-29 00:42:21
阅读次数:
80
F. Beautiful Rectangle 题解: 本来这个题目不准备写题解了的,因为这个确实不是很难,但是我wa了很多次之后,发现还是有写的必要。 这个题目首先求出p和q,这个不是很难求,就是统计每一个数字的数量,然后排序一下,求出每一个宽 x 可以放进去的最多的数量。 求出 p q之后就是构造 ...
分类:
其他好文 时间:
2020-07-28 22:52:00
阅读次数:
89
python读取txt文件,将数据转化为dataFrame,dataFrame数据插入到pgsql 1. pd.io.sql.to_sql(dataframe,'table_name',con=conn,schema='w_analysis',if_exists='append') 2.df.to_ ...
分类:
数据库 时间:
2020-07-28 22:23:40
阅读次数:
101
概述 webpack中的插件主要是用来完成loader和配置无法完成的事情 常见的几种Plugins HtmlWebpackPlugin 参考文档 html-webpack-plugin插件默认会创建一个HTML模板,并自动引入打包生成的几个主要的chunk包 也可以通过template属性配置自己 ...
分类:
Web程序 时间:
2020-07-28 22:05:47
阅读次数:
103
#ifndef MY_BIGN_H#define MY_BIGN_H 1#pragma GCC system_header#include<cstring>#include<algorithm>#include<iostream>using std::max;using std::istream;u ...
分类:
其他好文 时间:
2020-07-28 16:52:02
阅读次数:
67
AcWing 790. 数的三次方根 #include <bits/stdc++.h> using namespace std; int main(){ double n,mid; scanf("%lf",&n); double l=-1e6-10,r=1e6+10; while(r-l>1e-8) ...
AcWing 801. 二进制中1的个数 #include <bits/stdc++.h> using namespace std; int lowbit(int x){ return x&-x; } int main(){ int n; cin>>n; while(n--){ int x,res= ...
s = "abc" t = "ahbgdc" class Solution: def isSubsequence(self, s: str, t: str): for i in range(len(s)): if s[i] in t: if i <= t.index(s[i]) : return s ...
分类:
编程语言 时间:
2020-07-28 10:16:14
阅读次数:
90
简介 String对象有个特殊的StringTable字符串常量池,为了减少Heap中生成的字符串的数量,推荐尽量直接使用String Table中的字符串常量池中的元素。 那么String.intern的性能怎么样呢?我们一起来看一下。 String.intern和G1字符串去重的区别 之前我们提 ...
分类:
其他好文 时间:
2020-07-28 10:15:18
阅读次数:
77