一、问题背景前段时间运维拦截到了一些 499 网络状态码报警,我对该问题进行了简单排查,本文对该状态码做简单的一个介绍。二、问题探寻2.1 问题探寻-过程[499 - CLIENT CLOSED REQUEST] A non-standard status code introduced by nginx for the case when a client closes the connecti
题意:有n个炸弹和水果,一个长为w高为h的木板,然后给出每个炸弹或水果的坐标,问木板一次
原创 2023-06-29 00:05:09
28阅读
★★ 输入文件:virus.in 输出文件:virus.out 简单对比时间限制:1 s 内存限制:128 MB 【题目描述】 公元2008年10月31日星期五,笃志者所在的整个机房由于猖獗的病毒一片恐慌。经查证,病毒是由A1机器散播开来的。。这要追溯到29日,笃志者由于病毒被迫从A1机器撤离。 一
原创 2021-07-27 11:59:36
115阅读
【链接】 "我是链接,点我呀:)" 【题意】 题意 【题解】 设最后行分成了x行,列分成了y列。 那么答案就是floor(n/x) floor(n/y) 然后x+y 2=k //即平均分配x行、y列 我们可以枚举floor(n/x)的值 这个值其实就是n整除x 我们现在证明n/x的结果最多只可能有2
转载 2019-04-15 17:54:00
76阅读
2评论
Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or
转载 2020-08-08 10:37:00
50阅读
2评论
一道贪心题,尽量横着切或竖着切,实在不行在交叉切#include#includeusing namespace std;int main(){ // freopen("in.txt","r",stdin); long long n,m,k; while(cin>>n>>m>>k){ ...
转载 2014-12-31 09:54:00
54阅读
Serialization is the process of converting a data structure or object into a sequence of bits soss a network connection link to be
原创 2022-08-03 21:38:41
83阅读
use level order like we always do for problems like ser and de-ser...
转载 2020-11-05 06:16:00
61阅读
2评论
点击打开链接做的很迷的一道
原创 2022-06-15 21:44:26
57阅读
A - Scarborough Fair 题意好理解. //A. Scarborough Fair 字符更换 #include<cstring> #include<cstdio> #include<algorithm> #include<cmath> #include<iostream> using
原创 2021-08-03 09:23:37
129阅读
传送门 这个显然考虑容斥,那么答案就是总方案数减去至少有一个 $1$ 的方案数加上至少有两个 $1$ 的方案数减去至少有三个 $1$ 的方案数... 即 $ans=\sum_{x=0}^{max(a)}(-1)^{cnt[x]}(2^{f[x]}-1)$ ,其中 $cnt[x]$ 表示 $x$ 二进
转载 2019-10-20 14:58:00
31阅读
2评论
传送门 显然我们只要考虑小于等于 $n/2$ 的质数 对于每个不为 $2$ 的质数 $p$ ,如果目前它的还没匹配的倍数有偶数个,那么显然这些都可以匹配完 否则,如果有奇数个,那么我们把 $2p$ 留着不匹配,剩下偶数个拿来全部匹配 最后剩下的数都是 $2$ 的倍数,一个个匹配即可,如果剩下奇数个只
转载 2019-10-20 14:43:00
56阅读
2评论
快慢指针解决环形链表
原创 2021-06-14 23:54:38
213阅读
【代码】jsp新代码第449课。
原创 2023-01-14 01:30:07
46阅读
嘟嘟嘟 这道题正解是怎么对的其实我也不清楚,总之靠感性理解吧。 首先当然要把1到n / 2的素数都筛出来,因为两两能配对的数一定都是这些素数的倍数。这也就说明对于(n / 2, n]的素数,他们一定不能配对,所以就不用筛他们了。 筛完后我们考虑怎么配对,对于一个素数的所有倍数xi,他们任意两个都可以
原创 2021-05-29 19:09:43
154阅读
Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or
转载 2020-03-11 02:16:00
50阅读
2评论
```html 05_Set和Map数据结构 ```
转载 2020-04-14 22:19:00
125阅读
2评论
【题目链接】:http://codeforces.com/problemset/problem/449/C【题意】 给你n个数字; 然后让你选出很多个不相交的对; 要求这些对的最大公因数都大于等于2; 问你最多的对数; 【题解】 首先; 数字1以及大于n/2的质数,它们肯定不能构...
转载 2017-10-04 18:44:00
93阅读
2评论
Jzzhu has picked n apples from his big apple tree. All the apples are numbered from 1 to n. Now he wants to sell them to an apple store. Jzzhu will pack his apples into groups and then sell them. Ea
转载 2017-08-04 10:47:00
56阅读
2评论
C. Jzzhu and Apples time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Jzzhu has picked n ap
原创 2021-12-27 17:09:25
40阅读
  • 1
  • 2
  • 3
  • 4
  • 5