ergodicity liouville theorem and
CodeForces 1874B Jellyfish and Math
洛谷传送门 CF 传送门 看到这种操作乱七八糟不能直接算的题,可以考虑最短路。 对于 \(a, b, c, d, m\) 按位考虑,发现相同的 \((a, b, m)\) 无论如何操作必然还是相同的。 于是考虑对于每个可能的 \((0/1, 0/1, 0/1)\),所有终态有 \((c = 0/1, ......
Jellyfish and Mex
2023-10-01 题目 Jellyfish and Mex 难度&重要性(1~10):5 题目来源 luogu 题目算法 dp 解题思路 这道题一眼 dp。 我们需要考虑的是对于函数 \(\operatorname{mex}\) 的性质,假设当前 \(a\) 数组存在 \(0\sim x\),则 ......
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' [duplicate]
str | None syntax is only supported in 3.10 or later. Use from typing import Optional name: Optional[str] = None For cases where the right hand side i ......
CF1875B Jellyfish and Game
思路 题意大概是两人都有一组数,奇数轮,第一个人可以选择和第二个人交换一个数字也可以不换,偶数轮,第二个人可以选择和第一个人交换一个数字也可以不换。 首先可以猜测,我们每次都应该选择交换对方的最大值和自己的最小值,如果自己的最小值都比对方大的话就不交换。应该比较好想,这里感性证明一下。 如果用的不是 ......
CF1875D Jellyfish and Mex
思路 看到 \(n\) 的范围只有 \(5000\),并且 \(\sum n\) 的范围也是 \(5000\),所以可以考虑 \(n^2\) 的做法。 每次操作肯定都是一次性删完某个数字,如果删除某个数字删一半又去删别的数字,答案肯定会变大。 所以我们可以考虑统计所有数字的数量,记为 \(num_i ......
CF1875C Jellyfish and Green Apple
思路 首先我们可以考虑把能分的都先分了,再选择去切剩下的苹果。 那么我们只需要考虑苹果数量少于人数的情况,每个人能分的苹果都必然少于目前的单个苹果,所以每个苹果都必须切一刀,那么答案数就会增加当前的数量,再把能分的都分了,重复这一过程,直到分完为止。这样去切一定是最优的。 那么,什么时候无解呢? 因 ......
题解 CF1875D【Jellyfish and Mex】
显然,除非 \(\operatorname{mex}a=0\),否则不会删除 \(>\operatorname{mex}a\) 的数。而 \(\operatorname{mex}a=0\) 时不对答案产生贡献,因此任意时刻我们都可以忽略 \(a\) 中 \(>\operatorname{mex}a\ ......
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\) 轮结束时的 ......
[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 ......
结对项目——实现一个自动生成小学四则运算题目的命令行程序—陈泽瀚and林桂旭
软工作业3:结对项目:实现一个自动生成小学四则运算题目的命令行程序 作业属于课程 课程首页 - 计科21级1班 - 广东工业大学 - 班级博客 - 博客园 作业要求 个人项目-作业2- 计科21级1班 - 广东工业大学 - 班级博客 - 博客园 这个作业的目标 实现一个自动生成小学四则运算题目的命令 ......
lvalue and rvalue
lvalue and rvalue 好用的工具 写在前面 如何记住 排 列 组 合 ? 那如何区分这些东西呢? const int& int& const int const & const …… What is a lvalue and what is an rvalue? Awsome vide ......
[AGC012E] Camel and Oases
Camel and Oases 不难发现对于某个 V,一个点扩展出去的一段区间内所有点的区间相同。 故对于 v,\(\lfloor \frac{v}{2}\rfloor\),\(\lfloor\frac{\lfloor \frac{v}{2}\rfloor}{2}\rfloor\)...1,预处理 ......
连接正负极Connection of positive and negative poles
不要把物理公式看作数学公式,请也尊重自然的经验法则。 Don't see the physical formulas as mathematical formulas, please also respect the experience rules of nature. 连接正负极 Connect ......
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 ......
SQL注入 --【过滤or(包含information、orderby这种也寄了)和and的类型】
来自: [SWPU2019]Web1 详见博客: https://blog.csdn.net/plant1234/article/details/124205120 payload如下: 查看行数 1'/**/group/**/by/**/1,'1 ...... 直到 1'/**/group/**/ ......
Wi-Fi Basic PHY and MAC
总体架构 Architecture Wi-Fi 网络的网络拓扑 首先我们从下面这张图来了解一下 Wi-Fi 网络的网络拓扑 BSS Basic Service Set 基本服务集是 802.11 网络的基本组件 building block。每个 BSS 基本服务集都一个唯一的标识,称为 BSSID ......
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} ......
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 我们这道 ......
Codeforces Round 738 (Div. 2) B. Mocha and Red and Blue
给一个字符串,包含字符 \(B\) , \(R\) ,\(?\) 。其中 \(?\) 可能为 \(B\) 或 \(R\) 。 规定不完美数为字符串中相同字符连续出现的次数,询问一个字符串的最少可能不完美数。 观察到 \(BR\) 或 \(RB\) 需要尽可能多,于是考虑尽可能让相邻字符不同。 容易证 ......
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\) 可以加入 ......
CF1106D Lunar New Year and a Wander 题解
CF1106D 题解 暑期学校军训第一天模拟赛的题,相对而言比较简单 题意: 题意其实很简单,就是有一个无向图,需要你从\(1\)号节点出发,然后一次遍历所有的点,输出其中字典序最小的遍历 思路 说说思路吧,这题既然要遍历图上所有点,那首先就会想到 \(\texttt{BFS}\) 或 \(\tex ......
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 ......
【部分国标(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 = ......
CF1106D Lunar New Year and a Wander 题解
CF1106D 题解 暑期学校军训第一天模拟赛的题,相对而言比较简单 题意: 题意其实很简单,就是有一个无向图,需要你从\(1\)号节点出发,然后一次遍历所有的点,输出其中字典序最小的遍历 思路 说说思路吧,这题既然要遍历图上所有点,那首先就会想到 \(\texttt{BFS}\) 或 \(\tex ......
UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.解决办法
87iuiu由于ii from torchvision import models # 旧版本的写法,将在未来的torchvision 0.15版本中被Deprecated model_old = models.resnet50(pretrained=True) # deprecated model ......