approximation theory method and

CF1875C Jellyfish and Green Apple

思路 首先我们可以考虑把能分的都先分了,再选择去切剩下的苹果。 那么我们只需要考虑苹果数量少于人数的情况,每个人能分的苹果都必然少于目前的单个苹果,所以每个苹果都必须切一刀,那么答案数就会增加当前的数量,再把能分的都分了,重复这一过程,直到分完为止。这样去切一定是最优的。 那么,什么时候无解呢? 因 ......
Jellyfish 1875C Apple Green 1875

题解 CF1875D【Jellyfish and Mex】

显然,除非 \(\operatorname{mex}a=0\),否则不会删除 \(>\operatorname{mex}a\) 的数。而 \(\operatorname{mex}a=0\) 时不对答案产生贡献,因此任意时刻我们都可以忽略 \(a\) 中 \(>\operatorname{mex}a\ ......
题解 Jellyfish 1875D 1875 and

mlpack is an intuitive, fast, and flexible header-only C++ machine learning library

https://github.com/mlpack/mlpack README.md a fast, header-only machine learning library Home | Documentation | Community | Help | IRC Chat Download: c ......

CF441E Valera and Number

题目链接 这道题一个朴素的思路就是:维护 \(f_{i,j}\) 表示第 \(i\) 轮后 \(x=j\) 的方案数。时间复杂度 \(O(k\times 2^k)\)。显然过不了。 我们尝试寻找一个能抛开 \(x\) 的值域的做法。不妨重新设 \(f_{i,j}\) 表示第 \(i\) 轮结束时的 ......
Valera Number 441E 441 and

[Linux] Compile and Build h5py with MPI

How to Install H5PY-MPI 0. Preparation linux system gcc anaconda/miniconda 1. Install open-mpi Go to "https://www.open-mpi.org/software/". Download th ......
Compile Linux Build h5py with

结对项目——实现一个自动生成小学四则运算题目的命令行程序—陈泽瀚and林桂旭

软工作业3:结对项目:实现一个自动生成小学四则运算题目的命令行程序 作业属于课程 课程首页 - 计科21级1班 - 广东工业大学 - 班级博客 - 博客园 作业要求 个人项目-作业2- 计科21级1班 - 广东工业大学 - 班级博客 - 博客园 这个作业的目标 实现一个自动生成小学四则运算题目的命令 ......
四则 自动生成 题目 命令 小学

F. Vasilije Loves Number Theory

F. Vasilije Loves Number Theory 前提知识:d(n)表示数字n的正约数个数,gcd(a,b)表示a,b两者的最大公约数 要点:问是否存在a,使得d(a * n)=n,gcd(n,a)=1,意思是n与a互质, 则可得,d(a * n)=d(a)*d(n)=n 则问题转化成 ......
Vasilije Number Theory Loves

lvalue and rvalue

lvalue and rvalue 好用的工具 写在前面 如何记住 排 列 组 合 ? 那如何区分这些东西呢? const int& int& const int const & const …… What is a lvalue and what is an rvalue? Awsome vide ......
lvalue rvalue and

[AGC012E] Camel and Oases

Camel and Oases 不难发现对于某个 V,一个点扩展出去的一段区间内所有点的区间相同。 故对于 v,\(\lfloor \frac{v}{2}\rfloor\),\(\lfloor\frac{\lfloor \frac{v}{2}\rfloor}{2}\rfloor\)...1,预处理 ......
Camel Oases 012E AGC 012

连接正负极Connection of positive and negative poles

不要把物理公式看作数学公式,请也尊重自然的经验法则。 Don't see the physical formulas as mathematical formulas, please also respect the experience rules of nature. 连接正负极 Connect ......
正负 Connection negative positive poles

CS61A: Structure and Interpretation of Computer Programs 笔记

Functions Environment Diagrams:左侧为 Frames,右侧为 Objects。 Name 类似变量名,它们存储在 Frame 中,指向各种各样的 Objects,比如值或函数。一个 Name 同时只能指向一个 Object,但可以改变自身指向,不受“类型”影响(Name ......

Docker|--E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation

错误 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 871920D1991BC93C E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them ......
gnupg installed operation required Docker

SQL注入 --【过滤or(包含information、orderby这种也寄了)和and的类型】

来自: [SWPU2019]Web1 详见博客: https://blog.csdn.net/plant1234/article/details/124205120 payload如下: 查看行数 1'/**/group/**/by/**/1,'1 ...... 直到 1'/**/group/**/ ......
information orderby 类型 SQL and

Wi-Fi Basic PHY and MAC

总体架构 Architecture Wi-Fi 网络的网络拓扑 首先我们从下面这张图来了解一下 Wi-Fi 网络的网络拓扑 BSS Basic Service Set 基本服务集是 802.11 网络的基本组件 building block。每个 BSS 基本服务集都一个唯一的标识,称为 BSSID ......
Wi-Fi Basic PHY MAC and

Codeforces Round 738 (Div. 2) A. Mocha and Math

给一个数组 \(a_1, a_2, \cdots, a_n\) 。可以执行以下操作任意次: 选择 \(l, r (1 \leq l < r \leq n)\) ,对于任意 \(l \leq i \leq r\) ,同时执行所有 \(a_{l + i} = a_{l + i} \& a_{r - i} ......
Codeforces Round Mocha Math 738

Golang method | Interfaces 示例

方法与接口(method Interface) package interFaces import ( "fmt" "log" ) // manager Appstore online account type Account struct { surName string givenName st ......
示例 Interfaces Golang method

Anton and School - 2题解

2023-09-26 题目 难度&重要性(1~10): 题目来源 luogu 题目算法 组合数学 解题思路 前置知识 范德蒙德卷积公式:\(\sum\limits_{i=0}^kC_{n}^{i}\times C_{m}^{k-i}=C_{n+m}^k\)。 至于证明请看此篇文章。 Sol 我们这道 ......
题解 School Anton and

Codeforces Round 738 (Div. 2) B. Mocha and Red and Blue

给一个字符串,包含字符 \(B\) , \(R\) ,\(?\) 。其中 \(?\) 可能为 \(B\) 或 \(R\) 。 规定不完美数为字符串中相同字符连续出现的次数,询问一个字符串的最少可能不完美数。 观察到 \(BR\) 或 \(RB\) 需要尽可能多,于是考虑尽可能让相邻字符不同。 容易证 ......
Codeforces and Round Mocha Blue

Codeforces Round 750 (Div. 2) B. Luntik and Subsequences

给一个数组 \(a_1, a_2, \cdots, a_n\) ,定义 \(s = \sum_{i = 1}^{n} a_i\) 。 询问有多少个 \(a\) 的子序列满足 \(\sum a_{i_k} = s - 1\) 。 显然要选出一个 \(1\) 不加入子序列,任意一个 \(0\) 可以加入 ......
Subsequences Codeforces Luntik Round 750

Spring中构造器、init-method、@PostConstruct、afterPropertiesSet孰先孰后,自动注入发生时间以及单例多例的区别、SSH线程安全问题

引用: https://www.cnblogs.com/qlqwjy/p/9417034.html 首先明白,spring的IOC功能需要是利用反射原理,反射获取类的无参构造方法创建对象,如果一个类没有无参的构造方法spring是不会创建对象的。在这里需要提醒一下,如果我们在class中没有显示的声 ......

CF1106D Lunar New Year and a Wander 题解

CF1106D 题解 暑期学校军训第一天模拟赛的题,相对而言比较简单 题意: 题意其实很简单,就是有一个无向图,需要你从\(1\)号节点出发,然后一次遍历所有的点,输出其中字典序最小的遍历 思路 说说思路吧,这题既然要遍历图上所有点,那首先就会想到 \(\texttt{BFS}\) 或 \(\tex ......
题解 Wander 1106D Lunar 1106

RabbitMQ报错:Shutdown Signal: channel error; protocol method

Shutdown Signal: channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - unknown delivery tag 1, class ......
RabbitMQ Shutdown protocol channel Signal

【笔记】机器学习基础 - Ch6.5-6 Kernel Methods

6.5 Sequence kernels 考虑拓展 \(K:\cal X\times X\to\mathbb{R}\) 到 \(\cal X\) 不是向量空间的情况,例如序列、图像等等。现在令 \(\cal X\) 为字符串的集合,对应的核称为序列核 sequence kernels;一种序列核的框 ......
机器 Methods 基础 笔记 Kernel

Linux shell script if condition control flow methods All In One

Linux shell script if condition control flow methods All In One if...then...fi / if...then...else..fi / if...then...elif...then...fi ......
condition control methods script Linux

Microservice - What are microservices, and why are microservices?

The concept of microservices is simply breaking a single large potential service into many smaller services that work together, hence, the name. One v ......
microservices Microservice are What and

TypeScript: Factory Method in TypeScript

npm install -g typescriptnpm install -g ts-node index.ts //import * as fs from "fs"; //TypeScript 工厂方法模式 Factory Method in TypeScript /** * The Creato ......
TypeScript Factory Method in

【部分国标(GB/GBT)、行标(YY/YYT)医疗法规标准总结and最新抽样标准】

1、可用性工程对医疗器械的应用(YY/T 1474—2016)2、医用电气基本安全性能通用要求(GB 9706.1—2020)3、医用电气环境要求及试验方法(GB/T 14710—2009)4、产品加速试验方法(GB/T 34986—2017)5、故障模式、影响及危害性分析指南(GJB/Z 1391 ......
标准 法规标准 国标 法规 部分

1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column

博客园 首页 新随笔 联系 管理 订阅 随笔- 111 文章- 1 评论- 3 阅读- 17万 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'i ......

Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column

MySQL有any_value(field)函数,他主要的作用就是抑制ONLY_FULL_GROUP_BY值被拒绝 官方有介绍,地址:https://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html#function_any-v ......

一个工程化项目中怎么使用import_and_require

一个工程化项目中怎么使用 import_and_require 这两个及是 module 和 commonjs 的区别 可以参考这个 前言 在一起开发脚本过程中自己需要用到 node 中fs chalk 两个模块, 起因 /* 本俩想着就是使用commonjs进行完成如下 */ const fs = ......