自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(18)
  • 收藏
  • 关注

原创 Docker

cluster-replicas 1表示为每个master创建一个slave节点。虚悬镜像一定要删除 docker image prune。每条保留字指令都必须为大写字母且后面至少要跟随一个参数。每条指令都会创建一个新的镜像层,并对镜像进行提交。–net host 使用宿主机的IP和端口,默认。6387表示新增将来要作为master的节点。6381表示原来集群节点的领路人。docker安装mysql。docker安装redis。指令按照从上打下,顺序执行。scratch 祖先镜像。docker常用命令。

2023-04-18 15:24:36 99 1

原创 Codeforces Round #717 (Div. 2) A-D

##A. Tit for TatDescriptionGiven an array aa of length nn, you can do at most kk operations of the following type on it:choose 222 different elements in the array, add 111 to the first, and subtract 111 from the second. However, all the elements of aa

2021-04-29 10:57:06 258

原创 USACO 2021 January Contest 银级 题解

Problem 1. Dance MoovesDescriptionFarmer John’s cows are showing off their new dance mooves!At first, all NN cows (2≤N≤1052≤N≤10^52≤N≤105) stand in a line with cow ii in the iith position in line. The sequence of dance mooves is given by KK (1≤K≤2∗1051≤

2021-02-01 12:24:40 1512

原创 历史的研究(回滚莫队)

历史研究DescriptionIOIIOIIOI 国历史研究的第一人—— JOIJOIJOI 教授,最近获得了一份被认为是古代 IOIIOIIOI 国的住民写下的日记。JOIJOIJOI 教授为了通过这份日记来研究古代 IOIIOIIOI 国的生活,开始着手调查日记中记载的事件。日记中记录了连续 NNN 天发生的时间,大约每天发生一件。事件有种类之分。第 iii 天(1≤i≤N1\leq i \leq N1≤i≤N)发生的事件的种类用一个整数xix_ixi​表示,xix_ixi​越大,事件的规模就越

2021-01-23 10:24:31 141

原创 单调栈和单调队列

单调栈从名字上就听的出来,单调栈中存放的数据应该是有序的,所以单调栈也分为单调递增栈和单调递减栈单调递增栈:单调递增栈就是从栈底到栈顶数据是从大到小单调递减栈:单调递减栈就是从栈底到栈顶数据是从小到大我们可以去看道例题链接:点击柱形图中最大的矩形Description给定 n 个非负整数,用来表示柱状图中各个柱子的高度。每个柱子彼此相邻,且宽度为 1 。求在该柱状图中,能够勾勒出来的矩形的最大面积。通过题目我们会发现如果我们计算当前柱高的矩形最大面积时,只有当它的两端比它要高或者相等

2021-01-21 22:10:48 149 1

原创 2021灵动冬令营Day3

A - Birthday CakeDescriptionLucy and Lily are twins. Today is their birthday. Mother buys a birthday cake for them. Now we put the cake onto a Descartes coordinate. Its center is at (0, 0), and the cake’s length of radius is 100. There are 2N (N is a int

2021-01-21 08:49:10 313

原创 2021灵动冬令营Day2

A - Maya CalendarDescriptionDuring his last sabbatical, professor M. A. Ya made a surprising discovery about the old Maya calendar. From an old knotted message, professor discovered that the Maya civilization used a 365 day long year, called Haab, which

2021-01-21 08:48:37 301

原创 2021灵动冬令营Day1

A - Specialized Four-Digit NumbersDescriptionFind and list all four-digit numbers in decimal notation that have the property that the sum of its four digits equals the sum of its digits when represented in hexadecimal (base 16) notation and also equals t

2021-01-18 19:27:32 281 1

原创 莫比乌斯反演基础

一、先补充几个常用和式规则∑m∣nam=∑m∣nan/m∑m∣nam=∑k∑m>0am[n=mk]∑m∣n∑k∣mak,m=∑k∣n∑l∣(n/k)ak,kl\sum_{m | n} a_m = \sum_{m |n} a_{n / m} \\\sum_{m | n} a_m = \sum_{k}\sum_{m > 0} a_m[n = mk] \\\sum_{m | n}\sum_{k | m} a_{k, m} = \sum_{k | n}\sum_{l | (n / k)} a_{

2020-10-22 21:43:22 281 1

原创 tarjan

对于一个有向图找到所有的强联通分量从当前节点出发,就把当前节点想象成根节点,用dfn表示从当下节点向下一节点开始dfs的时间,low表示从当前节点出发,遍历所有能遍历到的并且不属于任何一个强连通分量的节点能被访问到的最小的时间比如说 n = 3 m = 31-2 2-3 3-1这里的low值就分别为1 2 2 因为第三个节点能到第二个节点,第二个节点最早可以被访问的时间就是2,而第三个节点开始的时间是3但是可以到第二个几点,因此第三个节点最早的开始时间也就是第二个节点的开始时间这个例子的强连通分量

2020-08-10 14:08:29 77

原创 和式整理

DescriptionYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move one unit ...

2019-10-25 20:36:17 1900

原创 POJ 1106 Transmitters

题目叙述In a wireless network with multiple transmitters sending on the same frequencies, it is often a requirement that signals don’t overlap, or at least that they don’t conflict. One way of accomplish...

2019-10-25 20:36:09 920

原创 求解逆元的两种方法

//// main.cpp// POJ2253_青蛙跳跃//// Created by 陈冉飞 on 2019/8/16.// Copyright © 2019 陈冉飞. All rights reserved.//#include <iostream>using namespace std;#include <cstring>#define ...

2019-10-25 20:35:20 949

原创 POJ 2653 Pick-up sticks

证明在这篇博客里#include<cstdio>#include<cmath>using namespace std;const int N = 1e6 + 7;double dx1[N];double dx2[N];double dy1[N];double dy2[N];double cal(double x1,double y1,double x...

2019-08-10 09:44:21 2047

原创 两条直线相交的证明以及交点的求解

一、两条直线相交的证明:首先我们要知道向量的叉乘,向量的叉乘得到的也是一个向量,其值为以最初的两条向量为临边的平行四边形的面积,方向根据右手定则得出。知道了这个就可以证明了,具体的看以下的图片从上面的三个图我们就可以知道了如何证明两条直线相交了,但是每两条直线都要证明两次,原因如下二、交点的求解...

2019-08-10 09:38:21 15568

原创 P - Consumer

P - Consumer题目叙述FJ is going to do some shopping, and before that, he needs some boxes to carry the different kinds of stuff he is going to buy. Each box is assigned to carry some specific kinds of s...

2019-08-05 09:21:29 2035

原创 polya定理的简单应用

对于类似于用m种颜色染长度为n的环,旋转和对称是同一种方案,求本质不同的方案数。这是基本的ploya定理的题。1.首先考虑旋转假设你每次从位置p旋转x个位置,总共需要k次旋转到原位置p点。那么就有 p + kx ≡ p (% n);即 kx ≡ 0 (% n);又因为 kx % x = 0;所以 循环节 k 的 最小值为 kx = (nx) / gcd(n , x);即 k = n...

2019-07-25 11:55:39 2460 1

原创 大数

因为整形变量的范围,所以当我们想求长度非常大的两个数的和,差,乘,除的时候不能用简单的直接加减乘除。大数的加法加法需要考虑的就是进位的问题#include&amp;amp;amp;amp;amp;amp;lt;stdio.h&amp;amp;amp;amp;amp;amp;gt;#include&amp;amp;amp;amp;amp;amp;lt;string.h&amp;amp;amp;amp;amp;amp;gt;int main(){ ch

2018-12-24 11:53:15 1342

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除