CF1349F1 & 2 [* so hard] 定义好序列为: 所有元素都是正整数。 假设 \(k\ne 1\) 且 \(k\) 在序列中出现过,那么 \(k-1\) 在 \(k\) 最后一次出现的位置之前出现过。 设 \(f_p(i)\) 为 “好序列” \(p\) 中 \(i\) 的出现次数, ...
分类:
其他好文 时间:
2020-11-25 12:03:05
阅读次数:
7
__int128 是比 long long 还要大的数据类型(\(max = 2^{128}-1\)) 其输入和输出不能用常规方法,用 read() 和 write() 函数代替 #include<bits/stdc++.h> using namespace std; __int128 read(i ...
分类:
其他好文 时间:
2020-11-24 12:37:39
阅读次数:
6
#PHP九九乘法表# <html><head></head><body><p> <?php header('Content-Type:text/html;charest=utf-8'); $i=1; $n=1; $sum;for($n=1;$n<=9;$n++){ for($i=1;$i<=$n;$ ...
分类:
其他好文 时间:
2020-11-24 12:14:54
阅读次数:
8
按照题号排序 1.Multiples of 3 and 5 题意:求 $1000$ 以内的,是 $3$ 或 $5$ 倍数的数的和 直接模拟 2.Even Fibonacci numbers 题意:求 $4\times 10 ^ 6$ 内的,是偶数的斐波那契数之和 直接模拟 3.Largest pri ...
分类:
其他好文 时间:
2020-11-24 12:11:58
阅读次数:
5
手动下载安装nginx 需要的安装依赖包 登录可连接公网的一台机器, 配置 nginx.repo yum源 cat nginx.repo [nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/$releasever/$bas ...
分类:
其他好文 时间:
2020-11-23 12:47:29
阅读次数:
23
最近生产环境在这两个参数之间遇到过几次坑。这里记录下。 client_max_body_size client_max_body_size 默认 1M,表示 客户端请求服务器最大允许大小,在“Content-Length”请求头中指定。如果请求的正文数据大于client_max_body_size, ...
分类:
其他好文 时间:
2020-11-23 12:01:24
阅读次数:
6
@(C++内联函数) #include <iostream> using namespace std; inline int Max(int a, int b) { if (a > b) return a; else return b; } int main() { cout << Max(23, ...
分类:
编程语言 时间:
2020-11-21 12:39:21
阅读次数:
17
1.问题分析nginx访问出现504GatewayTime-out,一般是由于程序执行时间过长导致响应超时,例如程序执行需要90秒,而nginx最大响应等待时间为30秒,这样就会出现超时。通常有以下几种情况导致:(1).程序在处理大量数据,导致等待超时。(2).程序中调用外部请求,而外部请求响应超时。(3).连接数据库失败而没有停止,死循环重新连。出现这种情况,我们可以先优化程序,缩短执行时间。另
分类:
Web程序 时间:
2020-11-21 12:15:38
阅读次数:
19
###P3899 [湖南集训]谈笑风生 二维数点问题,主席树模板(两种写法 #include<bits/stdc++.h> #define IL inline #define LL long long #define pb push_back using namespace std; const i ...
分类:
其他好文 时间:
2020-11-21 12:15:18
阅读次数:
7
1.models.py class Users(models.Model): password = models.CharField(max_length=100,verbose_name='用户名') account = models.CharField(max_length=100,verbos ...
分类:
数据库 时间:
2020-11-21 12:09:40
阅读次数:
11